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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0d1117;
    color: #e6edf3;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    margin: 0 auto;
    padding: 20px;
}

.diff-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    min-height: 400px;
}

.input-section {
    display: flex;
    flex-direction: column;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    overflow: hidden;
    min-width: 200px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: #21262d;
    border-bottom: 1px solid #30363d;
}

.section-header h2 {
    font-size: 0.9rem;
    font-weight: 500;
    color: #f0f6fc;
}

.section-header h3 {
    font-size: 0.8rem;
    font-weight: 500;
    color: #f0f6fc;
    margin-bottom: 10px;
}

.input-controls, .diff-controls {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.btn-primary:hover {
    background: #2ea043;
}

.btn-secondary {
    background: #21262d;
    color: #e6edf3;
    border: 1px solid #30363d;
}

.btn-secondary:hover {
    background: #30363d;
    border-color: #484f58;
}

#json1Input, #json2Input {
    flex: 1;
    padding: 20px;
    background: #0d1117;
    border: none;
    color: #e6edf3;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    outline: none;
    min-height: 300px;
}

#json1Input::placeholder, #json2Input::placeholder {
    color: #6e7681;
}

.diff-results {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    overflow: hidden;
}

.diff-output {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

.diff-side {
    background: #0d1117;
    border-right: 1px solid #30363d;
    padding: 20px;
    overflow: auto;
}

.diff-side:last-child {
    border-right: none;
}

.json-viewer {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.json-key {
    color: #79c0ff;
    font-weight: 500;
}

.json-string {
    color: #a5d6ff;
}

.json-number {
    color: #79c0ff;
}

.json-boolean {
    color: #ffa657;
}

.json-null {
    color: #f85149;
    font-style: italic;
}

.json-bracket {
    color: #8b949e;
    font-weight: bold;
}

.json-comma {
    color: #8b949e;
}

.diff-added {
    background-color: rgba(35, 134, 54, 0.3);
    border-left: 3px solid #238636;
    padding-left: 10px;
    margin-left: -13px;
}

.diff-removed {
    background-color: rgba(248, 81, 73, 0.3);
    border-left: 3px solid #f85149;
    padding-left: 10px;
    margin-left: -13px;
}

.diff-modified {
    background-color: rgba(255, 166, 87, 0.3);
    border-left: 3px solid #ffa657;
    padding-left: 10px;
    margin-left: -13px;
}

.diff-line {
    position: relative;
    padding: 2px 0;
    border-radius: 3px;
}

.error-message {
    padding: 12px 20px;
    background: #da3633;
    color: white;
    font-size: 0.9rem;
    border-top: 1px solid #30363d;
    display: none;
}

.info-message {
    padding: 12px 20px;
    background: #0969da;
    color: white;
    font-size: 0.9rem;
    border-top: 1px solid #30363d;
    display: none;
}

.success-message {
    background: #238636 !important;
}

/* FAQ Section Styles */
.faq-section {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #30363d;
}

.faq-details {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    overflow: hidden;
}

.faq-summary {
    padding: 16px 20px;
    background: #21262d;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #e6edf3;
    border: none;
    outline: none;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-summary:hover {
    background: #30363d;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-summary::after {
    content: "▼";
    color: #8b949e;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.faq-details[open] .faq-summary::after {
    transform: rotate(180deg);
}

.faq-content {
    padding: 0 20px 20px 20px;
}

.faq-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #30363d;
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-item h3 {
    color: #58a6ff;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.faq-item p {
    color: #8b949e;
    line-height: 1.6;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .diff-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .diff-output {
        grid-template-columns: 1fr;
    }
    
    .diff-side {
        border-right: none;
        border-bottom: 1px solid #30363d;
    }
    
    .diff-side:last-child {
        border-bottom: none;
    }
    
    .container {
        padding: 15px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .input-controls, .diff-controls {
        width: 100%;
        justify-content: flex-end;
    }
}