/**
 * PEPPOL Theme System
 * Time-based theming with 13 phases
 * Include this CSS file and theme.js on any PEPPOL page
 */

/* ============================================
   CSS TRANSITIONS
   ============================================ */
:root {
    /* Transitions */
    --transition-fast: 0.15s;
    --transition-medium: 0.3s;
    --transition-slow: 0.5s;

    /* Constant accent colors (used by tool pages) */
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;

    /* Shadows */
    --shadow-float: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ============================================
   TIME-BASED THEMES (13 phases)
   ============================================ */

/* Pre-dawn: 4-5am - deep indigo */
[data-theme="pre-dawn"] {
    --bg-primary: #1e1b4b;
    --bg-secondary: #312e81;
    --bg-tertiary: #3730a3;
    --bg-card: rgba(49, 46, 129, 0.7);
    --bg-card-hover: rgba(67, 56, 202, 0.8);
    --bg-panel: rgba(49, 46, 129, 0.9);
    --bg-panel-solid: #312e81;
    --bg-hover: rgba(67, 56, 202, 0.4);
    --bg-input: rgba(30, 27, 75, 0.9);
    --text-primary: #e0e7ff;
    --text-secondary: #a5b4fc;
    --text-muted: #818cf8;
    --border-color: rgba(165, 180, 252, 0.15);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 60px rgba(99, 102, 241, 0.3);
    --gradient-bg: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%);
    --accent: #818cf8;
    --accent-rgb: 129, 140, 248;
    --nav-bg: rgba(49, 46, 129, 0.85);
}

