﻿/* ===========================
   CQI Workgroup - Design System
   =========================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Tokens */
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.6);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-glass-hover: rgba(255, 255, 255, 0.08);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-card: rgba(255, 255, 255, 0.08);

    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 16px 48px rgba(0, 0, 0, 0.4);

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --nav-height: 72px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===========================
   Background Effects
   =========================== */
.bg-effects {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #6366f1, transparent 70%);
    top: -200px;
    right: -100px;
    animation-duration: 25s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #06b6d4, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation-duration: 30s;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    top: 40%;
    left: 50%;
    animation-duration: 22s;
    animation-delay: -10s;
}

.orb-4 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #10b981, transparent 70%);
    bottom: 30%;
    right: 10%;
    animation-duration: 28s;
    animation-delay: -15s;
    opacity: 0.2;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 40px) scale(0.95); }
    75% { transform: translate(30px, 20px) scale(1.02); }
}

/* Particles */
.particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    animation: particle-rise linear infinite;
}

@keyframes particle-rise {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* ===========================
   Navbar
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    background: rgba(10, 14, 26, 0.7);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #fff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-sub {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-date, .nav-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-time {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-glass);
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    color: var(--accent-cyan);
    font-variant-numeric: tabular-nums;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(var(--nav-height) + 60px) clamp(1.5rem, 5vw, 4rem) 40px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.hero-badge i {
    color: #fbbf24;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, #818cf8, #6366f1, #a78bfa, #06b6d4);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 560px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 28px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 20px 28px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-number i {
    color: var(--accent-emerald);
    font-size: 1.4rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-card);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    width: 280px;
    height: 280px;
    flex-shrink: 0;
}

.visual-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid;
    inset: 0;
}

.ring-1 {
    border-color: rgba(99, 102, 241, 0.2);
    animation: spin 20s linear infinite;
}

.ring-2 {
    inset: 25px;
    border-color: rgba(6, 182, 212, 0.15);
    border-style: dashed;
    animation: spin 30s linear infinite reverse;
}

.ring-3 {
    inset: 50px;
    border-color: rgba(139, 92, 246, 0.25);
    animation: spin 15s linear infinite;
}

.visual-center {
    position: absolute;
    inset: 75px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 
        0 0 40px rgba(99, 102, 241, 0.15),
        inset 0 0 30px rgba(99, 102, 241, 0.1);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.15), inset 0 0 30px rgba(99, 102, 241, 0.1); }
    50% { box-shadow: 0 0 60px rgba(99, 102, 241, 0.25), inset 0 0 40px rgba(99, 102, 241, 0.15); }
}

/* ===========================
   Menu Section
   =========================== */
.menu-section {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px clamp(1.5rem, 5vw, 4rem) 80px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Menu Card */
.menu-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 28px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.menu-card:hover {
    transform: translateY(-6px);
    border-color: var(--card-from);
    box-shadow: 
        var(--shadow-card-hover),
        0 0 40px color-mix(in srgb, var(--card-from) 20%, transparent);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--card-from), var(--card-to));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.menu-card:hover .card-glow {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 1;
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--card-from), var(--card-to));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    margin-bottom: 18px;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--card-from) 30%, transparent);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-card:hover .card-icon {
    transform: scale(1.08);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--card-from) 40%, transparent);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.menu-card:hover .card-title {
    color: white;
}

.card-filename {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', var(--font-body);
}

.card-filename i {
    font-size: 0.65rem;
}

.card-arrow {
    position: absolute;
    top: 4px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.menu-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
    background: linear-gradient(135deg, var(--card-from), var(--card-to));
    color: white;
}

/* ===========================
   Empty State
   =========================== */
