/* Tree View Styles */
.json-tree-view {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    padding: 1.5rem;
    line-height: 1.5;
}

.tree-node {
    margin-left: 1.25rem;
    position: relative;
}

.tree-toggle {
    position: absolute;
    left: -1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 2px 5px;
}

.tree-children {
    display: none;
    margin-left: 1rem;
}

.tree-node.expanded > .tree-children {
    display: block;
}

.tree-node {
    margin-bottom: 0.25rem;
}

.tree-key {
    color: var(--primary-color);
    font-weight: 500;
}

.tree-value.string { color: #0891b2; }
.tree-value.number { color: #ea580c; }
.tree-value.boolean { color: #7c3aed; }
.tree-value.null { color: #64748b; font-style: italic; }

.tree-brace {
    color: var(--text-muted);
}

.tree-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Compare View Styles */
.json-compare-view {
    padding: 1.5rem;
}

.diff-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.diff-item {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background: var(--bg-color);
    border-left: 4px solid #cbd5e1;
    display: grid;
    grid-template-columns: 100px 1fr auto;
    align-items: center;
    gap: 1rem;
}

.diff-item.missing { border-left-color: #ef4444; background: rgba(239, 68, 68, 0.05); }
.diff-item.added { border-left-color: #10b981; background: rgba(16, 185, 129, 0.05); }
.diff-item.changed { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.05); }

.diff-type {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-align: center;
    background: #e2e8f0;
    color: #475569;
}

.missing .diff-type { background: #fee2e2; color: #b91c1c; }
.added .diff-type { background: #dcfce7; color: #15803d; }
.changed .diff-type { background: #fef3c7; color: #b45309; }

.diff-path {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    font-size: 0.85rem;
}

.diff-values {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

del { color: #b91c1c; text-decoration: line-through; margin-right: 0.5rem; }
ins { color: #15803d; text-decoration: none; font-weight: bold; }

.error-msg { color: #ef4444; font-weight: 600; padding: 1rem; background: #fee2e2; border-radius: 8px; }
.success-msg { color: #10b981; font-weight: 600; padding: 1rem; background: #dcfce7; border-radius: 8px; }
.html-preview-hint, .html-structure-hint {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.5rem 1.5rem;
    background: rgba(0,0,0,0.05);
}

.html-live-preview {
    padding: 1.5rem;
    background: white;
    color: black;
}

.md-section {
    position: relative;
    margin-bottom: 0.5rem;
}

.md-toggle {
    cursor: pointer;
    margin-right: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.md-section > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
    display: none;
}

.md-section.expanded > * {
    display: block !important;
}

.markdown-body table { display: table !important; }