/* Dawn: 5-6am - purple/violet sunrise */
[data-theme="dawn"] {
    --bg-primary: #4c1d95;
    --bg-secondary: #6d28d9;
    --bg-tertiary: #7c3aed;
    --bg-card: rgba(109, 40, 217, 0.6);
    --bg-card-hover: rgba(139, 92, 246, 0.7);
    --bg-panel: rgba(91, 33, 182, 0.9);
    --bg-panel-solid: #5b21b6;
    --bg-hover: rgba(139, 92, 246, 0.3);
    --bg-input: rgba(76, 29, 149, 0.9);
    --text-primary: #f5f3ff;
    --text-secondary: #ddd6fe;
    --text-muted: #c4b5fd;
    --border-color: rgba(221, 214, 254, 0.15);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 20px 60px rgba(139, 92, 246, 0.35);
    --gradient-bg: linear-gradient(135deg, #4c1d95 0%, #6d28d9 40%, #a855f7 100%);
    --accent: #a78bfa;
    --accent-rgb: 167, 139, 250;
    --nav-bg: rgba(91, 33, 182, 0.85);
}

/* First light: 5:30-6am - peachy coral transition */
[data-theme="first-light"] {
    --bg-primary: #fef2f2;
    --bg-secondary: #ffe4e6;
    --bg-tertiary: #fecdd3;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.85);
    --bg-panel: rgba(255, 241, 242, 0.9);
    --bg-panel-solid: #fff1f2;
    --bg-hover: rgba(254, 205, 211, 0.4);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #881337;
    --text-secondary: #be123c;
    --text-muted: #e11d48;
    --border-color: rgba(190, 18, 60, 0.1);
    --shadow-soft: 0 4px 24px rgba(225, 29, 72, 0.1);
    --shadow-hover: 0 20px 60px rgba(225, 29, 72, 0.2);
    --gradient-bg: linear-gradient(135deg, #fef2f2 0%, #ffe4e6 40%, #fecdd3 100%);
    --accent: #f43f5e;
    --accent-rgb: 244, 63, 94;
    --nav-bg: rgba(255, 241, 242, 0.8);
}

/* Sunrise: 6-7am - warm coral/orange glow */
[data-theme="sunrise"] {
    --bg-primary: #fff7ed;
    --bg-secondary: #ffedd5;
    --bg-tertiary: #fed7aa;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --bg-panel: rgba(255, 247, 237, 0.9);
    --bg-panel-solid: #fff7ed;
    --bg-hover: rgba(254, 215, 170, 0.4);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #9a3412;
    --text-secondary: #c2410c;
    --text-muted: #ea580c;
    --border-color: rgba(194, 65, 12, 0.1);
    --shadow-soft: 0 4px 24px rgba(234, 88, 12, 0.12);
    --shadow-hover: 0 20px 60px rgba(234, 88, 12, 0.2);
    --gradient-bg: linear-gradient(135deg, #fff7ed 0%, #ffedd5 40%, #fdba74 100%);
    --accent: #f97316;
    --accent-rgb: 249, 115, 22;
    --nav-bg: rgba(255, 247, 237, 0.8);
}

/* Early morning: 7-9am - soft pink/magenta */
[data-theme="early-morning"] {
    --bg-primary: #fdf4ff;
    --bg-secondary: #fae8ff;
    --bg-tertiary: #f5d0fe;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-panel-solid: #ffffff;
    --bg-hover: rgba(245, 208, 254, 0.4);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #701a75;
    --text-secondary: #a21caf;
    --text-muted: #d946ef;
    --border-color: rgba(162, 28, 175, 0.1);
    --shadow-soft: 0 4px 24px rgba(217, 70, 239, 0.1);
    --shadow-hover: 0 20px 60px rgba(217, 70, 239, 0.2);
    --gradient-bg: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 40%, #f5d0fe 100%);
    --accent: #e879f9;
    --accent-rgb: 232, 121, 249;
    --nav-bg: rgba(255, 255, 255, 0.75);
}

/* Morning: 9-10am - warm amber */
[data-theme="morning"] {
    --bg-primary: #fffbeb;
    --bg-secondary: #fef3c7;
    --bg-tertiary: #fde68a;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-panel-solid: #ffffff;
    --bg-hover: rgba(253, 230, 138, 0.4);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #78350f;
    --text-secondary: #92400e;
    --text-muted: #d97706;
    --border-color: rgba(180, 83, 9, 0.1);
    --shadow-soft: 0 4px 24px rgba(180, 83, 9, 0.08);
    --shadow-hover: 0 20px 60px rgba(180, 83, 9, 0.15);
    --gradient-bg: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
    --accent: #f59e0b;
    --accent-rgb: 245, 158, 11;
    --nav-bg: rgba(255, 255, 255, 0.75);
}

/* Late morning: 10am-12pm - bright yellow */
[data-theme="late-morning"] {
    --bg-primary: #fefce8;
    --bg-secondary: #fef9c3;
    --bg-tertiary: #fef08a;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-panel-solid: #ffffff;
    --bg-hover: rgba(254, 240, 138, 0.4);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #713f12;
    --text-secondary: #a16207;
    --text-muted: #ca8a04;
    --border-color: rgba(161, 98, 7, 0.1);
    --shadow-soft: 0 4px 24px rgba(202, 138, 4, 0.08);
    --shadow-hover: 0 20px 60px rgba(202, 138, 4, 0.12);
    --gradient-bg: linear-gradient(135deg, #fefce8 0%, #fef9c3 50%, #fef08a 100%);
    --accent: #eab308;
    --accent-rgb: 234, 179, 8;
    --nav-bg: rgba(255, 255, 255, 0.75);
}

/* High morning: 11am-12pm - soft lime/green */
[data-theme="high-morning"] {
    --bg-primary: #f7fee7;
    --bg-secondary: #ecfccb;
    --bg-tertiary: #d9f99d;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-panel-solid: #ffffff;
    --bg-hover: rgba(217, 249, 157, 0.4);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #365314;
    --text-secondary: #4d7c0f;
    --text-muted: #65a30d;
    --border-color: rgba(77, 124, 15, 0.1);
    --shadow-soft: 0 4px 24px rgba(101, 163, 13, 0.08);
    --shadow-hover: 0 20px 60px rgba(101, 163, 13, 0.12);
    --gradient-bg: linear-gradient(135deg, #f7fee7 0%, #ecfccb 50%, #d9f99d 100%);
    --accent: #84cc16;
    --accent-rgb: 132, 204, 22;
    --nav-bg: rgba(255, 255, 255, 0.75);
}

/* Midday: 12-1pm - bright sky blue */
[data-theme="midday"] {
    --bg-primary: #f0f9ff;
    --bg-secondary: #e0f2fe;
    --bg-tertiary: #bae6fd;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-panel-solid: #ffffff;
    --bg-hover: rgba(186, 230, 253, 0.4);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #0c4a6e;
    --text-secondary: #0369a1;
    --text-muted: #0ea5e9;
    --border-color: rgba(3, 105, 161, 0.1);
    --shadow-soft: 0 4px 24px rgba(3, 105, 161, 0.08);
    --shadow-hover: 0 20px 60px rgba(3, 105, 161, 0.15);
    --gradient-bg: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
    --accent: #0ea5e9;
    --accent-rgb: 14, 165, 233;
    --nav-bg: rgba(255, 255, 255, 0.75);
}

/* Early afternoon: 1-2pm - soft teal transition */
[data-theme="early-afternoon"] {
    --bg-primary: #f0fdfa;
    --bg-secondary: #ccfbf1;
    --bg-tertiary: #99f6e4;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-panel-solid: #ffffff;
    --bg-hover: rgba(153, 246, 228, 0.4);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #134e4a;
    --text-secondary: #0f766e;
    --text-muted: #14b8a6;
    --border-color: rgba(15, 118, 110, 0.1);
    --shadow-soft: 0 4px 24px rgba(20, 184, 166, 0.08);
    --shadow-hover: 0 20px 60px rgba(20, 184, 166, 0.15);
    --gradient-bg: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 50%, #99f6e4 100%);
    --accent: #14b8a6;
    --accent-rgb: 20, 184, 166;
    --nav-bg: rgba(255, 255, 255, 0.75);
}

/* Afternoon: 2-4pm - cyan/teal */
[data-theme="afternoon"] {
    --bg-primary: #ecfeff;
    --bg-secondary: #cffafe;
    --bg-tertiary: #a5f3fc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-panel-solid: #ffffff;
    --bg-hover: rgba(165, 243, 252, 0.4);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #164e63;
    --text-secondary: #0e7490;
    --text-muted: #06b6d4;
    --border-color: rgba(14, 116, 144, 0.1);
    --shadow-soft: 0 4px 24px rgba(6, 182, 212, 0.08);
    --shadow-hover: 0 20px 60px rgba(6, 182, 212, 0.15);
    --gradient-bg: linear-gradient(135deg, #ecfeff 0%, #cffafe 50%, #a5f3fc 100%);
    --accent: #06b6d4;
    --accent-rgb: 6, 182, 212;
    --nav-bg: rgba(255, 255, 255, 0.75);
}

/* Late afternoon: 4-5pm - warm emerald transition */
[data-theme="late-afternoon"] {
    --bg-primary: #ecfdf5;
    --bg-secondary: #d1fae5;
    --bg-tertiary: #a7f3d0;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-panel-solid: #ffffff;
    --bg-hover: rgba(167, 243, 208, 0.4);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #065f46;
    --text-secondary: #047857;
    --text-muted: #10b981;
    --border-color: rgba(4, 120, 87, 0.1);
    --shadow-soft: 0 4px 24px rgba(16, 185, 129, 0.08);
    --shadow-hover: 0 20px 60px rgba(16, 185, 129, 0.15);
    --gradient-bg: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
    --accent: #10b981;
    --accent-rgb: 16, 185, 129;
    --nav-bg: rgba(255, 255, 255, 0.75);
}

/* Golden hour: 5-6pm - warm orange */
[data-theme="golden-hour"] {
    --bg-primary: #fff7ed;
    --bg-secondary: #ffedd5;
    --bg-tertiary: #fed7aa;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-panel-solid: #ffffff;
    --bg-hover: rgba(254, 215, 170, 0.4);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #7c2d12;
    --text-secondary: #c2410c;
    --text-muted: #ea580c;
    --border-color: rgba(194, 65, 12, 0.1);
    --shadow-soft: 0 4px 24px rgba(234, 88, 12, 0.1);
    --shadow-hover: 0 20px 60px rgba(234, 88, 12, 0.2);
    --gradient-bg: linear-gradient(135deg, #fff7ed 0%, #ffedd5 40%, #fed7aa 100%);
    --accent: #f97316;
    --accent-rgb: 249, 115, 22;
    --nav-bg: rgba(255, 255, 255, 0.75);
}

/* Sunset: 6-7pm - intense warm red/orange */
[data-theme="sunset"] {
    --bg-primary: #fef2f2;
    --bg-secondary: #fecaca;
    --bg-tertiary: #fca5a5;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.85);
    --bg-panel: rgba(255, 242, 242, 0.9);
    --bg-panel-solid: #fef2f2;
    --bg-hover: rgba(252, 165, 165, 0.4);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #991b1b;
    --text-secondary: #b91c1c;
    --text-muted: #dc2626;
    --border-color: rgba(185, 28, 28, 0.1);
    --shadow-soft: 0 4px 24px rgba(220, 38, 38, 0.12);
    --shadow-hover: 0 20px 60px rgba(220, 38, 38, 0.2);
    --gradient-bg: linear-gradient(135deg, #fef2f2 0%, #fecaca 40%, #f87171 100%);
    --accent: #ef4444;
    --accent-rgb: 239, 68, 68;
    --nav-bg: rgba(255, 242, 242, 0.8);
}

/* Blue hour: 7-7:30pm - magical deep blue */
[data-theme="blue-hour"] {
    --bg-primary: #1e3a5f;
    --bg-secondary: #1e40af;
    --bg-tertiary: #2563eb;
    --bg-card: rgba(30, 64, 175, 0.6);
    --bg-card-hover: rgba(37, 99, 235, 0.7);
    --bg-panel: rgba(30, 58, 95, 0.9);
    --bg-panel-solid: #1e3a5f;
    --bg-hover: rgba(37, 99, 235, 0.3);
    --bg-input: rgba(30, 58, 95, 0.9);
    --text-primary: #dbeafe;
    --text-secondary: #93c5fd;
    --text-muted: #60a5fa;
    --border-color: rgba(147, 197, 253, 0.15);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 20px 60px rgba(96, 165, 250, 0.3);
    --gradient-bg: linear-gradient(135deg, #1e3a5f 0%, #1e40af 50%, #3b82f6 100%);
    --accent: #60a5fa;
    --accent-rgb: 96, 165, 250;
    --nav-bg: rgba(30, 58, 95, 0.85);
}

/* Dusk: 7:30-8pm - pink/rose */
[data-theme="dusk"] {
    --bg-primary: #fdf2f8;
    --bg-secondary: #fce7f3;
    --bg-tertiary: #fbcfe8;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-panel-solid: #ffffff;
    --bg-hover: rgba(251, 207, 232, 0.4);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #831843;
    --text-secondary: #9d174d;
    --text-muted: #db2777;
    --border-color: rgba(157, 23, 77, 0.1);
    --shadow-soft: 0 4px 24px rgba(157, 23, 77, 0.08);
    --shadow-hover: 0 20px 60px rgba(157, 23, 77, 0.15);
    --gradient-bg: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #fbcfe8 100%);
    --accent: #ec4899;
    --accent-rgb: 236, 72, 153;
    --nav-bg: rgba(255, 255, 255, 0.75);
}

/* Evening: 8-9pm - deep fuchsia */
[data-theme="evening"] {
    --bg-primary: #4a044e;
    --bg-secondary: #701a75;
    --bg-tertiary: #86198f;
    --bg-card: rgba(112, 26, 117, 0.7);
    --bg-card-hover: rgba(162, 28, 175, 0.7);
    --bg-panel: rgba(112, 26, 117, 0.9);
    --bg-panel-solid: #701a75;
    --bg-hover: rgba(162, 28, 175, 0.3);
    --bg-input: rgba(74, 4, 78, 0.9);
    --text-primary: #fdf4ff;
    --text-secondary: #f5d0fe;
    --text-muted: #e879f9;
    --border-color: rgba(245, 208, 254, 0.15);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 20px 60px rgba(232, 121, 249, 0.25);
    --gradient-bg: linear-gradient(135deg, #4a044e 0%, #701a75 50%, #86198f 100%);
    --accent: #e879f9;
    --accent-rgb: 232, 121, 249;
    --nav-bg: rgba(112, 26, 117, 0.85);
}

/* Late evening: 9-10pm - violet */
[data-theme="late-evening"] {
    --bg-primary: #2e1065;
    --bg-secondary: #4c1d95;
    --bg-tertiary: #5b21b6;
    --bg-card: rgba(76, 29, 149, 0.7);
    --bg-card-hover: rgba(109, 40, 217, 0.7);
    --bg-panel: rgba(76, 29, 149, 0.9);
    --bg-panel-solid: #4c1d95;
    --bg-hover: rgba(109, 40, 217, 0.3);
    --bg-input: rgba(46, 16, 101, 0.9);
    --text-primary: #f5f3ff;
    --text-secondary: #ddd6fe;
    --text-muted: #a78bfa;
    --border-color: rgba(221, 214, 254, 0.12);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 60px rgba(167, 139, 250, 0.25);
    --gradient-bg: linear-gradient(135deg, #2e1065 0%, #4c1d95 50%, #5b21b6 100%);
    --accent: #a78bfa;
    --accent-rgb: 167, 139, 250;
    --nav-bg: rgba(76, 29, 149, 0.85);
}

/* Night: 10pm-12am - deep blue night */
[data-theme="night"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-card-hover: rgba(51, 65, 85, 0.9);
    --bg-panel: rgba(30, 41, 59, 0.9);
    --bg-panel-solid: #1e293b;
    --bg-hover: rgba(51, 65, 85, 0.4);
    --bg-input: rgba(15, 23, 42, 0.9);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.1);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.4);
    --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --accent: #818cf8;
    --accent-rgb: 129, 140, 248;
    --nav-bg: rgba(30, 41, 59, 0.85);
}

/* Late night: 12-2am - darker blue */
[data-theme="late-night"] {
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --bg-card: rgba(15, 23, 42, 0.9);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --bg-panel: rgba(15, 23, 42, 0.9);
    --bg-panel-solid: #0f172a;
    --bg-hover: rgba(30, 41, 59, 0.4);
    --bg-input: rgba(2, 6, 23, 0.9);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #94a3b8;
    --border-color: rgba(100, 116, 139, 0.1);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.5);
    --gradient-bg: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e293b 100%);
    --accent: #6366f1;
    --accent-rgb: 99, 102, 241;
    --nav-bg: rgba(15, 23, 42, 0.85);
}

/* Deep night: 2-4am - darkest */
[data-theme="deep-night"] {
    --bg-primary: #030712;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --bg-card: rgba(17, 24, 39, 0.9);
    --bg-card-hover: rgba(31, 41, 55, 0.9);
    --bg-panel: rgba(17, 24, 39, 0.9);
    --bg-panel-solid: #111827;
    --bg-hover: rgba(31, 41, 55, 0.4);
    --bg-input: rgba(3, 7, 18, 0.9);
    --text-primary: #d1d5db;
    --text-secondary: #9ca3af;
    --text-muted: #9ca3af;
    --border-color: rgba(75, 85, 99, 0.15);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.6);
    --gradient-bg: linear-gradient(135deg, #030712 0%, #111827 50%, #1f2937 100%);
    --accent: #4f46e5;
    --accent-rgb: 79, 70, 229;
    --nav-bg: rgba(17, 24, 39, 0.85);
}

/* ============================================
   COMPATIBILITY VARIABLES
   Map old variable names for existing page styles
   ============================================ */
[data-theme] {
    --bg-canvas: var(--bg-secondary);
    --shadow-float: var(--shadow-soft);
    --shadow-card: var(--shadow-soft);
}

/* ============================================
   WEATHER OVERLAYS
   ============================================ */
body.peppol-themed::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -2; /* Behind clouds at z-index: -1 */
    transition: background var(--transition-slow) ease;
}

/* Clear/sunny daytime - warm orange/yellow overlay */
[data-weather="clear"] body.peppol-themed::before {
    background: linear-gradient(135deg,
        rgba(255, 180, 50, 0.15) 0%,
        rgba(255, 140, 0, 0.1) 50%,
        rgba(255, 200, 100, 0.12) 100%);
}

/* Clear night - no overlay */
[data-theme="evening"][data-weather="clear"] body.peppol-themed::before,
[data-theme="late-evening"][data-weather="clear"] body.peppol-themed::before,
[data-theme="night"][data-weather="clear"] body.peppol-themed::before,
[data-theme="late-night"][data-weather="clear"] body.peppol-themed::before,
[data-theme="deep-night"][data-weather="clear"] body.peppol-themed::before,
[data-theme="pre-dawn"][data-weather="clear"] body.peppol-themed::before,
[data-theme="dawn"][data-weather="clear"] body.peppol-themed::before {
    background: none;
}

/* Overcast/cloudy - grey/cool overlay */
[data-weather="overcast"] body.peppol-themed::before {
    background: rgba(150, 160, 170, 0.2);
}
[data-weather="overcast"] body.peppol-themed {
    --bg-card: rgba(128, 128, 128, 0.15);
}

/* Rain - blue/grey overlay */
[data-weather="rain"] body.peppol-themed::before {
    background: linear-gradient(135deg,
        rgba(100, 130, 180, 0.2) 0%,
        rgba(80, 100, 140, 0.15) 100%);
}
[data-weather="rain"] body.peppol-themed {
    --bg-card: rgba(100, 116, 139, 0.2);
}

/* Snow - white/blue overlay */
[data-weather="snow"] body.peppol-themed::before {
    background: linear-gradient(135deg,
        rgba(220, 230, 255, 0.25) 0%,
        rgba(200, 215, 240, 0.2) 100%);
}
[data-weather="snow"] body.peppol-themed {
    --bg-card: rgba(241, 245, 249, 0.25);
}

/* Storm - dark blue/grey overlay */
[data-weather="storm"] body.peppol-themed::before {
    background: linear-gradient(135deg,
        rgba(50, 60, 80, 0.3) 0%,
        rgba(40, 50, 70, 0.25) 100%);
}
[data-weather="storm"] body.peppol-themed {
    --bg-card: rgba(51, 65, 85, 0.3);
}

/* Foggy - grey haze overlay */
[data-weather="fog"] body.peppol-themed::before {
    background: rgba(180, 185, 190, 0.25);
}
[data-weather="fog"] body.peppol-themed {
    --bg-card: rgba(148, 163, 184, 0.2);
}

/* ============================================
   THEME BODY STYLES
   ============================================ */
body.peppol-themed {
    background: var(--gradient-bg);
    background-attachment: fixed;
    transition: background var(--transition-slow) ease, color var(--transition-medium) ease;
}

/* ============================================
   WEATHER OVERLAYS
   Applied via data-weather attribute on <html>
   ============================================ */
body.peppol-themed::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -2; /* Behind clouds at z-index: -1 */
    transition: background var(--transition-slow) ease;
}

/* Clear/sunny daytime - warm orange/yellow overlay */
html[data-weather="clear"] body.peppol-themed::before {
    background: linear-gradient(135deg,
        rgba(255, 180, 50, 0.15) 0%,
        rgba(255, 140, 0, 0.1) 50%,
        rgba(255, 200, 100, 0.12) 100%);
}

/* Clear night - no overlay */
html[data-theme="evening"][data-weather="clear"] body.peppol-themed::before,
html[data-theme="late-evening"][data-weather="clear"] body.peppol-themed::before,
html[data-theme="night"][data-weather="clear"] body.peppol-themed::before,
html[data-theme="late-night"][data-weather="clear"] body.peppol-themed::before,
html[data-theme="deep-night"][data-weather="clear"] body.peppol-themed::before,
html[data-theme="pre-dawn"][data-weather="clear"] body.peppol-themed::before,
html[data-theme="dawn"][data-weather="clear"] body.peppol-themed::before {
    background: none;
}

/* Overcast/cloudy - grey/cool overlay with desaturation */
html[data-weather="overcast"] body.peppol-themed::before {
    background: rgba(150, 160, 170, 0.25);
}
html[data-weather="overcast"] body.peppol-themed {
    --bg-card: rgba(128, 128, 128, 0.15);
}

/* Rain - blue/grey overlay */
html[data-weather="rain"] body.peppol-themed::before {
    background: linear-gradient(135deg,
        rgba(100, 130, 180, 0.25) 0%,
        rgba(80, 100, 140, 0.2) 100%);
}
html[data-weather="rain"] body.peppol-themed {
    --bg-card: rgba(100, 116, 139, 0.2);
}

/* Snow - white/blue overlay */
html[data-weather="snow"] body.peppol-themed::before {
    background: linear-gradient(135deg,
        rgba(220, 230, 255, 0.3) 0%,
        rgba(200, 215, 240, 0.25) 100%);
}
html[data-weather="snow"] body.peppol-themed {
    --bg-card: rgba(241, 245, 249, 0.25);
}

/* Storm - dark blue/grey overlay */
html[data-weather="storm"] body.peppol-themed::before {
    background: linear-gradient(135deg,
        rgba(50, 60, 80, 0.35) 0%,
        rgba(40, 50, 70, 0.3) 100%);
}
html[data-weather="storm"] body.peppol-themed {
    --bg-card: rgba(51, 65, 85, 0.3);
}

/* Foggy - grey haze overlay */
html[data-weather="fog"] body.peppol-themed::before {
    background: rgba(180, 185, 190, 0.3);
}
html[data-weather="fog"] body.peppol-themed {
    --bg-card: rgba(148, 163, 184, 0.2);
}

/* ============================================
   NAV MENU THEME OVERRIDES
   ============================================ */

/* Logo - simple text color like /peppol main */
body.peppol-themed .nav-logo {
    color: var(--text-primary);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

body.peppol-themed .nav-menu {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

body.peppol-themed .nav-menu a {
    color: var(--text-secondary);
}

/* Override gradient to match /peppol main page */
body.peppol-themed .nav-menu a::before {
    background: linear-gradient(135deg, var(--accent), var(--text-muted)) !important;
}

body.peppol-themed .nav-menu a:hover {
    color: white !important;
}

body.peppol-themed .nav-menu a.active {
    color: white !important;
}

/* Dropdown toggle styling */
body.peppol-themed .nav-dropdown-toggle {
    color: var(--text-secondary);
}

body.peppol-themed .nav-dropdown-toggle::before {
    background: linear-gradient(135deg, var(--accent), var(--text-muted)) !important;
}

body.peppol-themed .nav-dropdown-toggle:hover {
    color: white !important;
}

/* Dropdown menu - use theme colors */
body.peppol-themed .nav-dropdown-menu {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: var(--shadow-soft);
}

body.peppol-themed .nav-dropdown-menu a {
    color: var(--text-secondary);
}

body.peppol-themed .nav-dropdown-menu a::before {
    background: linear-gradient(135deg, var(--accent), var(--text-muted)) !important;
}

body.peppol-themed .nav-dropdown-menu a:hover {
    color: white !important;
}

body.peppol-themed .theme-toggle {
    background: var(--nav-bg);
}

body.peppol-themed .theme-toggle svg {
    fill: var(--text-secondary);
}

body.peppol-themed .theme-toggle:hover svg {
    fill: var(--accent);
}

/* ============================================
   BUTTON THEME OVERRIDES
   ============================================ */

/* Validate button (validator page) */
body.peppol-themed .validate-btn {
    background: linear-gradient(135deg, var(--accent), var(--text-muted)) !important;
}

body.peppol-themed .validate-btn:hover:not(:disabled) {
    box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.4) !important;
}

/* Search button (lookup page) */
body.peppol-themed .search-btn {
    background: var(--accent) !important;
}

body.peppol-themed .search-btn:hover:not(:disabled) {
    background: var(--text-primary) !important;
}

/* Generic primary buttons */
body.peppol-themed .btn-primary,
body.peppol-themed button[type="submit"]:not(.nav-dropdown-toggle) {
    background: linear-gradient(135deg, var(--accent), var(--text-muted));
}

/* ============================================
   TIME INFO CONTAINER (Bottom Left)
   ============================================ */
.peppol-time-info {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: var(--nav-bg, rgba(0, 0, 0, 0.5));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    z-index: 1000;
    transition: all var(--transition-medium) ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
    user-select: none;
    min-width: 320px;
}

.peppol-time-info > span {
    display: inline-flex;
    align-items: center;
}

.peppol-time-info:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.peppol-time-info .time-display {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.peppol-time-info .time-separator {
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
    opacity: 0.5;
}

.peppol-time-info .weather-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* SVG Weather Icons (matching /peppol main page) */
.peppol-time-info .weather-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.peppol-time-info .weather-icon svg {
    width: 20px;
    height: 20px;
}

.peppol-time-info .weather-icon.sunny svg { fill: #f59e0b; }
.peppol-time-info .weather-icon.cloudy svg { fill: #94a3b8; }
.peppol-time-info .weather-icon.rain svg { fill: #3b82f6; }
.peppol-time-info .weather-icon.snow svg { fill: #94a3b8; }
.peppol-time-info .weather-icon.storm svg { fill: #6366f1; }
.peppol-time-info .weather-icon.night svg { fill: #818cf8; }

.peppol-time-info .weather-temp {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.peppol-time-info .weather-temp .unit {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.peppol-time-info .greeting-text {
    font-weight: 500;
    color: var(--text-secondary);
    transition: opacity 0.3s ease;
    flex: 1;
    text-align: right;
}

/* Expanded State */
.peppol-time-info.expanded {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 16px;
    padding: 16px 20px;
    min-width: 280px;
}

.peppol-time-info.expanded > .time-display {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.peppol-time-info.expanded > .time-separator,
.peppol-time-info.expanded > .weather-info,
.peppol-time-info.expanded > .weather-separator,
.peppol-time-info.expanded > .greeting-text {
    display: none !important;
}

.peppol-time-info.expanded .peppol-time-expanded {
    display: block;
}

/* Expanded Panel */
.peppol-time-expanded {
    display: none;
    width: 100%;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border-color);
}

.peppol-time-expanded .expanded-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    gap: 24px;
}

.peppol-time-expanded .expanded-row.weather-row {
    justify-content: flex-start;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

.peppol-time-expanded .weather-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.peppol-time-expanded .weather-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.peppol-time-expanded .weather-icon svg {
    width: 32px;
    height: 32px;
}

.peppol-time-expanded .weather-icon.sunny svg { fill: #f59e0b; }
.peppol-time-expanded .weather-icon.cloudy svg { fill: #94a3b8; }
.peppol-time-expanded .weather-icon.rain svg { fill: #3b82f6; }
.peppol-time-expanded .weather-icon.snow svg { fill: #94a3b8; }
.peppol-time-expanded .weather-icon.storm svg { fill: #6366f1; }
.peppol-time-expanded .weather-icon.night svg { fill: #818cf8; }

.peppol-time-expanded .weather-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.peppol-time-expanded .weather-temp {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.peppol-time-expanded .weather-temp .unit {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.peppol-time-expanded .weather-condition {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.peppol-time-expanded .expanded-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.peppol-time-expanded .expanded-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: right;
}

.peppol-time-expanded .expanded-location {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--border-color);
}

/* Hover hint */
.peppol-time-info::after {
    content: 'Click for details';
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
}

.peppol-time-info:hover::after {
    opacity: 0.6;
    transform: translateX(-50%) translateY(0);
}

.peppol-time-info.expanded::after {
    display: none;
}

/* Responsive */
@media (max-width: 480px) {
    .peppol-time-info {
        padding: 10px 14px;
        gap: 12px;
        bottom: 12px;
        left: 12px;
        min-width: auto;
        max-width: calc(100vw - 24px);
    }

    .peppol-time-info .greeting-text {
        display: none;
    }

    .peppol-time-info::after {
        display: none;
    }

    .peppol-time-info.expanded {
        min-width: auto;
    }
}

/* ============================================
   WATER RIPPLE CANVAS
   ============================================ */
#peppol-ripple-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

/* ============================================
   EFFECTS CONTAINER (Seasonal Particles)
   ============================================ */
.peppol-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* Snowflakes */
.peppol-effects .snowflake {
    position: absolute;
    top: -20px;
    color: var(--text-muted);
    font-size: 1rem;
    animation: peppol-fall linear infinite;
    opacity: 0.3;
}

@keyframes peppol-fall {
    0% { transform: translateY(-20px) rotate(0deg); }
    100% { transform: translateY(100vh) rotate(360deg); }
}

/* Hearts */
.peppol-effects .heart {
    position: absolute;
    top: -20px;
    color: #f472b6;
    font-size: 0.8rem;
    animation: peppol-floatDown linear infinite;
    opacity: 0.4;
}

@keyframes peppol-floatDown {
    0% { transform: translateY(-20px) scale(1); }
    50% { transform: translateY(50vh) scale(1.1); }
    100% { transform: translateY(100vh) scale(0.9); }
}

/* Autumn Leaves */
.peppol-effects .leaf {
    position: absolute;
    top: -30px;
    width: 20px;
    height: 20px;
    animation: peppol-leafFall linear infinite;
    opacity: 0.6;
}

.peppol-effects .leaf svg {
    width: 100%;
    height: 100%;
}

@keyframes peppol-leafFall {
    0% { transform: translateY(-30px) rotate(0deg) translateX(0); }
    25% { transform: translateY(25vh) rotate(90deg) translateX(20px); }
    50% { transform: translateY(50vh) rotate(180deg) translateX(-20px); }
    75% { transform: translateY(75vh) rotate(270deg) translateX(20px); }
    100% { transform: translateY(100vh) rotate(360deg) translateX(0); }
}

/* Spring Cherry Blossoms */
.peppol-effects .blossom {
    position: absolute;
    top: -20px;
    width: 16px;
    height: 16px;
    animation: peppol-blossomFall ease-in-out infinite;
    opacity: 0.7;
    transform-style: preserve-3d;
    backface-visibility: visible;
}

.peppol-effects .blossom svg {
    width: 100%;
    height: 100%;
}

@keyframes peppol-blossomFall {
    0% {
        transform: translateY(-20px) rotate(0deg) translateX(0) rotateX(0deg) rotateY(0deg);
        opacity: 0;
    }
    3% {
        opacity: 0.85;
    }
    8% {
        transform: translateY(5vh) rotate(25deg) translateX(15px) rotateX(45deg) rotateY(20deg);
    }
    16% {
        transform: translateY(12vh) rotate(55deg) translateX(-10px) rotateX(90deg) rotateY(-15deg);
    }
    24% {
        transform: translateY(20vh) rotate(90deg) translateX(25px) rotateX(135deg) rotateY(30deg);
    }
    32% {
        transform: translateY(28vh) rotate(120deg) translateX(-20px) rotateX(180deg) rotateY(-25deg);
    }
    40% {
        transform: translateY(36vh) rotate(155deg) translateX(18px) rotateX(225deg) rotateY(35deg);
    }
    48% {
        transform: translateY(44vh) rotate(185deg) translateX(-12px) rotateX(270deg) rotateY(-20deg);
    }
    56% {
        transform: translateY(52vh) rotate(220deg) translateX(22px) rotateX(315deg) rotateY(40deg);
    }
    64% {
        transform: translateY(60vh) rotate(250deg) translateX(-18px) rotateX(360deg) rotateY(-30deg);
    }
    72% {
        transform: translateY(68vh) rotate(285deg) translateX(14px) rotateX(405deg) rotateY(25deg);
    }
    80% {
        transform: translateY(76vh) rotate(315deg) translateX(-8px) rotateX(450deg) rotateY(-15deg);
    }
    88% {
        transform: translateY(84vh) rotate(340deg) translateX(10px) rotateX(495deg) rotateY(20deg);
        opacity: 0.75;
    }
    94% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) translateX(-5px) rotateX(540deg) rotateY(0deg);
        opacity: 0;
    }
}

/* Summer Butterflies */
.peppol-effects .butterfly {
    position: absolute;
    top: -30px;
    width: 24px;
    height: 24px;
    animation: peppol-butterflyFloat linear infinite;
    opacity: 0.5;
}

.peppol-effects .butterfly svg {
    width: 100%;
    height: 100%;
}

@keyframes peppol-butterflyFloat {
    0% { transform: translateY(-30px) translateX(0) scale(1); }
    25% { transform: translateY(20vh) translateX(50px) scale(1.1); }
    50% { transform: translateY(40vh) translateX(-30px) scale(0.9); }
    75% { transform: translateY(70vh) translateX(40px) scale(1.05); }
    100% { transform: translateY(100vh) translateX(0) scale(1); }
}

/* ===== FIREFLIES (night only) ===== */
.peppol-effects .firefly {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fcd34d;
    border-radius: 50%;
    box-shadow: 0 0 3px 1px rgba(252, 211, 77, 0.5);
    animation: fireflyFloat 8s ease-in-out infinite, fireflyGlow 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes fireflyFloat {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(15px, -12px);
    }
    50% {
        transform: translate(-10px, -25px);
    }
    75% {
        transform: translate(20px, -8px);
    }
}

@keyframes fireflyGlow {
    0%, 100% {
        opacity: 0;
    }
    40%, 60% {
        opacity: 0.7;
        box-shadow: 0 0 4px 2px rgba(252, 211, 77, 0.6);
    }
}

/* ===== DANDELION SEEDS (spring) ===== */
.peppol-effects .dandelion-seed {
    position: absolute;
    top: -20px;
    width: 12px;
    height: 12px;
    opacity: 0.7;
    animation: dandelionFloat linear infinite;
    pointer-events: none;
}

.peppol-effects .dandelion-seed::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 3px;
    background: #a1a1aa;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.peppol-effects .dandelion-seed::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.4) 40%, transparent 70%);
    border-radius: 50%;
    transform: translateX(-50%);
}

@keyframes dandelionFloat {
    0% {
        transform: translateY(-20px) translateX(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.7;
    }
    25% {
        transform: translateY(25vh) translateX(40px) rotate(90deg);
    }
    50% {
        transform: translateY(50vh) translateX(-30px) rotate(180deg);
    }
    75% {
        transform: translateY(75vh) translateX(50px) rotate(270deg);
    }
    95% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) translateX(20px) rotate(360deg);
        opacity: 0;
    }
}

/* ===== AURORA BOREALIS (winter nights) ===== */
.aurora-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    pointer-events: none;
    z-index: -3;
    overflow: hidden;
    opacity: 0;
    transition: opacity 3s ease-in-out;
}

.aurora-container.visible {
    opacity: 1;
}

.aurora-wave {
    position: absolute;
    width: 200%;
    height: 100%;
    left: -50%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(34, 197, 94, 0.04) 15%,
        rgba(34, 197, 94, 0.1) 30%,
        rgba(59, 130, 246, 0.08) 45%,
        rgba(168, 85, 247, 0.05) 60%,
        transparent 75%
    );
    animation: auroraWave 12s ease-in-out infinite, auroraShimmer 4s ease-in-out infinite;
    filter: blur(25px);
}

.aurora-wave:nth-child(2) {
    animation-delay: -4s, -1.5s;
    animation-duration: 15s, 5s;
    opacity: 0.8;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(59, 130, 246, 0.05) 20%,
        rgba(34, 197, 94, 0.08) 40%,
        rgba(168, 85, 247, 0.06) 55%,
        transparent 70%
    );
}

.aurora-wave:nth-child(3) {
    animation-delay: -8s, -3s;
    animation-duration: 18s, 6s;
    opacity: 0.6;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(168, 85, 247, 0.04) 25%,
        rgba(59, 130, 246, 0.07) 45%,
        rgba(34, 197, 94, 0.05) 60%,
        transparent 75%
    );
}

@keyframes auroraWave {
    0%, 100% {
        transform: translateX(-15%) skewX(-8deg) scaleY(1);
    }
    25% {
        transform: translateX(10%) skewX(5deg) scaleY(1.2);
    }
    50% {
        transform: translateX(15%) skewX(-5deg) scaleY(0.85);
    }
    75% {
        transform: translateX(-8%) skewX(8deg) scaleY(1.1);
    }
}

@keyframes auroraShimmer {
    0%, 100% {
        opacity: 0.7;
        filter: blur(25px) brightness(1);
    }
    50% {
        opacity: 1;
        filter: blur(20px) brightness(1.2);
    }
}

/* ===== COMET (rare visitor) ===== */
.comet {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #fff 0%, #a5f3fc 50%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    box-shadow:
        0 0 10px 4px rgba(165, 243, 252, 0.8),
        0 0 20px 8px rgba(165, 243, 252, 0.4),
        0 0 40px 16px rgba(165, 243, 252, 0.2);
    z-index: 5;
}

.comet::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    width: 200px;
    height: 3px;
    background: linear-gradient(to left,
        rgba(165, 243, 252, 0.9) 0%,
        rgba(165, 243, 252, 0.5) 20%,
        rgba(165, 243, 252, 0.2) 50%,
        transparent 100%
    );
    transform: translateY(-50%);
    filter: blur(1px);
}

.comet::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    width: 300px;
    height: 8px;
    background: linear-gradient(to left,
        rgba(165, 243, 252, 0.3) 0%,
        rgba(192, 132, 252, 0.2) 30%,
        transparent 100%
    );
    transform: translateY(-50%);
    filter: blur(4px);
}

.comet.active {
    animation: cometFly 12s ease-in-out forwards;
}

@keyframes cometFly {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(-25deg);
    }
    5% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(100vw + 200px), 50vh) rotate(-25deg);
    }
}

/* ===== MIDNIGHT SHOOTING STAR BURST ===== */
.midnight-burst .shooting-star {
    animation-duration: 1s !important;
}

/* ============================================
   CELESTIAL LIGHTING SYSTEM
   ============================================ */
.celestial-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -4; /* Behind aurora (-3), clouds (-1) */
    overflow: hidden;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.celestial-container.visible {
    opacity: 1;
}

/* ===== THE SUN ===== */
.celestial-sun {
    position: absolute;
    left: 50%;
    top: 20%;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: visible;
    transform: translate(-50%, -50%);
    transition:
        left 60s linear,
        top 60s linear,
        opacity 2s ease;
    opacity: 0;
    pointer-events: none;
}

/* When position updates, use a smooth but faster transition */
.celestial-sun.position-update {
    transition:
        left 2s ease-out,
        top 2s ease-out,
        opacity 2s ease;
}

.celestial-sun.visible {
    opacity: 1;
}

/* Sun surface - soft warm gradient */
.sun-surface {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    z-index: 2;
    background: radial-gradient(circle at 40% 40%,
        #fffff8 0%,
        #fffef0 20%,
        #fff9dc 45%,
        #ffefb8 70%,
        #ffe494 100%
    );
    box-shadow: inset -4px -3px 12px rgba(255, 200, 100, 0.25);
}

/* Outer glow */
.sun-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 240, 180, 0.45) 0%,
        rgba(255, 225, 140, 0.25) 35%,
        rgba(255, 210, 120, 0.1) 55%,
        transparent 75%
    );
    z-index: 1;
    pointer-events: none;
}

/* Halo effect */
.sun-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220%;
    height: 220%;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 240, 180, 0.15) 0%,
        rgba(255, 225, 150, 0.08) 35%,
        transparent 65%
    );
    z-index: 0;
    pointer-events: none;
}

/* Quality adjustments */
.celestial-container.quality-ultra .sun-glow {
    width: 160%;
    height: 160%;
}

.celestial-container.quality-ultra .sun-halo {
    width: 260%;
    height: 260%;
}

.celestial-container.quality-low .sun-halo {
    display: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .celestial-sun {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 480px) {
    .celestial-sun {
        width: 45px;
        height: 45px;
    }
}

/* ===== THE MOON ===== */
.celestial-moon {
    position: absolute;
    /* Dynamic position controlled by JS via custom properties */
    /* Default position (will be overridden by JS) */
    --moon-x: 50%;
    --moon-y: 20%;
    left: var(--moon-x);
    top: var(--moon-y);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: visible;
    opacity: 0; /* Start hidden, JS shows based on theme */
    visibility: visible;
    /* Smooth movement across the sky */
    transition:
        left 60s linear,
        top 60s linear,
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 2s ease;
    cursor: default;
}

/* When position updates, use a smooth but faster transition */
.celestial-moon.position-update {
    transition:
        left 2s ease-out,
        top 2s ease-out,
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 2s ease;
}

/* Realistic moon surface with craters */
.moon-surface {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    z-index: 2;
    /* Base moon color with gradient and craters */
    background:
        /* Crater shadows - darker spots */
        radial-gradient(ellipse 18% 15% at 25% 30%, rgba(80, 80, 90, 0.4) 0%, transparent 100%),
        radial-gradient(ellipse 25% 20% at 65% 25%, rgba(70, 70, 80, 0.35) 0%, transparent 100%),
        radial-gradient(ellipse 12% 10% at 40% 60%, rgba(90, 90, 100, 0.3) 0%, transparent 100%),
        radial-gradient(ellipse 20% 18% at 70% 65%, rgba(75, 75, 85, 0.35) 0%, transparent 100%),
        radial-gradient(ellipse 8% 8% at 30% 75%, rgba(85, 85, 95, 0.25) 0%, transparent 100%),
        radial-gradient(ellipse 15% 12% at 55% 45%, rgba(80, 80, 90, 0.3) 0%, transparent 100%),
        radial-gradient(ellipse 10% 8% at 80% 40%, rgba(90, 90, 100, 0.25) 0%, transparent 100%),
        radial-gradient(ellipse 6% 6% at 20% 50%, rgba(85, 85, 95, 0.2) 0%, transparent 100%),
        /* Mare (dark plains) */
        radial-gradient(ellipse 35% 30% at 35% 40%, rgba(100, 105, 115, 0.4) 0%, transparent 100%),
        radial-gradient(ellipse 25% 35% at 60% 55%, rgba(95, 100, 110, 0.35) 0%, transparent 100%),
        /* Bright highlands */
        radial-gradient(ellipse 20% 15% at 75% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 100%),
        radial-gradient(ellipse 15% 20% at 25% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 100%),
        /* Base gradient - slight 3D effect */
        radial-gradient(circle at 35% 35%,
            #e8e8e5 0%,
            #d8d8d5 20%,
            #c5c5c2 40%,
            #b5b5b2 60%,
            #a8a8a5 80%,
            #989895 100%
        );
    box-shadow: inset -8px -4px 20px rgba(0, 0, 0, 0.3);
}

/* Terminator shadow for 3D depth */
.moon-surface::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg,
        transparent 0%,
        transparent 40%,
        rgba(30, 30, 40, 0.15) 70%,
        rgba(20, 20, 30, 0.3) 100%
    );
}

/* Natural soft glow - atmospheric light */
.moon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Ultra quality - large atmospheric glow */
.celestial-moon.quality-ultra .moon-glow {
    width: 500%;
    height: 500%;
    background: radial-gradient(circle,
        rgba(220, 235, 255, 0.5) 0%,
        rgba(200, 220, 255, 0.35) 10%,
        rgba(180, 205, 250, 0.2) 25%,
        rgba(160, 190, 240, 0.1) 40%,
        rgba(140, 175, 230, 0.05) 55%,
        transparent 70%
    );
}

/* High quality glow */
.celestial-moon.quality-high .moon-glow {
    width: 450%;
    height: 450%;
    background: radial-gradient(circle,
        rgba(220, 235, 255, 0.45) 0%,
        rgba(200, 220, 255, 0.3) 12%,
        rgba(180, 205, 250, 0.15) 28%,
        rgba(160, 190, 240, 0.06) 45%,
        transparent 65%
    );
}

/* Medium quality glow */
.celestial-moon.quality-medium .moon-glow {
    width: 380%;
    height: 380%;
    background: radial-gradient(circle,
        rgba(220, 235, 255, 0.4) 0%,
        rgba(195, 215, 250, 0.2) 15%,
        rgba(170, 195, 240, 0.08) 35%,
        transparent 55%
    );
}

/* Low quality glow */
.celestial-moon.quality-low .moon-glow {
    width: 300%;
    height: 300%;
    background: radial-gradient(circle,
        rgba(220, 235, 255, 0.3) 0%,
        rgba(200, 220, 250, 0.12) 20%,
        transparent 45%
    );
}

/* Rim light effect */
.moon-rim {
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.4) 0%,
        transparent 50%
    );
    z-index: 3;
    pointer-events: none;
}