.empty-state {
    text-align: center;
    padding: 60px 30px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    border-radius: 24px;
    max-width: 600px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.empty-state code {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.empty-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.empty-hint code {
    background: rgba(251, 191, 36, 0.15);
    color: #fde68a;
}

/* ===========================
   Footer
   =========================== */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-subtle);
    background: rgba(10, 14, 26, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px clamp(1.5rem, 5vw, 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
}

.footer-logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.footer-meta code {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
}

/* ===========================
   Animations
   =========================== */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes fadeInUp {
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: calc(var(--nav-height) + 40px);
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-subtitle {
        max-width: 100%;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        width: 200px;
        height: 200px;
    }

    .visual-center {
        inset: 55px;
        font-size: 2rem;
    }

    .ring-2 { inset: 18px; }
    .ring-3 { inset: 36px; }

    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 600px) {
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

    .nav-date {
        display: none;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   Scrollbar
   =========================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* ===========================
   Selection
   =========================== */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}

/* ===========================
   Theme Menu Dropdown
   =========================== */

/* Wrapper */
.theme-menu {
    position: relative;
}

/* Trigger pill button */
.theme-menu-trigger {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px 5px 7px;
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    background: var(--bg-glass);
    color: var(--text-muted);
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.22s ease;
}

.theme-menu-trigger:hover {
    background: var(--bg-glass-hover);
    border-color: rgba(99,102,241,0.35);
    color: var(--text-primary);
}

/* Active color dot */
.tm-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: 1.5px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
    transition: background 0.3s ease;
    display: block;
}

.tm-palette-icon {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.tm-chevron {
    font-size: 0.6rem;
    opacity: 0.55;
    transition: transform 0.25s ease;
}

.theme-menu.open .tm-chevron {
    transform: rotate(180deg);
}

/* ---- Dropdown Panel ---- */
.theme-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    background: rgba(10, 14, 28, 0.96);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 16px;
    padding: 16px;
    box-shadow:
        0 24px 60px rgba(0,0,0,0.55),
        inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.97);
    transform-origin: top right;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 500;
}

.theme-menu.open .theme-menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Section label */
.tmp-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 10px 2px;
    opacity: 0.6;
}

/* Color dot row */
.tmp-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2px;
}

/* Individual dot button */
.tmp-dot-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    background: none;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.tmp-dot-btn span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.tmp-dot-btn:hover {
    transform: scale(1.2);
    border-color: rgba(255,255,255,0.5);
    z-index: 2;
}

.tmp-dot-btn.active {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.3);
    transform: scale(1.15);
}

/* Footer: custom + reset */
.tmp-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* Custom color label */
.tmp-custom {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.tmp-custom:hover {
    background: var(--bg-glass-hover);
    border-color: rgba(99,102,241,0.3);
    color: var(--text-primary);
}

.tmp-custom i {
    color: var(--accent-primary);
    font-size: 0.72rem;
}

.tmp-custom input[type="color"] {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

/* Reset button */
.tmp-reset {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-glass);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.tmp-reset:hover {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.25);
    color: #f87171;
}

/* ---- Light mode panel overrides ---- */
body.light-mode .theme-menu-trigger {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
    color: #475569;
}

body.light-mode .theme-menu-trigger:hover {
    background: rgba(99,102,241,0.07);
    border-color: rgba(99,102,241,0.2);
    color: #4f46e5;
}

body.light-mode .theme-menu-panel {
    background: rgba(255,255,255,0.97);
    border-color: rgba(99,102,241,0.12);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), inset 0 1px 0 rgba(0,0,0,0.03);
}

