/* ==================== THEME ==================== */
:root {
    --bg: #0f172a; --card: #1e293b; --accent: #38bdf8; --accent2: #818cf8;
    --green: #4ade80; --red: #f87171; --text: #e2e8f0; --muted: #94a3b8;
    --border: #334155; --input-bg: #0f172a; --yellow: #fbbf24; --orange: #fb923c;
    --header-bg: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
[data-theme="light"] {
    --bg: #f1f5f9; --card: #ffffff; --accent: #0284c7; --accent2: #6366f1;
    --green: #16a34a; --red: #dc2626; --text: #1e293b; --muted: #64748b;
    --border: #cbd5e1; --input-bg: #f8fafc; --yellow: #d97706; --orange: #ea580c;
    --header-bg: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

/* ==================== BOTTOM NAV ==================== */
.bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: var(--card); border-top: 1px solid var(--border);
    padding: 0.4rem 0; padding-bottom: max(0.4rem, env(safe-area-inset-bottom));
}
.bottom-nav-inner {
    display: flex; justify-content: space-around; align-items: center; max-width: 500px; margin: 0 auto;
}
.bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
    text-decoration: none; color: var(--muted); font-size: 0.6rem; font-weight: 500;
    padding: 0.3rem 0.5rem; border-radius: 8px; transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a:hover { color: var(--accent); }

/* ==================== THEME TOGGLE ==================== */
.theme-toggle {
    background: none; border: 1px solid var(--border); border-radius: 8px;
    color: var(--muted); cursor: pointer; padding: 0.4rem; display: flex;
    align-items: center; justify-content: center; transition: all 0.15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ==================== MOBILE OVERRIDES ==================== */
@media (max-width: 768px) {
    .bottom-nav { display: block; }
    .desktop-nav { display: none !important; }
    body { padding-bottom: 4rem; }
}
@media (min-width: 769px) {
    .bottom-nav { display: none !important; }
}