/* Subtle halo ring */
.moon-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160%;
    height: 160%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: transparent;
    opacity: 0;
    transition: opacity 1s ease, transform 0.4s ease;
    z-index: -1;
}

.celestial-moon.quality-ultra .moon-halo,
.celestial-moon.quality-high .moon-halo {
    opacity: 1;
}

/* ===== INTERACTIVE HOVER EFFECTS ===== */

/* Moon hover - gentle float up and brighten */
.celestial-moon:hover {
    transform: translateY(-5px) scale(1.05);
}

.celestial-moon:hover .moon-glow {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1.2;
}

.celestial-moon:hover .moon-halo {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

/* Star hover states - triggered by JS adding classes */
.star.nearby {
    transform: scale(1.5) !important;
    filter: brightness(1.5);
}

.star.pulse {
    animation: starPulse 0.6s ease-out !important;
}

@keyframes starPulse {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(2); filter: brightness(2); }
    100% { transform: scale(1); filter: brightness(1); }
}

/* Shooting star on hover near moon */
.moon-triggered-shooting-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    z-index: 10;
}

.moon-triggered-shooting-star::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    width: 60px;
    height: 2px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.8), transparent);
    transform: translateY(-50%);
}

@keyframes moonShootingStar {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(-30deg);
    }
    100% {
        opacity: 0;
        transform: translate(200px, 120px) rotate(-30deg);
    }
}

