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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    min-height: 100vh;
    color: #333;
}

header {
    background: rgba(255, 255, 255, 0.98);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #005bea;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.primary-btn, .secondary-btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.primary-btn {
    background: #005bea;
    color: white;
}

.primary-btn:hover {
    background: #0045b7;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 91, 234, 0.3);
}

.secondary-btn {
    background: white;
    color: #005bea;
    border: 2px solid #005bea;
}

.secondary-btn:hover {
    background: #005bea;
    color: white;
    transform: translateY(-2px);
}

.editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.input-panel, .output-panel {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.input-panel h2, .output-panel h2 {
    color: #005bea;
    margin-bottom: 1rem;
}

#json-input {
    width: 100%;
    min-height: 400px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
}

#json-input:focus {
    outline: none;
    border-color: #00c6fb;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#json-output {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 1rem;
    min-height: 400px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    overflow-x: auto;
    white-space: pre;
}

.error-message {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 0.5rem;
    min-height: 20px;
}

.copy-btn {
    background: #00c6fb;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #00a8d8;
    transform: translateY(-2px);
}

.copy-btn.copied {
    background: #4caf50;
}

.stats {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

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

.stat-label {
    color: #666;
    font-size: 14px;
    margin-right: 0.5rem;
}

.stat-item span:last-child {
    font-weight: bold;
    font-size: 18px;
    color: #005bea;
}

.status-valid {
    color: #4caf50;
}

.status-invalid {
    color: #e53e3e;
}

.features {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.features h3 {
    color: #005bea;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

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

.feature-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.feature-item p {
    color: #666;
}

footer {
    background: rgba(255, 255, 255, 0.98);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.ad-area {
    background: #f0f0f0;
    padding: 2rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border: 2px dashed #ccc;
}

@media (max-width: 768px) {
    .editor-container {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
    }
    
    .stats {
        flex-direction: column;
        gap: 1rem;
    }
}