* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Header */
header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: #2563eb;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.hero p {
    font-size: 16px;
    opacity: 0.9;
}

/* Main Tool Area */
.tool-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.tool-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.panel {
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.panel-header {
    padding: 15px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.panel-content {
    flex: 1;
    padding: 0;
    position: relative;
}

textarea {
    width: 100%;
    height: 100%;
    min-height: 450px;
    border: none;
    padding: 20px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    outline: none;
}

.output-container {
    width: 100%;
    height: 100%;
    min-height: 450px;
    overflow: auto;
    padding: 20px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    background: #fafafa;
}

/* Syntax Highlighting */
.json-key {
    color: #059669;
}

.json-string {
    color: #dc2626;
}

.json-number {
    color: #2563eb;
}

.json-boolean {
    color: #7c3aed;
}

.json-null {
    color: #9ca3af;
}

/* Buttons */
.action-bar {
    padding: 15px 20px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

/* Error Message */
.error-message {
    padding: 15px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Tool Stats */
.stats-bar {
    display: flex;
    gap: 20px;
    padding: 10px 20px;
    background: #f1f5f9;
    font-size: 12px;
    color: #64748b;
}

/* Other Tools Section */
.other-tools {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.other-tools h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1f2937;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tool-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tool-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #1f2937;
}

.tool-card p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 15px;
}

.tool-card a {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

/* Features Section */
.features {
    max-width: 1400px;
    margin: 40px auto;
    padding: 40px 20px;
    background: white;
    border-radius: 8px;
}

.features h2 {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
    color: #1f2937;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.feature-item h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #1f2937;
}

.feature-item p {
    font-size: 14px;
    color: #64748b;
}

/* Footer */
footer {
    background: #1f2937;
    color: #9ca3af;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    color: white;
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1400px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid #374151;
    text-align: center;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .tool-wrapper {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 24px;
    }
}

/* Copy Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}