.moon-triggered-shooting-star.active {
    animation: moonShootingStar 0.8s ease-out forwards;
}

/* ===== LUNAR ECLIPSE (Blood Moon) ===== */
.celestial-moon.blood-moon .moon-surface {
    background:
        /* Crater shadows */
        radial-gradient(ellipse 18% 15% at 25% 30%, rgba(60, 20, 20, 0.5) 0%, transparent 100%),
        radial-gradient(ellipse 25% 20% at 65% 25%, rgba(50, 15, 15, 0.45) 0%, transparent 100%),
        radial-gradient(ellipse 12% 10% at 45% 60%, rgba(55, 18, 18, 0.4) 0%, transparent 100%),
        radial-gradient(ellipse 15% 12% at 75% 65%, rgba(45, 12, 12, 0.35) 0%, transparent 100%),
        /* Blood red base */
        radial-gradient(circle at 35% 35%,
            #8b3a3a 0%,
            #6b2a2a 30%,
            #4a1a1a 60%,
            #3a1010 100%);
    filter: brightness(0.9);
}

.celestial-moon.blood-moon .moon-glow {
    background: radial-gradient(circle, rgba(180, 60, 60, 0.4) 0%, rgba(120, 30, 30, 0.2) 40%, transparent 70%);
}

.celestial-moon.blood-moon .moon-halo {
    background: radial-gradient(circle, rgba(150, 50, 50, 0.15) 0%, transparent 70%);
}

/* ===== VENUS (Evening/Morning Star) ===== */
.celestial-venus {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fffef0;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 2s ease, left 60s linear, top 60s linear;
    box-shadow:
        0 0 10px 3px rgba(255, 255, 240, 0.8),
        0 0 20px 6px rgba(255, 255, 200, 0.4),
        0 0 30px 10px rgba(255, 250, 180, 0.2);
    z-index: 5;
    pointer-events: none;
}

.celestial-venus.evening-star {
    /* Slightly warmer tone in evening */
    background: #fff8e0;
    box-shadow:
        0 0 10px 3px rgba(255, 248, 220, 0.8),
        0 0 20px 6px rgba(255, 240, 180, 0.4),
        0 0 30px 10px rgba(255, 220, 150, 0.2);
}

.celestial-venus.morning-star {
    /* Slightly cooler tone in morning */
    background: #f0f8ff;
    box-shadow:
        0 0 10px 3px rgba(240, 248, 255, 0.8),
        0 0 20px 6px rgba(220, 240, 255, 0.4),
        0 0 30px 10px rgba(200, 230, 255, 0.2);
}

/* ===== GOD RAYS (Sun through clouds) ===== */
.god-rays {
    position: absolute;
    top: 0;
    left: 50%;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 3s ease;
    pointer-events: none;
    transform: translateX(-50%);
    z-index: -2;
}

.god-ray {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgba(255, 250, 220, 0.3) 0%,
        rgba(255, 245, 200, 0.15) 30%,
        rgba(255, 240, 180, 0.05) 60%,
        transparent 100%
    );
    transform-origin: top center;
    opacity: 0.6;
    filter: blur(8px);
}