body.light-mode .tmp-label { color: #94a3b8; }

body.light-mode .tmp-footer {
    border-top-color: rgba(0,0,0,0.06);
}

body.light-mode .tmp-custom {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
    color: #475569;
}

body.light-mode .tmp-custom:hover {
    background: rgba(99,102,241,0.06);
    color: #4f46e5;
}

body.light-mode .tmp-reset {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
    color: #64748b;
}

body.light-mode .tmp-reset:hover {
    background: rgba(239,68,68,0.06);
    border-color: rgba(239,68,68,0.2);
    color: #dc2626;
}

/* ===========================
   Light Mode Overrides
   =========================== */
body.light-mode {
    --bg-primary: var(--user-bg, #f8fafc);
    --bg-secondary: rgba(255, 255, 255, 0.95);
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-glass: rgba(0, 0, 0, 0.03);
    --bg-glass-hover: rgba(0, 0, 0, 0.06);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-card: rgba(0, 0, 0, 0.1);

    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* Navbar - Light */
body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.8);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .brand-name {
    background: linear-gradient(135deg, #1e293b, #4338ca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .brand-sub {
    color: #64748b;
}

body.light-mode .nav-time {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
    color: #4f46e5;
}

body.light-mode .nav-date {
    color: #475569;
}

/* Hero - Light */
body.light-mode .hero-title {
    color: #0f172a;
}

body.light-mode .gradient-text {
    background: linear-gradient(135deg, #4f46e5, #6366f1, #7c3aed, #0891b2);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .hero-badge {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-color: rgba(99, 102, 241, 0.2);
    color: #4f46e5;
}

body.light-mode .hero-subtitle {
    color: #475569;
}

body.light-mode .hero-stats {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

body.light-mode .stat-number {
    color: #0f172a;
}

body.light-mode .stat-label {
    color: #64748b;
}

body.light-mode .stat-divider {
    background: rgba(0, 0, 0, 0.1);
}

/* Visual rings - Light */
body.light-mode .ring-1 {
    border-color: rgba(99, 102, 241, 0.15);
}

body.light-mode .ring-2 {
    border-color: rgba(6, 182, 212, 0.12);
}

body.light-mode .ring-3 {
    border-color: rgba(139, 92, 246, 0.18);
}

body.light-mode .visual-center {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12));
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.1);
}

/* Section - Light */
body.light-mode .section-title {
    color: #0f172a;
}

body.light-mode .section-subtitle {
    color: #64748b;
}

/* Cards - Light */
body.light-mode .menu-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

body.light-mode .menu-card:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

body.light-mode .card-title {
    color: #1e293b;
}

body.light-mode .menu-card:hover .card-title {
    color: #0f172a;
}

body.light-mode .card-filename {
    color: #94a3b8;
}

body.light-mode .card-arrow {
    background: rgba(0, 0, 0, 0.04);
    color: #94a3b8;
}

/* Orbs - Light (reduced opacity) */
body.light-mode .orb {
    opacity: 0.15;
}

body.light-mode .orb-4 {
    opacity: 0.08;
}

/* Grid Overlay - Light */
body.light-mode .grid-overlay {
    background-image:
        linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
}

/* Footer - Light */
body.light-mode .footer {
    background: rgba(255, 255, 255, 0.6);
    border-top-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .footer-brand {
    color: #1e293b;
}

body.light-mode .footer-text {
    color: #64748b;
}

body.light-mode .footer-meta {
    color: #94a3b8;
}

body.light-mode .footer-meta code {
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
}

/* Empty State - Light */
body.light-mode .empty-state {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(99, 102, 241, 0.2);
}

body.light-mode .empty-state h3 {
    color: #334155;
}

body.light-mode .empty-state p {
    color: #64748b;
}

body.light-mode .empty-state code {
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
}

body.light-mode .empty-hint {
    background: rgba(251, 191, 36, 0.06);
    border-color: rgba(251, 191, 36, 0.15);
    color: #b45309;
}

body.light-mode .empty-hint code {
    background: rgba(251, 191, 36, 0.1);
    color: #92400e;
}

/* Theme Panel - Light */
body.light-mode .theme-panel {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.15);
}

body.light-mode .theme-panel-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
    color: #1e293b;
}

body.light-mode .theme-group-label {
    color: #94a3b8;
}

body.light-mode .theme-panel-close {
    background: rgba(0, 0, 0, 0.04);
    color: #94a3b8;
}

body.light-mode .theme-panel-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1e293b;
}

body.light-mode .custom-color-label {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #475569;
}

body.light-mode .custom-color-label:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #1e293b;
}

body.light-mode .theme-reset {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #64748b;
}

body.light-mode .theme-reset:hover {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

/* Scrollbar - Light */
body.light-mode::-webkit-scrollbar-track {
    background: #f1f5f9;
}

body.light-mode::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
}

body.light-mode::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.35);
}

/* Selection - Light */
body.light-mode ::selection {
    background: rgba(99, 102, 241, 0.2);
    color: #1e293b;
}

/* ===========================
   Transition for theme change
   =========================== */
body.theme-transitioning,
body.theme-transitioning *,
body.theme-transitioning *::before,
body.theme-transitioning *::after {
    transition: background-color 0.4s ease,
                color 0.4s ease,
                border-color 0.4s ease,
                box-shadow 0.4s ease !important;
}

