/* ============================================
   VSO BOOKING SYSTEM - MULTI-THEME SYSTEM
   5 Seasonal Themes with CSS Custom Properties
   ============================================ */

/* ============================================
   THEME 1: DARK COSMOS (Default/Original)
   Deep space purple with indigo accents
   ============================================ */
[data-theme="dark-cosmos"] {
    --bg-primary: #050508;
    --bg-secondary: #0a0a12;
    --bg-tertiary: #0f0f1a;
    --bg-card: #0d0d15;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #a855f7;
    --accent-cyan: #06b6d4;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4));
    --gradient-dark: linear-gradient(180deg, #0a0a12 0%, #050508 100%);
    --gradient-radial: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-light: rgba(255, 255, 255, 0.05);
    --glass-bg-medium: rgba(255, 255, 255, 0.08);
    --glass-bg-strong: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-light: rgba(255, 255, 255, 0.12);

    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --shadow-glow-lg: 0 0 80px rgba(99, 102, 241, 0.4);

    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.35);

    --ambient-1: #6366f1;
    --ambient-2: #8b5cf6;
    --ambient-3: #06b6d4;
    --navbar-bg: rgba(5, 5, 8, 0.8);
    --navbar-bg-scrolled: rgba(5, 5, 8, 0.95);
    --card-bg: linear-gradient(180deg, rgba(20, 20, 40, 0.98) 0%, rgba(15, 15, 30, 0.99) 50%, rgba(10, 10, 25, 1) 100%);
    --card-border: rgba(100, 100, 255, 0.2);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 40px rgba(99, 102, 241, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --input-bg: rgba(15, 15, 30, 0.95);
    --input-border: rgba(255, 255, 255, 0.15);
    --input-focus-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    --dropdown-bg: rgba(15, 15, 26, 0.98);
    --option-bg: #1a1a2e;
    --modal-bg: linear-gradient(180deg, rgba(20, 20, 40, 0.98), rgba(15, 15, 30, 0.99));

    /* Particle colors for JS */
    --particle-color-1: #6366f1;
    --particle-color-2: #8b5cf6;
    --particle-color-3: #a855f7;
    --particle-color-4: #06b6d4;
}

/* ============================================
   THEME 2: CHERRY BLOSSOM
   Soft pink / rose-gold on deep navy
   ============================================ */
[data-theme="cherry-blossom"] {
    --bg-primary: #0d0a14;
    --bg-secondary: #120e1c;
    --bg-tertiary: #171224;
    --bg-card: #110d1a;

    --accent-primary: #f472b6;
    --accent-secondary: #ec4899;
    --accent-tertiary: #f9a8d4;
    --accent-cyan: #fbbf24;

    --gradient-primary: linear-gradient(135deg, #ec4899 0%, #f472b6 50%, #f9a8d4 100%);
    --gradient-secondary: linear-gradient(135deg, #fbbf24 0%, #f472b6 100%);
    --gradient-glow: linear-gradient(135deg, rgba(236, 72, 153, 0.4), rgba(249, 168, 212, 0.4));
    --gradient-dark: linear-gradient(180deg, #120e1c 0%, #0d0a14 100%);
    --gradient-radial: radial-gradient(ellipse at center, rgba(236, 72, 153, 0.12) 0%, transparent 70%);

    --glass-bg: rgba(255, 200, 220, 0.03);
    --glass-bg-light: rgba(255, 200, 220, 0.05);
    --glass-bg-medium: rgba(255, 200, 220, 0.08);
    --glass-bg-strong: rgba(255, 200, 220, 0.12);
    --glass-border: rgba(255, 200, 220, 0.1);
    --glass-border-light: rgba(255, 200, 220, 0.15);

    --shadow-glow: 0 0 40px rgba(236, 72, 153, 0.25);
    --shadow-glow-lg: 0 0 80px rgba(236, 72, 153, 0.35);

    --text-primary: rgba(255, 240, 245, 0.95);
    --text-secondary: rgba(255, 220, 235, 0.7);
    --text-tertiary: rgba(255, 200, 220, 0.5);
    --text-muted: rgba(255, 180, 210, 0.35);

    --ambient-1: #ec4899;
    --ambient-2: #f9a8d4;
    --ambient-3: #fbbf24;
    --navbar-bg: rgba(13, 10, 20, 0.85);
    --navbar-bg-scrolled: rgba(13, 10, 20, 0.95);
    --card-bg: linear-gradient(180deg, rgba(25, 15, 30, 0.98) 0%, rgba(18, 12, 24, 0.99) 50%, rgba(13, 10, 20, 1) 100%);
    --card-border: rgba(236, 72, 153, 0.2);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 40px rgba(236, 72, 153, 0.08), inset 0 1px 0 rgba(255, 200, 220, 0.1);
    --input-bg: rgba(20, 12, 28, 0.95);
    --input-border: rgba(255, 200, 220, 0.15);
    --input-focus-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
    --dropdown-bg: rgba(18, 12, 24, 0.98);
    --option-bg: #1e1228;
    --modal-bg: linear-gradient(180deg, rgba(25, 15, 30, 0.98), rgba(18, 12, 24, 0.99));

    --particle-color-1: #fce7f3;
    --particle-color-2: #fbcfe8;
    --particle-color-3: #f9a8d4;
    --particle-color-4: #f472b6;
}

/* ============================================
   THEME 3: SPRING GARDEN
   Fresh greens, warm whites, nature gradients
   ============================================ */
[data-theme="spring-garden"] {
    --bg-primary: #050a08;
    --bg-secondary: #081210;
    --bg-tertiary: #0a1a14;
    --bg-card: #071510;

    --accent-primary: #10b981;
    --accent-secondary: #34d399;
    --accent-tertiary: #6ee7b7;
    --accent-cyan: #fbbf24;

    --gradient-primary: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
    --gradient-secondary: linear-gradient(135deg, #fbbf24 0%, #10b981 100%);
    --gradient-glow: linear-gradient(135deg, rgba(16, 185, 129, 0.4), rgba(52, 211, 153, 0.4));
    --gradient-dark: linear-gradient(180deg, #081210 0%, #050a08 100%);
    --gradient-radial: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.12) 0%, transparent 70%);

    --glass-bg: rgba(200, 255, 220, 0.03);
    --glass-bg-light: rgba(200, 255, 220, 0.05);
    --glass-bg-medium: rgba(200, 255, 220, 0.08);
    --glass-bg-strong: rgba(200, 255, 220, 0.12);
    --glass-border: rgba(200, 255, 220, 0.08);
    --glass-border-light: rgba(200, 255, 220, 0.12);

    --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.25);
    --shadow-glow-lg: 0 0 80px rgba(16, 185, 129, 0.35);

    --text-primary: rgba(240, 255, 245, 0.95);
    --text-secondary: rgba(220, 255, 235, 0.7);
    --text-tertiary: rgba(200, 255, 220, 0.5);
    --text-muted: rgba(180, 240, 200, 0.35);

    --ambient-1: #10b981;
    --ambient-2: #34d399;
    --ambient-3: #fbbf24;
    --navbar-bg: rgba(5, 10, 8, 0.85);
    --navbar-bg-scrolled: rgba(5, 10, 8, 0.95);
    --card-bg: linear-gradient(180deg, rgba(10, 25, 18, 0.98) 0%, rgba(8, 20, 15, 0.99) 50%, rgba(5, 15, 10, 1) 100%);
    --card-border: rgba(16, 185, 129, 0.2);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 40px rgba(16, 185, 129, 0.08), inset 0 1px 0 rgba(200, 255, 220, 0.1);
    --input-bg: rgba(8, 18, 14, 0.95);
    --input-border: rgba(200, 255, 220, 0.15);
    --input-focus-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    --dropdown-bg: rgba(8, 18, 14, 0.98);
    --option-bg: #0c1f18;
    --modal-bg: linear-gradient(180deg, rgba(10, 25, 18, 0.98), rgba(8, 20, 15, 0.99));

    --particle-color-1: #86efac;
    --particle-color-2: #6ee7b7;
    --particle-color-3: #34d399;
    --particle-color-4: #a7f3d0;
}

/* ============================================
   THEME 4: MORNING SUNRISE
   Warm amber, coral, golden-hour tones
   ============================================ */
[data-theme="morning-sunrise"] {
    --bg-primary: #0a0705;
    --bg-secondary: #120e09;
    --bg-tertiary: #1a140c;
    --bg-card: #15100a;

    --accent-primary: #f59e0b;
    --accent-secondary: #f97316;
    --accent-tertiary: #fbbf24;
    --accent-cyan: #fb923c;

    --gradient-primary: linear-gradient(135deg, #f97316 0%, #f59e0b 50%, #fbbf24 100%);
    --gradient-secondary: linear-gradient(135deg, #fb923c 0%, #f59e0b 100%);
    --gradient-glow: linear-gradient(135deg, rgba(245, 158, 11, 0.4), rgba(251, 191, 36, 0.4));
    --gradient-dark: linear-gradient(180deg, #120e09 0%, #0a0705 100%);
    --gradient-radial: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.12) 0%, transparent 70%);

    --glass-bg: rgba(255, 220, 180, 0.03);
    --glass-bg-light: rgba(255, 220, 180, 0.05);
    --glass-bg-medium: rgba(255, 220, 180, 0.08);
    --glass-bg-strong: rgba(255, 220, 180, 0.12);
    --glass-border: rgba(255, 220, 180, 0.1);
    --glass-border-light: rgba(255, 220, 180, 0.15);

    --shadow-glow: 0 0 40px rgba(245, 158, 11, 0.25);
    --shadow-glow-lg: 0 0 80px rgba(245, 158, 11, 0.35);

    --text-primary: rgba(255, 248, 235, 0.95);
    --text-secondary: rgba(255, 235, 210, 0.7);
    --text-tertiary: rgba(255, 220, 180, 0.5);
    --text-muted: rgba(255, 200, 160, 0.35);

    --ambient-1: #f59e0b;
    --ambient-2: #f97316;
    --ambient-3: #fb923c;
    --navbar-bg: rgba(10, 7, 5, 0.85);
    --navbar-bg-scrolled: rgba(10, 7, 5, 0.95);
    --card-bg: linear-gradient(180deg, rgba(26, 20, 12, 0.98) 0%, rgba(20, 16, 10, 0.99) 50%, rgba(15, 12, 8, 1) 100%);
    --card-border: rgba(245, 158, 11, 0.2);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 40px rgba(245, 158, 11, 0.08), inset 0 1px 0 rgba(255, 220, 180, 0.1);
    --input-bg: rgba(18, 14, 9, 0.95);
    --input-border: rgba(255, 220, 180, 0.15);
    --input-focus-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    --dropdown-bg: rgba(18, 14, 9, 0.98);
    --option-bg: #1f1810;
    --modal-bg: linear-gradient(180deg, rgba(26, 20, 12, 0.98), rgba(20, 16, 10, 0.99));

    --particle-color-1: #fde68a;
    --particle-color-2: #fcd34d;
    --particle-color-3: #fbbf24;
    --particle-color-4: #f59e0b;
}

/* ============================================
   THEME 5: MODERN MINIMAL
   Clean teal/lavender on sleek dark base
   ============================================ */
[data-theme="modern-minimal"] {
    --bg-primary: #080810;
    --bg-secondary: #0c0c18;
    --bg-tertiary: #101020;
    --bg-card: #0e0e1a;

    --accent-primary: #14b8a6;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #a78bfa;
    --accent-cyan: #67e8f9;

    --gradient-primary: linear-gradient(135deg, #14b8a6 0%, #0d9488 50%, #2dd4bf 100%);
    --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #14b8a6 100%);
    --gradient-glow: linear-gradient(135deg, rgba(20, 184, 166, 0.4), rgba(139, 92, 246, 0.4));
    --gradient-dark: linear-gradient(180deg, #0c0c18 0%, #080810 100%);
    --gradient-radial: radial-gradient(ellipse at center, rgba(20, 184, 166, 0.1) 0%, transparent 70%);

    --glass-bg: rgba(200, 240, 255, 0.025);
    --glass-bg-light: rgba(200, 240, 255, 0.04);
    --glass-bg-medium: rgba(200, 240, 255, 0.065);
    --glass-bg-strong: rgba(200, 240, 255, 0.1);
    --glass-border: rgba(200, 240, 255, 0.06);
    --glass-border-light: rgba(200, 240, 255, 0.1);

    --shadow-glow: 0 0 40px rgba(20, 184, 166, 0.2);
    --shadow-glow-lg: 0 0 80px rgba(20, 184, 166, 0.3);

    --text-primary: rgba(240, 250, 255, 0.95);
    --text-secondary: rgba(220, 240, 250, 0.65);
    --text-tertiary: rgba(200, 230, 245, 0.45);
    --text-muted: rgba(180, 220, 240, 0.3);

    --ambient-1: #14b8a6;
    --ambient-2: #8b5cf6;
    --ambient-3: #67e8f9;
    --navbar-bg: rgba(8, 8, 16, 0.85);
    --navbar-bg-scrolled: rgba(8, 8, 16, 0.95);
    --card-bg: linear-gradient(180deg, rgba(14, 14, 26, 0.98) 0%, rgba(12, 12, 22, 0.99) 50%, rgba(10, 10, 18, 1) 100%);
    --card-border: rgba(20, 184, 166, 0.15);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(200, 240, 255, 0.08);
    --input-bg: rgba(12, 12, 22, 0.95);
    --input-border: rgba(200, 240, 255, 0.12);
    --input-focus-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
    --dropdown-bg: rgba(12, 12, 22, 0.98);
    --option-bg: #141428;
    --modal-bg: linear-gradient(180deg, rgba(14, 14, 26, 0.98), rgba(12, 12, 22, 0.99));

    --particle-color-1: #5eead4;
    --particle-color-2: #2dd4bf;
    --particle-color-3: #a78bfa;
    --particle-color-4: #67e8f9;
}

/* ============================================
   THEME-AWARE OVERRIDES
   Apply new CSS variables to key components
   ============================================ */

/* Navbar uses theme variables */
body .navbar {
    background: var(--navbar-bg);
}

body .navbar.scrolled {
    background: var(--navbar-bg-scrolled);
}

/* Cards use theme bg */
body .room-card-inner {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    box-shadow: var(--card-shadow) !important;
}

/* Ambient lights follow theme */
body .ambient-light-1 {
    background: var(--ambient-1);
}

body .ambient-light-2 {
    background: var(--ambient-2);
}

body .ambient-light-3 {
    background: var(--ambient-3);
}

/* Modal follows theme */
body .modal-content.premium-modal,
body .modal-content {
    background: var(--modal-bg) !important;
}

/* Input fields follow theme */
body .search-field input,
body .search-field select {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
}

body .search-field input:focus,
body .search-field select:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: var(--input-focus-shadow) !important;
}

body select option {
    background: var(--option-bg) !important;
}

/* Stat cards follow theme */
body .stat-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
}

/* Dropdown follows theme */
body .user-dropdown {
    background: var(--dropdown-bg);
}

/* ============================================
   THEME SWITCHER UI
   ============================================ */
.theme-switcher-wrapper {
    position: relative;
    z-index: 10;
}

.theme-switcher-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    background: var(--glass-bg-medium);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.1rem;
    padding: 0;
}

.theme-switcher-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.theme-switcher-btn.active {
    border-color: var(--accent-primary);
    background: var(--glass-bg-strong);
}

.theme-dropdown {
    position: fixed;
    width: 280px;
    background: var(--dropdown-bg);
    backdrop-filter: var(--glass-blur-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all var(--transition-base);
    z-index: var(--z-dropdown);
    overflow: hidden;
    padding: 8px;
}

.theme-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.theme-dropdown-title {
    padding: 10px 14px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.theme-option:hover {
    background: var(--glass-bg-light);
}

.theme-option.active {
    background: var(--glass-bg-medium);
    border-color: var(--accent-primary);
}

.theme-option-preview {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.theme-option-preview .color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.theme-option-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.theme-option-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.theme-option-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.theme-option-check {
    margin-left: auto;
    color: var(--accent-primary);
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.theme-option.active .theme-option-check {
    opacity: 1;
}

/* ============================================
   SEASONAL PARTICLE CANVAS OVERLAY
   ============================================ */
#seasonal-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   THEME TRANSITION
   Smooth transition when switching themes
   ============================================ */
body.theme-transitioning,
body.theme-transitioning * {
    transition: background-color 0.6s ease,
                background 0.6s ease,
                border-color 0.6s ease,
                color 0.4s ease,
                box-shadow 0.6s ease !important;
}

/* ============================================
   MOBILE THEME SWITCHER
   ============================================ */
@media (max-width: 768px) {
    .theme-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        max-height: 60vh;
        overflow-y: auto;
        padding: 16px 16px calc(80px + env(safe-area-inset-bottom, 0px));
        z-index: 9999 !important;
        background: var(--dropdown-bg, rgba(15, 15, 20, 0.98));
        border: 1px solid var(--glass-border-light);
        box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    }

    .theme-dropdown.active {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .theme-option {
        padding: 14px;
    }

    .theme-dropdown-title {
        text-align: center;
        padding: 14px 14px 10px;
        font-size: 0.75rem;
    }

    /* Mobile backdrop */
    .theme-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--transition-base);
    }

    .theme-backdrop.active {
        opacity: 1;
        visibility: visible;
    }
}