.god-ray:nth-child(1) {
    transform: translateX(-50%) rotate(-25deg);
    animation: godRayPulse 8s ease-in-out infinite;
}

.god-ray:nth-child(2) {
    transform: translateX(-50%) rotate(-12deg);
    animation: godRayPulse 8s ease-in-out 1.5s infinite;
    opacity: 0.5;
}

.god-ray:nth-child(3) {
    transform: translateX(-50%) rotate(0deg);
    animation: godRayPulse 8s ease-in-out 3s infinite;
    opacity: 0.7;
}

.god-ray:nth-child(4) {
    transform: translateX(-50%) rotate(12deg);
    animation: godRayPulse 8s ease-in-out 4.5s infinite;
    opacity: 0.5;
}

.god-ray:nth-child(5) {
    transform: translateX(-50%) rotate(25deg);
    animation: godRayPulse 8s ease-in-out 6s infinite;
}

@keyframes godRayPulse {
    0%, 100% {
        opacity: 0.4;
        filter: blur(8px);
    }
    50% {
        opacity: 0.7;
        filter: blur(12px);
    }
}

/* ===== THE STARS ===== */
.starfield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Start hidden, JS shows based on theme */
    transition: opacity 1.5s ease;
}

.star {
    position: absolute;
    border-radius: 50%;
    background: #fff;
}

/* Dim stars - no glow */
.star.dim {
    opacity: 0.4;
}

/* Medium stars - subtle glow */
.star.medium {
    opacity: 0.7;
    box-shadow: 0 0 3px 1px rgba(255, 255, 255, 0.3);
}

/* Bright stars - strong glow with color */
.star.bright {
    opacity: 1;
}

.star.bright.quality-ultra,
.star.bright.quality-high {
    box-shadow:
        0 0 4px 2px rgba(255, 255, 255, 0.9),
        0 0 8px 4px rgba(220, 235, 255, 0.5),
        0 0 15px 7px rgba(180, 210, 255, 0.25);
}

.star.bright.quality-medium {
    box-shadow:
        0 0 4px 2px rgba(255, 255, 255, 0.8),
        0 0 10px 5px rgba(200, 220, 255, 0.3);
}

.star.bright.quality-low {
    box-shadow: 0 0 6px 3px rgba(255, 255, 255, 0.5);
}

/* Star color variations for bright stars */
.star.bright.blue {
    background: #cce5ff;
}
.star.bright.blue.quality-ultra,
.star.bright.blue.quality-high {
    box-shadow:
        0 0 4px 2px rgba(200, 220, 255, 0.9),
        0 0 8px 4px rgba(150, 190, 255, 0.5),
        0 0 15px 7px rgba(100, 150, 255, 0.25);
}

.star.bright.orange {
    background: #ffe8cc;
}
.star.bright.orange.quality-ultra,
.star.bright.orange.quality-high {
    box-shadow:
        0 0 4px 2px rgba(255, 230, 200, 0.9),
        0 0 8px 4px rgba(255, 200, 150, 0.5),
        0 0 15px 7px rgba(255, 170, 100, 0.25);
}

/* Feature star with cross spikes */
.star.feature {
    opacity: 1;
}

.star.feature::before,
.star.feature::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: linear-gradient(to right,
        transparent 0%,
        rgba(255, 255, 255, 0.8) 40%,
        rgba(255, 255, 255, 0.8) 60%,
        transparent 100%
    );
    transform-origin: center;
}

.star.feature::before {
    width: 20px;
    height: 2px;
    transform: translate(-50%, -50%);
}

.star.feature::after {
    width: 2px;
    height: 20px;
    transform: translate(-50%, -50%);
}

.star.feature.quality-ultra::before,
.star.feature.quality-high::before {
    width: 30px;
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.3);
}

.star.feature.quality-ultra::after,
.star.feature.quality-high::after {
    height: 30px;
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.3);
}

/* Twinkling animations */
@keyframes twinkle1 {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

@keyframes twinkle2 {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    40% { opacity: 1; transform: scale(1.15); }
}

@keyframes twinkle3 {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    60% { opacity: 0.9; transform: scale(1.25); }
}

@keyframes featureTwinkle {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
        filter: brightness(1.3);
    }
}

.star.twinkle-1 { animation: twinkle1 3s ease-in-out infinite; }
.star.twinkle-2 { animation: twinkle2 4s ease-in-out infinite; }
.star.twinkle-3 { animation: twinkle3 5s ease-in-out infinite; }
.star.feature { animation: featureTwinkle 6s ease-in-out infinite; }
.star.pulse { animation: starPulse 8s ease-in-out infinite; }

@keyframes starPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
        filter: brightness(1);
    }
    15% {
        opacity: 1;
        transform: scale(1.8);
        filter: brightness(1.5);
    }
    30% {
        opacity: 0.7;
        transform: scale(1);
        filter: brightness(1);
    }
}

/* Shooting star */
.shooting-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    box-shadow:
        0 0 6px 2px rgba(255, 255, 255, 0.9),
        0 0 12px 4px rgba(200, 220, 255, 0.5);
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    width: 80px;
    height: 2px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
    transform: translateY(-50%);
}

.shooting-star.quality-ultra::after,
.shooting-star.quality-high::after {
    width: 120px;
    box-shadow: 0 0 10px 2px rgba(200, 220, 255, 0.3);
}

@keyframes shootingStar {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(-35deg);
    }
    10% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(300px, 200px) rotate(-35deg);
    }
}

.shooting-star.active {
    animation: shootingStar 1.5s ease-out forwards;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .celestial-moon,
    .moon-glow,
    .star,
    .shooting-star {
        animation: none !important;
    }

    /* Disable moon movement for reduced motion */
    .celestial-moon {
        transition: transform 0.4s ease, opacity 2s ease !important;
    }
}

/* Mobile adjustments - size only, position controlled by JS */
@media (max-width: 768px) {
    .celestial-moon {
        width: 70px;
        height: 70px;
    }

    .star.feature::before { width: 15px; }
    .star.feature::after { height: 15px; }
}

@media (max-width: 480px) {
    .celestial-moon {
        width: 55px;
        height: 55px;
    }
}

/* ============================================
   CLOUD SYSTEM
   Fluffy animated clouds for day and night
   ============================================ */
.cloud-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.cloud-container.visible {
    opacity: 1;
}

/* Individual cloud */
.cloud {
    position: absolute;
    opacity: 0;
    animation: cloudDrift linear infinite;
    will-change: transform;
    color: rgba(255, 255, 255, 0.85); /* Default white, nighttime overrides */
}

.cloud.visible {
    opacity: 1;
    transition: opacity 1s ease-in;
}

/* Cloud shape - fluffy layered effect */
.cloud-body {
    position: relative;
    filter: blur(2px);
    background: none; /* Prevent any visible rectangle */
}

.cloud-puff {
    position: absolute;
    border-radius: 50%;
    background: currentColor;
}

/* ===== DAYTIME CLOUDS ===== */
/* Light, bright white clouds */
.cloud-container.daytime .cloud {
    color: rgba(255, 255, 255, 0.85);
}

.cloud-container.daytime .cloud-body {
    filter: blur(3px);
}

.cloud-container.daytime .cloud-puff {
    box-shadow:
        0 0 40px 20px rgba(255, 255, 255, 0.4),
        0 0 80px 40px rgba(255, 255, 255, 0.2);
}

/* Daytime cloud glow - removed to prevent visible rectangles */
/* The glow effect is now achieved through cloud-puff box-shadow */

/* ===== NIGHTTIME CLOUDS ===== */
/* Darker, moonlit clouds - softly blurred for atmospheric effect */
.cloud-container.nighttime .cloud {
    color: rgba(140, 155, 180, 0.55);
}

.cloud-container.nighttime .cloud-body {
    filter: blur(8px);
}

.cloud-container.nighttime .cloud-puff {
    box-shadow:
        0 0 50px 25px rgba(120, 140, 180, 0.2),
        0 0 90px 50px rgba(100, 120, 160, 0.1);
}

/* Moonlit edge highlight */
.cloud-container.nighttime .cloud::before {
    content: '';
    position: absolute;
    top: -5%;
    left: 10%;
    right: 30%;
    height: 30%;
    background: linear-gradient(180deg,
        rgba(200, 210, 230, 0.2) 0%,
        transparent 100%);
    border-radius: 50%;
    filter: blur(5px);
    pointer-events: none;
}

/* ===== CLOUD SIZES ===== */
/* Small clouds (1.5x bigger) */
.cloud.small .cloud-body {
    width: 120px;
    height: 50px;
}

.cloud.small .cloud-puff:nth-child(1) {
    width: 60px;
    height: 60px;
    top: -22px;
    left: 15px;
}

.cloud.small .cloud-puff:nth-child(2) {
    width: 75px;
    height: 75px;
    top: -30px;
    left: 45px;
}

