:root {
    /* Light mode surfaces — warm zinc/slate tones */
    --bg-page:        #eef0f4;
    --bg-nav:         rgba(235, 237, 243, 0.85);
    --bg-surface:     #f4f5f8;
    --bg-surface-2:   #ffffff;
    --border-color:   #d1d5db;
    --text-primary:   #1e293b;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;
}
.dark {
    --bg-page:        #020617;
    --bg-nav:         rgba(15, 23, 42, 0.85);
    --bg-surface:     #0f172a;
    --bg-surface-2:   #1e293b;
    --border-color:   #1e293b;
    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted:     #475569;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
}
body.theme-transition {
    transition: background-color 0.2s ease, color 0.2s ease;
}
.code-font { font-family: 'JetBrains Mono', monospace; }

/* Nav surface */
.nav-surface {
    background-color: var(--bg-nav);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
}
/* Card/editor surface */
.card-surface {
    background-color: var(--bg-surface-2);
    border: 1px solid var(--border-color);
}
/* Inner panel surface */
.panel-surface {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.45); }

/* Theme toggle rotate animation */
#theme-toggle svg { transition: transform 0.3s ease; }
#theme-toggle:hover svg { transform: rotate(20deg); }

/* Line Numbers Gutter Styles */
.textarea-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}
.line-numbers-gutter {
    text-align: right;
    padding: 1rem 0.5rem 1rem 0.75rem;
    color: var(--text-muted);
    border-right: 1px solid var(--border-color);
    user-select: none;
    overflow: hidden;
    flex-shrink: 0;
    width: 3.5rem;
    background-color: rgba(0, 0, 0, 0.02);
}
.dark .line-numbers-gutter {
    background-color: rgba(255, 255, 255, 0.01);
}
.line-numbers-textarea {
    flex-grow: 1;
    height: 100% !important;
    padding: 1rem !important;
    resize: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ===== Mega Menu ===== */
.mega-menu-panel {
    background-color: var(--bg-surface-2);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 40;
}
.dark .mega-menu-panel {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Category heading */
.menu-category-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Active menu item link */
.menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.menu-item:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}
.dark .menu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
.menu-item.menu-item-active {
    color: #6366f1;
    background-color: rgba(99, 102, 241, 0.08);
}
.dark .menu-item.menu-item-active {
    color: #818cf8;
    background-color: rgba(99, 102, 241, 0.12);
}

/* Upcoming (disabled) item */
.menu-item-upcoming {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: default;
    opacity: 0.65;
}

/* "Soon" badge */
.soon-badge {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.12));
    color: #6366f1;
    line-height: 1.4;
}
.dark .soon-badge {
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.2));
    color: #a5b4fc;
}

/* Coming soon placeholder text */
.menu-coming-soon-text {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-muted);
    padding-left: 0.75rem;
    opacity: 0.7;
}

/* ===== Mobile Nav Accordion ===== */
.mobile-category-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    transition: background-color 0.15s ease;
}
.mobile-category-btn:hover {
    background-color: rgba(0, 0, 0, 0.04);
}
.dark .mobile-category-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
.mobile-category-items {
    padding-left: 1.25rem;
    padding-bottom: 0.25rem;
}
.mobile-category-items .menu-item,
.mobile-category-items .menu-item-upcoming {
    padding: 0.35rem 0.75rem;
}
/* Chevron rotation when open */
.mobile-category-btn.open .chevron-icon {
    transform: rotate(180deg);
}