.cloud.small .cloud-puff:nth-child(3) {
    width: 52px;
    height: 52px;
    top: -15px;
    left: 82px;
}

/* Medium clouds (1.5x bigger) */
.cloud.medium .cloud-body {
    width: 225px;
    height: 90px;
}

.cloud.medium .cloud-puff:nth-child(1) {
    width: 90px;
    height: 90px;
    top: -38px;
    left: 22px;
}

.cloud.medium .cloud-puff:nth-child(2) {
    width: 120px;
    height: 120px;
    top: -60px;
    left: 68px;
}

.cloud.medium .cloud-puff:nth-child(3) {
    width: 98px;
    height: 98px;
    top: -45px;
    left: 135px;
}

.cloud.medium .cloud-puff:nth-child(4) {
    width: 68px;
    height: 68px;
    top: -22px;
    left: 180px;
}

/* Large clouds (1.5x bigger) */
.cloud.large .cloud-body {
    width: 375px;
    height: 135px;
}

.cloud.large .cloud-puff:nth-child(1) {
    width: 120px;
    height: 120px;
    top: -52px;
    left: 30px;
}

.cloud.large .cloud-puff:nth-child(2) {
    width: 165px;
    height: 165px;
    top: -82px;
    left: 90px;
}

.cloud.large .cloud-puff:nth-child(3) {
    width: 142px;
    height: 142px;
    top: -68px;
    left: 195px;
}

.cloud.large .cloud-puff:nth-child(4) {
    width: 105px;
    height: 105px;
    top: -45px;
    left: 285px;
}

.cloud.large .cloud-puff:nth-child(5) {
    width: 75px;
    height: 75px;
    top: -22px;
    left: 330px;
}

/* ===== CLOUD DRIFT ANIMATION ===== */
@keyframes cloudDrift {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(calc(100vw + 100%));
    }
}

/* Speed variations via animation duration set in JS */

/* ===== CLOUD QUALITY LEVELS ===== */
/* Ultra - full effects */
.cloud-container.quality-ultra .cloud-puff {
    box-shadow:
        0 0 40px 20px rgba(255, 255, 255, 0.4),
        0 0 80px 40px rgba(255, 255, 255, 0.2),
        0 0 120px 60px rgba(255, 255, 255, 0.1);
}

.cloud-container.quality-ultra.nighttime .cloud-puff {
    box-shadow:
        0 0 30px 15px rgba(140, 160, 200, 0.2),
        0 0 60px 30px rgba(100, 120, 160, 0.12),
        0 0 100px 50px rgba(80, 100, 140, 0.06);
}

/* High - good effects */
.cloud-container.quality-high .cloud-puff {
    box-shadow:
        0 0 35px 18px rgba(255, 255, 255, 0.35),
        0 0 70px 35px rgba(255, 255, 255, 0.15);
}

.cloud-container.quality-high.nighttime .cloud-puff {
    box-shadow:
        0 0 25px 12px rgba(140, 160, 200, 0.15),
        0 0 50px 25px rgba(100, 120, 160, 0.08);
}

/* Medium - reduced effects */
.cloud-container.quality-medium .cloud-body {
    filter: blur(2px);
}

.cloud-container.quality-medium .cloud-puff {
    box-shadow: 0 0 30px 15px rgba(255, 255, 255, 0.3);
}

.cloud-container.quality-medium.nighttime .cloud-puff {
    box-shadow: 0 0 20px 10px rgba(140, 160, 200, 0.12);
}

/* Low - minimal effects */
.cloud-container.quality-low .cloud-body {
    filter: blur(1px);
}

.cloud-container.quality-low .cloud-puff {
    box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.25);
}

.cloud-container.quality-low.nighttime .cloud-puff {
    box-shadow: 0 0 15px 8px rgba(140, 160, 200, 0.1);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .cloud {
        animation: none !important;
    }
}

/* ===== MOBILE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .cloud.small .cloud-body { transform: scale(0.7); }
    .cloud.medium .cloud-body { transform: scale(0.6); }
    .cloud.large .cloud-body { transform: scale(0.5); }
}

@media (max-width: 480px) {
    .cloud.small .cloud-body { transform: scale(0.5); }
    .cloud.medium .cloud-body { transform: scale(0.4); }
    .cloud.large .cloud-body { transform: scale(0.35); }
}

/* ============================================
   PRECIPITATION EFFECTS
   Rain, snow, and lightning from clouds
   ============================================ */

/* Precipitation container - positioned below cloud */
.cloud-precipitation {
    position: absolute;
    top: 100%;
    left: 10%;
    right: 10%;
    height: 150px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden; /* Fully hide when not active */
    transition: opacity 1s ease, visibility 0s 1s; /* Delay visibility on hide */
    filter: blur(1px);
    overflow: visible;
    background: none;
}

/* Show precipitation based on weather */
.cloud-container.weather-rain .cloud-precipitation,
.cloud-container.weather-snow .cloud-precipitation,
.cloud-container.weather-storm .cloud-precipitation {
    opacity: 1;
    visibility: visible;
    transition: opacity 1s ease, visibility 0s; /* Immediate visibility on show */
}

/* Individual precipitation drop - hidden by default */
.precipitation-drop {
    position: absolute;
    top: 0;
    opacity: 0;
    pointer-events: none;
}

/* ===== RAIN DROPS ===== */
.cloud-container.weather-rain .precipitation-drop,
.cloud-container.weather-storm .precipitation-drop {
    width: 2px;
    height: 15px;
    background: linear-gradient(to bottom,
        rgba(180, 200, 230, 0) 0%,
        rgba(180, 200, 230, 0.6) 50%,
        rgba(180, 200, 230, 0.3) 100%);
    border-radius: 0 0 2px 2px;
    opacity: 0.7;
    animation: rainFall linear infinite;
    transform: rotate(15deg);
}

/* Daytime rain - lighter, more visible */
.cloud-container.daytime.weather-rain .precipitation-drop,
.cloud-container.daytime.weather-storm .precipitation-drop {
    background: linear-gradient(to bottom,
        rgba(200, 220, 255, 0) 0%,
        rgba(200, 220, 255, 0.7) 50%,
        rgba(200, 220, 255, 0.4) 100%);
}

/* Nighttime rain - darker, subtle */
.cloud-container.nighttime.weather-rain .precipitation-drop,
.cloud-container.nighttime.weather-storm .precipitation-drop {
    background: linear-gradient(to bottom,
        rgba(100, 130, 180, 0) 0%,
        rgba(100, 130, 180, 0.5) 50%,
        rgba(100, 130, 180, 0.2) 100%);
    opacity: 0.5;
}

/* Storm rain - heavier, more intense */
.cloud-container.weather-storm .precipitation-drop {
    height: 20px;
    opacity: 0.8;
    transform: rotate(20deg);
}

@keyframes rainFall {
    0% {
        transform: translateY(0) rotate(15deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(150px) rotate(15deg);
        opacity: 0;
    }
}

/* ===== SNOW FLAKES ===== */
.cloud-container.weather-snow .precipitation-drop {
    width: 6px;
    height: 6px;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.6) 40%,
        rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    opacity: 0.8;
    animation: snowFall ease-in-out infinite;
    filter: blur(0.5px);
}

/* Daytime snow - bright white */
.cloud-container.daytime.weather-snow .precipitation-drop {
    background: radial-gradient(circle,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.7) 40%,
        rgba(255, 255, 255, 0) 70%);
}

/* Nighttime snow - slightly blue tint */
.cloud-container.nighttime.weather-snow .precipitation-drop {
    background: radial-gradient(circle,
        rgba(220, 230, 255, 0.9) 0%,
        rgba(200, 215, 240, 0.6) 40%,
        rgba(200, 215, 240, 0) 70%);
}

@keyframes snowFall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    50% {
        transform: translateY(75px) translateX(10px) rotate(180deg);
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(150px) translateX(-5px) rotate(360deg);
        opacity: 0;
    }
}

/* ===== LIGHTNING FLASH ===== */
.cloud-lightning {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none; /* No background when not flashing */
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    visibility: hidden; /* Fully hide when not flashing */
    transition: opacity 0.05s ease;
}

.cloud-lightning.flash {
    opacity: 1;
    visibility: visible;
    background: radial-gradient(ellipse at center bottom,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 200, 0.6) 30%,
        rgba(255, 255, 150, 0.3) 50%,
        transparent 70%);
}

/* Lightning illuminates the cloud */
.cloud:has(.cloud-lightning.flash) .cloud-body {
    filter: brightness(2) blur(3px);
}

.cloud:has(.cloud-lightning.flash) .cloud-puff {
    box-shadow:
        0 0 60px 30px rgba(255, 255, 255, 0.8),
        0 0 120px 60px rgba(255, 255, 200, 0.4) !important;
}

/* Lightning glow below cloud */
.cloud-lightning.flash::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20%;
    right: 20%;
    height: 100px;
    background: linear-gradient(to bottom,
        rgba(255, 255, 200, 0.4) 0%,
        rgba(255, 255, 150, 0.2) 30%,
        transparent 100%);
    filter: blur(10px);
}

/* ===== QUALITY ADJUSTMENTS FOR PRECIPITATION ===== */

/* Ultra - more particles, more detail */
.cloud-container.quality-ultra .cloud-precipitation {
    filter: blur(0.5px);
}

.cloud-container.quality-ultra.weather-snow .precipitation-drop {
    width: 8px;
    height: 8px;
}

/* High - standard effects */
.cloud-container.quality-high .cloud-precipitation {
    filter: blur(1px);
}

/* Medium - reduced effects */
.cloud-container.quality-medium .cloud-precipitation {
    filter: blur(1.5px);
    height: 120px;
}

.cloud-container.quality-medium.weather-rain .precipitation-drop,
.cloud-container.quality-medium.weather-storm .precipitation-drop {
    height: 12px;
}

/* Low - minimal effects */
.cloud-container.quality-low .cloud-precipitation {
    filter: blur(2px);
    height: 100px;
}

.cloud-container.quality-low.weather-rain .precipitation-drop,
.cloud-container.quality-low.weather-storm .precipitation-drop {
    height: 10px;
}

.cloud-container.quality-low.weather-snow .precipitation-drop {
    width: 4px;
    height: 4px;
}

/* ===== REDUCED MOTION FOR PRECIPITATION ===== */
@media (prefers-reduced-motion: reduce) {
    .precipitation-drop {
        animation: none !important;
        opacity: 0.5;
        transform: translateY(50px);
    }

    .cloud-lightning.flash {
        transition: opacity 0.3s ease;
    }
}

/* ===== MOBILE ADJUSTMENTS FOR PRECIPITATION ===== */
@media (max-width: 768px) {
    .cloud-precipitation {
        height: 100px;
    }

    .cloud-container.weather-rain .precipitation-drop,
    .cloud-container.weather-storm .precipitation-drop {
        height: 10px;
    }

    .cloud-container.weather-snow .precipitation-drop {
        width: 4px;
        height: 4px;
    }
}

@media (max-width: 480px) {
    .cloud-precipitation {
        height: 80px;
        left: 15%;
        right: 15%;
    }

    .cloud-container.weather-rain .precipitation-drop,
    .cloud-container.weather-storm .precipitation-drop {
        height: 8px;
        width: 1px;
    }

    .cloud-container.weather-snow .precipitation-drop {
        width: 3px;
        height: 3px;
    }
}

/* ============================================
   FRIDAY 17:00 CELEBRATION
   ============================================ */

/* Celebration container */
.friday-celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* Confetti pieces */
.confetti {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: confettiFall 4s ease-out forwards;
}

.confetti.square {
    border-radius: 2px;
}

.confetti.circle {
    border-radius: 50%;
}

.confetti.ribbon {
    width: 4px;
    height: 16px;
    border-radius: 2px;
}

/* Confetti colors */
.confetti.color-1 { background: #f59e0b; } /* amber */
.confetti.color-2 { background: #10b981; } /* emerald */
.confetti.color-3 { background: #3b82f6; } /* blue */
.confetti.color-4 { background: #8b5cf6; } /* violet */
.confetti.color-5 { background: #ec4899; } /* pink */
.confetti.color-6 { background: #ef4444; } /* red */

/* Confetti fall animation */
@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    25% {
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) rotate(360deg) scale(0.9);
        opacity: 0.9;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) scale(0.5);
        opacity: 0;
    }
}

/* Wiggle variation for some confetti */
.confetti.wiggle {
    animation: confettiWiggle 4s ease-out forwards;
}

@keyframes confettiWiggle {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: translateY(25vh) translateX(20px) rotate(180deg);
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) translateX(-15px) rotate(360deg);
        opacity: 0.9;
    }
    75% {
        transform: translateY(75vh) translateX(10px) rotate(540deg);
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh) translateX(-5px) rotate(720deg);
        opacity: 0;
    }
}

/* Gentle UI pulse effect during celebration */
.friday-pulse {
    animation: fridayPulse 0.6s ease-out;
}

@keyframes fridayPulse {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.05);
    }
    100% {
        filter: brightness(1);
    }
}

/* Celebration message styling */
.peppol-time-info.friday-celebration-active .greeting-text {
    background: linear-gradient(90deg, #f59e0b, #ec4899, #8b5cf6, #3b82f6, #10b981);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: celebrationGradient 2s ease-in-out;
}

@keyframes celebrationGradient {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .confetti {
        animation: confettiFadeOnly 3s ease-out forwards;
    }

    .confetti.wiggle {
        animation: confettiFadeOnly 3s ease-out forwards;
    }

    @keyframes confettiFadeOnly {
        0% { opacity: 1; transform: translateY(30vh); }
        100% { opacity: 0; transform: translateY(60vh); }
    }

    .peppol-time-info.friday-celebration-active .greeting-text {
        animation: none;
        background: var(--accent);
        -webkit-text-fill-color: currentColor;
    }
}

/* ============================================
   FLYING BIRDS ANIMATION
   ============================================ */

.birds-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.bird {
    position: absolute;
    width: 8px;
    height: 6px;
    background: transparent;
    top: var(--bird-y, 20%);
}

/* Bird shape - simple V using borders */
.bird::before,
.bird::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 2px;
    background: #1f2937;
    top: 50%;
    border-radius: 50% 50% 0 0;
    transform-origin: bottom center;
    animation: flapWing var(--flap-speed, 0.3s) ease-in-out infinite;
}

.bird::before {
    right: 45%;
    transform: rotate(-20deg);
    animation-name: flapLeft;
}

.bird::after {
    left: 45%;
    transform: rotate(20deg);
    animation-name: flapRight;
}

/* Bird flying left to right */
.bird.left-to-right {
    left: calc(-20px - var(--bird-offset, 0px));
    animation: birdFlyLTR var(--bird-duration, 14s) linear var(--bird-delay, 0s) forwards;
}

/* Bird flying right to left */
.bird.right-to-left {
    right: calc(-20px - var(--bird-offset, 0px));
    animation: birdFlyRTL var(--bird-duration, 14s) linear var(--bird-delay, 0s) forwards;
}

@keyframes birdFlyLTR {
    0% {
        left: calc(-20px - var(--bird-offset, 0px));
        top: var(--bird-y, 20%);
    }
    25% {
        top: calc(var(--bird-y, 20%) - 8px);
    }
    50% {
        top: calc(var(--bird-y, 20%) + 5px);
    }
    75% {
        top: calc(var(--bird-y, 20%) - 3px);
    }
    100% {
        left: calc(100% + 20px);
        top: var(--bird-y, 20%);
    }
}

@keyframes birdFlyRTL {
    0% {
        right: calc(-20px - var(--bird-offset, 0px));
        top: var(--bird-y, 20%);
    }
    25% {
        top: calc(var(--bird-y, 20%) + 6px);
    }
    50% {
        top: calc(var(--bird-y, 20%) - 8px);
    }
    75% {
        top: calc(var(--bird-y, 20%) + 4px);
    }
    100% {
        right: calc(100% + 20px);
        top: var(--bird-y, 20%);
    }
}

@keyframes flapLeft {
    0%, 100% {
        transform: rotate(-20deg);
    }
    50% {
        transform: rotate(-50deg);
    }
}

@keyframes flapRight {
    0%, 100% {
        transform: rotate(20deg);
    }
    50% {
        transform: rotate(50deg);
    }
}

/* Reduced motion - no flapping */
@media (prefers-reduced-motion: reduce) {
    .bird::before,
    .bird::after {
        animation: none;
    }
}

/* ============================================
   HOT AIR BALLOON ANIMATION
   ============================================ */

.balloon-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.hot-air-balloon {
    position: absolute;
    width: 60px;
    height: 90px;
    top: var(--balloon-y, 30%);
}

.hot-air-balloon.left-to-right {
    left: -80px;
    animation: balloonFloatLTR var(--balloon-duration, 60s) linear var(--balloon-delay, 0s) forwards;
}

.hot-air-balloon.right-to-left {
    right: -80px;
    animation: balloonFloatRTL var(--balloon-duration, 60s) linear var(--balloon-delay, 0s) forwards;
}

/* Inner wrapper for swing and rise effects */
.balloon-inner {
    transform-origin: top center;
    margin-top: var(--rise-offset, 0px);
    transition: margin-top 1s ease-out;
    animation: balloonSwing 4s ease-in-out infinite;
    pointer-events: auto;
    cursor: pointer;
}

/* Hover interaction - pause swing and apply transform */
.hot-air-balloon:hover .balloon-inner {
    animation-play-state: paused;
    transform: translateY(-20px) scale(1.12);
}

.hot-air-balloon:hover .balloon-flame {
    transform: scaleY(1.5) scaleX(1.2);
}

.hot-air-balloon:hover .balloon-flame.flame-outer-left {
    transform: scaleY(1.5) scaleX(1.2) rotate(-15deg);
}

.hot-air-balloon:hover .balloon-flame.flame-outer-right {
    transform: scaleY(1.5) scaleX(1.2) rotate(15deg);
}

/* The balloon envelope (the big colorful part) */
.balloon-envelope {
    position: relative;
    width: 60px;
    height: 55px;
}

.balloon-envelope svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Basket and ropes container */
.balloon-basket-assembly {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -2px;
}

/* Ropes connecting balloon to basket */
.balloon-ropes {
    width: 30px;
    height: 18px;
    position: relative;
}

.balloon-ropes::before,
.balloon-ropes::after {
    content: '';
    position: absolute;
    width: 1.5px;
    height: 18px;
    background: #1f2937;
    top: 0;
}

.balloon-ropes::before {
    left: 4px;
    transform: rotate(-8deg);
}

.balloon-ropes::after {
    right: 4px;
    transform: rotate(8deg);
}

/* The basket - solid black */
.balloon-basket {
    width: 24px;
    height: 14px;
    background: #1f2937;
    border-radius: 0 0 4px 4px;
    position: relative;
}

/* Basket rim - solid black */
.balloon-basket::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -3px;
    right: -3px;
    height: 6px;
    background: #1f2937;
    border-radius: 2px 2px 0 0;
}

/* Fire burner */
.balloon-fire {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

/* Fire flames - static by default, only animate on click */
.balloon-flame {
    position: absolute;
    bottom: 0;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transition: transform 0.3s ease-out, filter 0.3s ease-out;
}

.balloon-flame.flame-main {
    width: 8px;
    height: 14px;
    background: linear-gradient(0deg,
        #fbbf24 0%,
        #f97316 40%,
        #ef4444 70%,
        #dc2626 100%
    );
    z-index: 2;
}

.balloon-flame.flame-inner {
    width: 4px;
    height: 10px;
    background: linear-gradient(0deg,
        #fef3c7 0%,
        #fde68a 30%,
        #fbbf24 60%,
        #f97316 100%
    );
    z-index: 3;
}

.balloon-flame.flame-outer-left,
.balloon-flame.flame-outer-right {
    width: 5px;
    height: 10px;
    background: linear-gradient(0deg,
        #fbbf24 0%,
        #f97316 50%,
        #dc2626 100%
    );
    z-index: 1;
    opacity: 0.8;
}

.balloon-flame.flame-outer-left {
    left: -1px;
    transform: rotate(-10deg);
}

.balloon-flame.flame-outer-right {
    right: -1px;
    transform: rotate(10deg);
}

/* Transparent overlay on fire - makes it look inside the balloon */
.balloon-fire-overlay {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 12px;
    background: rgba(31, 41, 55, 0.3);
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    z-index: 10;
    pointer-events: none;
}

/* Gentle swinging motion like a real balloon */
@keyframes balloonSwing {
    0%, 100% {
        transform: rotate(-3deg);
    }
    25% {
        transform: rotate(-1deg);
    }
    50% {
        transform: rotate(3deg);
    }
    75% {
        transform: rotate(1deg);
    }
}

/* Balloon floating across screen - left to right */
@keyframes balloonFloatLTR {
    0% {
        left: -80px;
        top: var(--balloon-y, 30%);
    }
    10% {
        top: calc(var(--balloon-y, 30%) - 2%);
    }
    20% {
        top: calc(var(--balloon-y, 30%) - 4%);
    }
    30% {
        top: calc(var(--balloon-y, 30%) - 3%);
    }
    40% {
        top: calc(var(--balloon-y, 30%) - 6%);
    }
    50% {
        top: calc(var(--balloon-y, 30%) - 5%);
    }
    60% {
        top: calc(var(--balloon-y, 30%) - 8%);
    }
    70% {
        top: calc(var(--balloon-y, 30%) - 7%);
    }
    80% {
        top: calc(var(--balloon-y, 30%) - 10%);
    }
    90% {
        top: calc(var(--balloon-y, 30%) - 9%);
    }
    100% {
        left: calc(100% + 80px);
        top: calc(var(--balloon-y, 30%) - 12%);
    }
}

/* Balloon floating across screen - right to left */
@keyframes balloonFloatRTL {
    0% {
        right: -80px;
        top: var(--balloon-y, 30%);
    }
    10% {
        top: calc(var(--balloon-y, 30%) - 2%);
    }
    20% {
        top: calc(var(--balloon-y, 30%) - 5%);
    }
    30% {
        top: calc(var(--balloon-y, 30%) - 4%);
    }
    40% {
        top: calc(var(--balloon-y, 30%) - 7%);
    }
    50% {
        top: calc(var(--balloon-y, 30%) - 6%);
    }
    60% {
        top: calc(var(--balloon-y, 30%) - 9%);
    }
    70% {
        top: calc(var(--balloon-y, 30%) - 8%);
    }
    80% {
        top: calc(var(--balloon-y, 30%) - 11%);
    }
    90% {
        top: calc(var(--balloon-y, 30%) - 10%);
    }
    100% {
        right: calc(100% + 80px);
        top: calc(var(--balloon-y, 30%) - 13%);
    }
}

/* Fire burst - intensify flames when clicked */
.hot-air-balloon.fire-burst .balloon-flame {
    transform: scaleY(2.2) scaleX(1.4) !important;
    filter: brightness(1.4);
    animation: none !important;
}

.hot-air-balloon.fire-burst .balloon-flame.flame-outer-left {
    transform: scaleY(2.2) scaleX(1.4) rotate(-20deg) !important;
}

.hot-air-balloon.fire-burst .balloon-flame.flame-outer-right {
    transform: scaleY(2.2) scaleX(1.4) rotate(20deg) !important;
}

.hot-air-balloon.fire-burst .balloon-flame.flame-inner {
    transform: scaleY(2.5) scaleX(1.5) !important;
    filter: brightness(1.6);
}

/* Sandbag drop animation */
.balloon-sandbag {
    position: fixed;
    width: 6px;
    height: 10px;
    background: #1f2937;
    border-radius: 1px;
    translate: -50% 0;
    z-index: 100;
    pointer-events: none;
    opacity: 1;
}

.balloon-sandbag::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 3px;
    background: #374151;
    border-radius: 1px 1px 0 0;
}

.balloon-sandbag.falling {
    animation: sandbagFall 3s ease-in forwards,
               sandbagSpin 0.25s linear infinite,
               sandbagDrift 0.8s ease-in-out infinite alternate;
}

@keyframes sandbagFall {
    0% {
        translate: -50% 0;
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        translate: -50% 105vh;
        opacity: 0;
    }
}

@keyframes sandbagSpin {
    0% {
        rotate: 0deg;
    }
    100% {
        rotate: 360deg;
    }
}

@keyframes sandbagDrift {
    0% {
        margin-left: -4px;
    }
    100% {
        margin-left: 4px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hot-air-balloon {
        animation: balloonFloatLTR var(--balloon-duration, 60s) linear var(--balloon-delay, 0s) forwards;
    }

    .hot-air-balloon.right-to-left {
        animation: balloonFloatRTL var(--balloon-duration, 60s) linear var(--balloon-delay, 0s) forwards;
    }

    .balloon-flame {
        animation: none;
    }
}

/* ============================================
   DOCUMENTATION PAGE BACKGROUNDS
   Solid opaque backgrounds for content sections only
   ============================================ */

/* Content sections on doc pages - solid opaque backgrounds */
.peppol-themed.doc-page .section,
.peppol-themed.doc-page .info-card,
.peppol-themed.doc-page .schema-section,
.peppol-themed.doc-page .search-card,
.peppol-themed.doc-page .example-card,
.peppol-themed.doc-page .endpoint,
.peppol-themed.doc-page .accordion,
.peppol-themed.doc-page .doc-section {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

/* Dark theme support for doc page content */
[data-theme="dawn"] .peppol-themed.doc-page .section,
[data-theme="dawn"] .peppol-themed.doc-page .info-card,
[data-theme="dawn"] .peppol-themed.doc-page .schema-section,
[data-theme="dawn"] .peppol-themed.doc-page .search-card,
[data-theme="dawn"] .peppol-themed.doc-page .example-card,
[data-theme="dawn"] .peppol-themed.doc-page .endpoint,
[data-theme="dawn"] .peppol-themed.doc-page .accordion,
[data-theme="dawn"] .peppol-themed.doc-page .doc-section,
[data-theme="evening"] .peppol-themed.doc-page .section,
[data-theme="evening"] .peppol-themed.doc-page .info-card,
[data-theme="evening"] .peppol-themed.doc-page .schema-section,
[data-theme="evening"] .peppol-themed.doc-page .search-card,
[data-theme="evening"] .peppol-themed.doc-page .example-card,
[data-theme="evening"] .peppol-themed.doc-page .endpoint,
[data-theme="evening"] .peppol-themed.doc-page .accordion,
[data-theme="evening"] .peppol-themed.doc-page .doc-section,
[data-theme="late-evening"] .peppol-themed.doc-page .section,
[data-theme="late-evening"] .peppol-themed.doc-page .info-card,
[data-theme="late-evening"] .peppol-themed.doc-page .schema-section,
[data-theme="late-evening"] .peppol-themed.doc-page .search-card,
[data-theme="late-evening"] .peppol-themed.doc-page .example-card,
[data-theme="late-evening"] .peppol-themed.doc-page .endpoint,
[data-theme="late-evening"] .peppol-themed.doc-page .accordion,
[data-theme="late-evening"] .peppol-themed.doc-page .doc-section,
[data-theme="night"] .peppol-themed.doc-page .section,
[data-theme="night"] .peppol-themed.doc-page .info-card,
[data-theme="night"] .peppol-themed.doc-page .schema-section,
[data-theme="night"] .peppol-themed.doc-page .search-card,
[data-theme="night"] .peppol-themed.doc-page .example-card,
[data-theme="night"] .peppol-themed.doc-page .endpoint,
[data-theme="night"] .peppol-themed.doc-page .accordion,
[data-theme="night"] .peppol-themed.doc-page .doc-section,
[data-theme="deep-night"] .peppol-themed.doc-page .section,
[data-theme="deep-night"] .peppol-themed.doc-page .info-card,
[data-theme="deep-night"] .peppol-themed.doc-page .schema-section,
[data-theme="deep-night"] .peppol-themed.doc-page .search-card,
[data-theme="deep-night"] .peppol-themed.doc-page .example-card,
[data-theme="deep-night"] .peppol-themed.doc-page .endpoint,
[data-theme="deep-night"] .peppol-themed.doc-page .accordion,
[data-theme="deep-night"] .peppol-themed.doc-page .doc-section,
[data-theme="late-night"] .peppol-themed.doc-page .section,
[data-theme="late-night"] .peppol-themed.doc-page .info-card,
[data-theme="late-night"] .peppol-themed.doc-page .schema-section,
[data-theme="late-night"] .peppol-themed.doc-page .search-card,
[data-theme="late-night"] .peppol-themed.doc-page .example-card,
[data-theme="late-night"] .peppol-themed.doc-page .endpoint,
[data-theme="late-night"] .peppol-themed.doc-page .accordion,
[data-theme="late-night"] .peppol-themed.doc-page .doc-section,
[data-theme="pre-dawn"] .peppol-themed.doc-page .section,
[data-theme="pre-dawn"] .peppol-themed.doc-page .info-card,
[data-theme="pre-dawn"] .peppol-themed.doc-page .schema-section,
[data-theme="pre-dawn"] .peppol-themed.doc-page .search-card,
[data-theme="pre-dawn"] .peppol-themed.doc-page .example-card,
[data-theme="pre-dawn"] .peppol-themed.doc-page .endpoint,
[data-theme="pre-dawn"] .peppol-themed.doc-page .accordion,
[data-theme="pre-dawn"] .peppol-themed.doc-page .doc-section {
    background: rgba(15, 23, 42, 0.95) !important;
}

/* ============================================
   CLEAR SKY SYSTEM
   Visual enhancements for clear sunny days
   ============================================ */

.clear-sky-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease;
    overflow: hidden;
}

.clear-sky-container.visible {
    opacity: 1;
}

/* --- Cirrus Clouds (wispy high-altitude clouds) --- */
.cirrus-cloud {
    position: absolute;
    pointer-events: none;
    animation: cirrusDrift linear infinite;
}

.cirrus-streak {
    position: absolute;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 20%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.4) 80%,
        transparent 100%
    );
    border-radius: 3px;
    filter: blur(1px);
}

@keyframes cirrusDrift {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(100vw + 300px));
    }
}

/* --- Sun Particles (dust motes / pollen in sunlight) --- */
.sun-particle {
    position: absolute;
    background: radial-gradient(circle,
        rgba(255, 248, 220, 0.9) 0%,
        rgba(255, 236, 179, 0.6) 50%,
        transparent 100%
    );
    border-radius: 50%;
    pointer-events: none;
    filter: blur(0.5px);
}

/* --- Lens Flare --- */
.lens-flare-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.4;
}

.lens-flare-element {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    --flare-index: 0;
}

/* Position flare elements along the sun-center axis */
.lens-flare-element:nth-child(1) {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle,
        rgba(255, 200, 100, 0.3) 0%,
        transparent 70%
    );
    left: calc(var(--sun-x) + var(--flare-dx) * 0.3 * 1%);
    top: calc(var(--sun-y) + var(--flare-dy) * 0.3 * 1%);
    transform: translate(-50%, -50%);
}

.lens-flare-element:nth-child(2) {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle,
        rgba(100, 200, 255, 0.15) 0%,
        transparent 70%
    );
    left: calc(var(--sun-x) + var(--flare-dx) * 0.5 * 1%);
    top: calc(var(--sun-y) + var(--flare-dy) * 0.5 * 1%);
    transform: translate(-50%, -50%);
}

.lens-flare-element:nth-child(3) {
    width: 15px;
    height: 15px;
    background: radial-gradient(circle,
        rgba(255, 150, 100, 0.25) 0%,
        transparent 70%
    );
    left: calc(var(--sun-x) + var(--flare-dx) * 0.65 * 1%);
    top: calc(var(--sun-y) + var(--flare-dy) * 0.65 * 1%);
    transform: translate(-50%, -50%);
}

.lens-flare-element:nth-child(4) {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle,
        rgba(150, 255, 200, 0.1) 0%,
        transparent 70%
    );
    left: calc(var(--sun-x) + var(--flare-dx) * 0.8 * 1%);
    top: calc(var(--sun-y) + var(--flare-dy) * 0.8 * 1%);
    transform: translate(-50%, -50%);
}

.lens-flare-element:nth-child(5) {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle,
        rgba(255, 255, 200, 0.2) 0%,
        transparent 70%
    );
    left: calc(var(--sun-x) + var(--flare-dx) * 1 * 1%);
    top: calc(var(--sun-y) + var(--flare-dy) * 1 * 1%);
    transform: translate(-50%, -50%);
}

/* ============================================
   BIRD MURMURATION SYSTEM
   Canvas-based swarm animation
   ============================================ */

.murmuration-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.murmuration-canvas.visible {
    opacity: 1;
}

/* Reduced motion - disable intensive animations */
@media (prefers-reduced-motion: reduce) {
    .clear-sky-container {
        display: none;
    }

    .murmuration-canvas {
        display: none;
    }

    .lantern-container {
        display: none;
    }
}

/* ============================================
   STATIC THEMES (White/Dark)
   User-selectable themes that override time-based
   ============================================ */

/* White theme - clean, pure white */
[data-theme="white"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f4;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-hover: rgba(248, 249, 250, 0.98);
    --bg-panel: rgba(255, 255, 255, 0.95);
    --bg-panel-solid: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.04);
    --bg-input: rgba(255, 255, 255, 0.95);
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-muted: #80868b;
    --border-color: rgba(0, 0, 0, 0.12);
    --shadow-soft: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-hover: 0 14px 28px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.12);
    --gradient-bg: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #f1f3f4 100%);
    --accent: #1a73e8;
    --accent-rgb: 26, 115, 232;
    --nav-bg: rgba(255, 255, 255, 0.95);
}

/* Dark theme - deep dark */
[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2d2d2d;
    --bg-card: rgba(30, 30, 30, 0.95);
    --bg-card-hover: rgba(45, 45, 45, 0.98);
    --bg-panel: rgba(30, 30, 30, 0.95);
    --bg-panel-solid: #1e1e1e;
    --bg-hover: rgba(255, 255, 255, 0.08);
    --bg-input: rgba(30, 30, 30, 0.95);
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-muted: #6b7280;
    --border-color: rgba(255, 255, 255, 0.12);
    --shadow-soft: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-hover: 0 14px 28px rgba(0,0,0,0.5);
    --gradient-bg: linear-gradient(135deg, #121212 0%, #1e1e1e 50%, #2d2d2d 100%);
    --accent: #8ab4f8;
    --accent-rgb: 138, 180, 248;
    --nav-bg: rgba(30, 30, 30, 0.95);
}

/* Hide weather/sky effects for white/dark themes */
[data-theme="white"] body::before,
[data-theme="dark"] body::before {
    background: none !important;
}

[data-theme="white"] .cloud-precipitation,
[data-theme="dark"] .cloud-precipitation,
[data-theme="white"] .precipitation-drop,
[data-theme="dark"] .precipitation-drop,
[data-theme="white"] .weather-overlay,
[data-theme="dark"] .weather-overlay {
    display: none !important;
    opacity: 0 !important;
}

/* Cloud colors for white/dark themes - matching portal */
[data-theme="white"] .cloud-container .cloud { color: rgba(255, 255, 255, 0.9); }
[data-theme="white"] .cloud-container .cloud-body { filter: blur(3px); }
[data-theme="white"] .cloud-container .cloud-puff {
    box-shadow: 0 0 40px 20px rgba(255, 255, 255, 0.5), 0 0 80px 40px rgba(240, 240, 240, 0.3);
}

[data-theme="dark"] .cloud-container .cloud { color: rgba(30, 30, 35, 0.8); }
[data-theme="dark"] .cloud-container .cloud-body { filter: blur(4px); }
[data-theme="dark"] .cloud-container .cloud-puff {
    box-shadow: 0 0 40px 20px rgba(20, 20, 25, 0.4), 0 0 80px 40px rgba(15, 15, 20, 0.2);
}

/* Hide celestial elements for static themes */
[data-theme="white"] .sun-container,
[data-theme="dark"] .sun-container,
[data-theme="white"] .moon-container,
[data-theme="dark"] .moon-container,
[data-theme="white"] .star-layer,
[data-theme="dark"] .star-layer,
[data-theme="white"] .shooting-star,
[data-theme="dark"] .shooting-star {
    display: none !important;
}

/* ============================================
   THEME TOGGLE BUTTON
   Matches portal/index.html implementation
   ============================================ */

.theme-toggle {
    position: fixed;
    top: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
    background: var(--bg-card, rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-soft, 0 2px 8px rgba(0, 0, 0, 0.1));
    z-index: 1001;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-hover, 0 4px 16px rgba(0, 0, 0, 0.15));
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary, #5f6368);
    transition: all 0.15s ease;
}

.theme-toggle:hover svg {
    fill: var(--accent, #1a73e8);
}

@media (max-width: 768px) {
    .theme-toggle {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
}

