/* ═══════════════════════════════════════════════════════════════════════════
   Amfor-Cast Dark Aurora Theme
   
   Design philosophy:
   - Aurora animated background + floating orbs = atmosphere
   - Glass cards for UI chrome (nav, toggles, hero sections)
   - SOLID dark surfaces for data (charts, tables) = readability
   - High contrast text on data surfaces
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Animated background ──────────────────────────────────────────────── */
[data-theme="dark"] .bg-animated {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 25%, #0a1a3e 50%, #0a2a1a 75%, #0a0a1a 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ─── Floating orbs ───────────────────────────────────────────────────── */
[data-theme="dark"] .orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: orbFloat 20s ease-in-out infinite;
  pointer-events: none;
}

[data-theme="dark"] .orb-1 { width: 400px; height: 400px; background: #4f46e5; top: -100px; right: -100px; animation-delay: 0s; }
[data-theme="dark"] .orb-2 { width: 300px; height: 300px; background: #06b6d4; bottom: -50px; left: -50px; animation-delay: -5s; }
[data-theme="dark"] .orb-3 { width: 250px; height: 250px; background: #8b5cf6; top: 50%; left: 50%; animation-delay: -10s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ─── Base body ───────────────────────────────────────────────────────── */
[data-theme="dark"] body {
  background: #0a0a1a;
  color: #e0e1dd;
}

/* ─── Glass elements (UI chrome only) ─────────────────────────────────── */
[data-theme="dark"] .glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   INDEX PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] .page {
  position: relative;
  z-index: 1;
}

/* Hero — glass */
[data-theme="dark"] .hero {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(ellipse at 90% 40%, rgba(79, 70, 229, 0.2) 0%, transparent 55%);
}

[data-theme="dark"] .hero h1 {
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 50%, #06b6d4 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero p {
  color: rgba(255, 255, 255, 0.5);
}

/* Current weather widget */
.cw-widget { background: rgba(255,255,255,0.08); }
.cw-temp { color: #1e293b; }
.cw-desc { color: #475569; }
.cw-secondary { color: #64748b; font-size: 11px; }

[data-theme="dark"] .cw-widget { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .cw-temp { color: #e0e1dd; }
[data-theme="dark"] .cw-desc { color: rgba(224,225,221,0.7); }
[data-theme="dark"] .cw-secondary { color: rgba(224,225,221,0.6); }

/* Tabs — glass */
[data-theme="dark"] .tabs {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .tab {
  color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .tab:hover {
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .tab.active {
  background: rgba(79, 70, 229, 0.25);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.2);
  border: 1px solid rgba(79, 70, 229, 0.3);
}

/* Cards — solid dark surface */
[data-theme="dark"] .card {
  background: #1a1a2e;
  border: 1px solid #2a2a45;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .card-label {
  color: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid #2a2a45;
  padding-bottom: 8px;
}

[data-theme="dark"] .card a {
  color: rgba(255, 255, 255, 0.85);
  border-color: transparent;
}

[data-theme="dark"] .card a:hover {
  background: #252545;
  border-color: rgba(79, 70, 229, 0.3);
}

[data-theme="dark"] .card a .arrow {
  color: rgba(255, 255, 255, 0.3);
}

/* Bottom links */
[data-theme="dark"] .bottom-links a {
  color: #a5b4fc;
}

[data-theme="dark"] .bottom-links a:hover {
  color: #ffffff;
}


/* ═══════════════════════════════════════════════════════════════════════════
   DOC PAGES (user-guide, dev-docs, plans)
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] .container {
  background: #141425;
  backdrop-filter: none;
  border: 1px solid #2a2a45;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] h1 {
  color: #ffffff;
}

[data-theme="dark"] .subtitle {
  color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] h2 {
  color: #e0e1dd;
  border-bottom-color: #2a2a45;
}

[data-theme="dark"] h3 {
  color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] p, [data-theme="dark"] li {
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] a {
  color: #a5b4fc;
}

[data-theme="dark"] a:hover {
  color: #c4b5fd;
}

[data-theme="dark"] code {
  background: #252545;
  color: #a5b4fc;
}

[data-theme="dark"] pre {
  background: #0d0d1a;
  border: 1px solid #2a2a45;
}

/* Tables — solid dark, high contrast */
[data-theme="dark"] table {
  border-color: #2a2a45;
}

[data-theme="dark"] th {
  background: #1e1e38;
  border-color: #2a2a45;
  color: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] td {
  border-color: #222240;
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] tr:hover td {
  background: #1e1e35;
}

/* Boxes */
[data-theme="dark"] .box {
  background: #1a1a30;
  border-color: #2a2a45;
}

[data-theme="dark"] .box-blue {
  background: #141430;
  border-color: rgba(79, 70, 229, 0.4);
}

[data-theme="dark"] .box-green {
  background: #0f1f1a;
  border-color: rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .box-amber {
  background: #1f1a0f;
  border-color: rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .box-purple {
  background: #1a1430;
  border-color: rgba(139, 92, 246, 0.4);
}

[data-theme="dark"] .box-red {
  background: #1f1414;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Diagram/preformatted */
[data-theme="dark"] .diagram {
  background: #0a0a18;
  border: 1px solid #2a2a45;
  color: #a0d2db;
}

/* Footer */
[data-theme="dark"] .footer {
  border-top-color: #2a2a45;
  color: rgba(255, 255, 255, 0.3);
}


/* ═══════════════════════════════════════════════════════════════════════════
   ROUTE WEATHER PLANNER
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] .input-card {
  background: #1a1a2e;
  border: 1px solid #2a2a45;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .input-card h2 {
  color: #e0e1dd;
}

[data-theme="dark"] .form-row label {
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .form-row input,
[data-theme="dark"] .form-row select {
  background: #12122a;
  border-color: #3a3a55;
  color: #fff;
}

[data-theme="dark"] .form-row input:focus,
[data-theme="dark"] .form-row select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

[data-theme="dark"] .form-row input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .precision-btn {
  background: #12122a;
  border-color: #3a3a55;
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .precision-btn:hover {
  border-color: #5a5a75;
}

[data-theme="dark"] .precision-btn.active {
  border-color: #4f46e5;
  background: #1e1e40;
  color: #a5b4fc;
}

[data-theme="dark"] .btn-small {
  background: #1a1a30;
  border-color: #3a3a55;
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .btn-small:hover {
  background: #252545;
  border-color: #5a5a75;
}

[data-theme="dark"] .remove-stop {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .results-card {
  background: #1a1a2e;
  border: 1px solid #2a2a45;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .results-card h2 {
  color: #e0e1dd;
}

[data-theme="dark"] .results-meta {
  color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .timeline::before {
  background: #3a3a55;
}

[data-theme="dark"] .timeline-item {
  background: #1e1e35;
  border-color: #2a2a45;
}

[data-theme="dark"] .timeline-item:hover {
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

[data-theme="dark"] .timeline-item.rain {
  background: #141a2e;
  border-color: rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .timeline-item.storm {
  background: #1f1418;
  border-color: rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .wp-city {
  color: #ffffff;
}

[data-theme="dark"] .wp-time {
  color: #a5b4fc;
}

[data-theme="dark"] .wp-weather {
  color: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] .alert-rain {
  background: #141a2e;
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

[data-theme="dark"] .alert-storm {
  background: #1f1418;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

[data-theme="dark"] .alert-wind {
  background: #1f1a0f;
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

[data-theme="dark"] .alert-clear {
  background: #0f1f1a;
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

[data-theme="dark"] .error-box {
  background: #1f1418;
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

[data-theme="dark"] .loading-text {
  color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .spinner {
  border-color: #2a2a45;
  border-top-color: #4f46e5;
}


/* ═══════════════════════════════════════════════════════════════════════════
   HEADACHE ANALYSIS — inline style overrides
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] .header {
  background: linear-gradient(135deg, #1e1040, #102040) !important;
}

[data-theme="dark"] .summary {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Override inline background colors */
[data-theme="dark"] [style*="background:#fff5f5"],
[data-theme="dark"] [style*="background: #fff5f5"] {
  background: #1f1418 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #fca5a5 !important;
}

[data-theme="dark"] [style*="background:#fffff0"],
[data-theme="dark"] [style*="background: #fffff0"] {
  background: #1f1a0f !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  color: #fcd34d !important;
}

[data-theme="dark"] [style*="background:#f0fff4"],
[data-theme="dark"] [style*="background: #f0fff4"] {
  background: #0f1f1a !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: #6ee7b7 !important;
}

[data-theme="dark"] [style*="background:#f7fafc"],
[data-theme="dark"] [style*="background: #f7fafc"] {
  background: #1a1a2e !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] [style*="background:#edf2f7"],
[data-theme="dark"] [style*="background: #edf2f7"] {
  background: #1e1e38 !important;
}

[data-theme="dark"] [style*="background:#ebf8ff"],
[data-theme="dark"] [style*="background: #ebf8ff"] {
  background: #141a2e !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
  color: #93c5fd !important;
}

/* Inline table styling overrides */
[data-theme="dark"] table[style] th,
[data-theme="dark"] table th[style] {
  background: #1e1e38 !important;
  color: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="dark"] table[style] tr[style],
[data-theme="dark"] table tr[style] {
  background: #1e1e38 !important;
}

[data-theme="dark"] table[style] {
  background: #151528 !important;
}

[data-theme="dark"] table[style] td,
[data-theme="dark"] table td[style] {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Inline text color overrides */
[data-theme="dark"] [style*="color:#1a202c"],
[data-theme="dark"] [style*="color: #1a202c"] {
  color: #e0e1dd !important;
}

[data-theme="dark"] [style*="color:#718096"],
[data-theme="dark"] [style*="color: #718096"] {
  color: rgba(255, 255, 255, 0.6) !important;
}

[data-theme="dark"] [style*="color:#4a5568"],
[data-theme="dark"] [style*="color: #4a5568"] {
  color: rgba(255, 255, 255, 0.75) !important;
}

[data-theme="dark"] [style*="color:#2d3748"],
[data-theme="dark"] [style*="color: #2d3748"] {
  color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] [style*="color:#742a2a"],
[data-theme="dark"] [style*="color: #742a2a"] {
  color: #fca5a5 !important;
}

[data-theme="dark"] [style*="color:#276749"],
[data-theme="dark"] [style*="color: #276749"] {
  color: #6ee7b7 !important;
}

[data-theme="dark"] [style*="color:#744210"],
[data-theme="dark"] [style*="color: #744210"] {
  color: #fcd34d !important;
}

[data-theme="dark"] [style*="color:#c53030"],
[data-theme="dark"] [style*="color: #c53030"] {
  color: #fca5a5 !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   FORECAST & HISTORY — charts and tables get SOLID dark backgrounds
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] .chart-box {
  background: #1a1a2e !important;
  border: 1px solid #2a2a45 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .graph-container {
  background: #1a1a2e !important;
  border-color: #2a2a45 !important;
}

[data-theme="dark"] .section-title {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .section-title::after {
  background: #2a2a45 !important;
}

[data-theme="dark"] .summary-card,
[data-theme="dark"] .forecast-card {
  background: #1a1a2e !important;
  border-color: #2a2a45 !important;
}

[data-theme="dark"] .day-card {
  background: #1e1e35 !important;
  border-color: #2a2a45 !important;
}

[data-theme="dark"] .day-card:hover {
  border-color: rgba(79, 70, 229, 0.4) !important;
}

[data-theme="dark"] .temp-high {
  color: #fca5a5 !important;
}

[data-theme="dark"] .temp-low {
  color: #93c5fd !important;
}

[data-theme="dark"] .risk-low {
  background: #0f1f1a !important;
  color: #6ee7b7 !important;
}

[data-theme="dark"] .risk-medium {
  background: #1f1a0f !important;
  color: #fcd34d !important;
}

[data-theme="dark"] .risk-high {
  background: #1f1418 !important;
  color: #fca5a5 !important;
}

[data-theme="dark"] .metric-value {
  color: #e0e1dd !important;
}

[data-theme="dark"] .metric-label {
  color: rgba(255, 255, 255, 0.5) !important;
}

[data-theme="dark"] .page-footer {
  color: rgba(255, 255, 255, 0.3) !important;
  border-top-color: #2a2a45 !important;
}

/* Week/hourly tables — solid */
[data-theme="dark"] .week-table {
  border-color: #2a2a45 !important;
}

[data-theme="dark"] .week-table tbody tr {
  border-bottom-color: #222240 !important;
}

[data-theme="dark"] .week-table td {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Fun fact box */
[data-theme="dark"] .fun-fact {
  background: #1a1a30 !important;
  border-color: #2a2a45 !important;
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Model rankings */
[data-theme="dark"] .ranking-table tr:nth-child(even) {
  background: #1e1e35;
}

[data-theme="dark"] .ranking-table tr:hover {
  background: #252545;
}


/* ═══════════════════════════════════════════════════════════════════════════
   FORECAST RISK SECTIONS — inline gradient overrides
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] [style*="background:linear-gradient(180deg, #fff5f5, #ffffff)"] {
  background: #1f1418 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

[data-theme="dark"] [style*="background:linear-gradient(180deg, #f8fafc, #ffffff)"] {
  background: #1a1a2e !important;
  border-color: #2a2a45 !important;
}

[data-theme="dark"] [style*="background:#fed7d7"] {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CATCH-ALL: remaining inline white backgrounds
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background:#ffffff"] {
  background: #1a1a2e !important;
}

[data-theme="dark"] [style*="background:#f8f6f3"],
[data-theme="dark"] [style*="background: #f8f6f3"] {
  background: #1e1e35 !important;
}

[data-theme="dark"] [style*="border:1px solid #e2e8f0"],
[data-theme="dark"] [style*="border: 1px solid #e2e8f0"] {
  border-color: #2a2a45 !important;
}

[data-theme="dark"] [style*="border:1px solid #fed7d7"],
[data-theme="dark"] [style*="border: 1px solid #fed7d7"] {
  border-color: rgba(239, 68, 68, 0.4) !important;
}

[data-theme="dark"] [style*="border:1px solid #fefcbf"],
[data-theme="dark"] [style*="border: 1px solid #fefcbf"] {
  border-color: rgba(245, 158, 11, 0.4) !important;
}

[data-theme="dark"] [style*="border:1px solid #9ae6b4"],
[data-theme="dark"] [style*="border: 1px solid #9ae6b4"] {
  border-color: rgba(16, 185, 129, 0.4) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CSS VARIABLE OVERRIDES — for forecast & history pages
   These pages use :root CSS variables. Override them for dark mode.
   Charts and tables get SOLID backgrounds for max readability.
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] {
  --bg-body: #0a0a1a;
  --bg-container: #141425;
  --bg-header: linear-gradient(160deg, #1e1040 0%, #102040 40%, #0a1a3e 100%);
  --bg-section: #1a1a2e;
  --bg-footer: #121220;
  --text-primary: #e0e1dd;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-faint: rgba(255, 255, 255, 0.35);
  --text-header: #ffffff;
  --border-color: #2a2a45;
  --border-footer: #222240;
  --table-header-bg: #1e1e38;
  --table-hourly-bg: #152525;
  --table-row-even: #1a1a30;
  --table-row-odd: #141425;
  --card-bg: #1a1a2e;
  --shadow-container: 0 8px 40px rgba(0, 0, 0, 0.5);
  --link-color: #a5b4fc;
  --summary-bg: rgba(255, 255, 255, 0.06);
  --fun-fact-bg: #1a1a30;
  --fun-fact-text: #fcd34d;
  --accent: #f87171;
  --accent-soft: rgba(248, 113, 113, 0.12);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOGGLE BUTTON STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

#theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1b263b;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 6px 14px 6px 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  user-select: none;
  cursor: pointer;
  transition: all 0.3s;
}

#theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

#theme-toggle #theme-icon {
  font-size: 14px;
}

#theme-toggle #theme-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: color 0.3s;
}


/* ═══════════════════════════════════════════════════════════════════════════
   EMBER THEME — Jurassic Park lab aesthetic
   Deep black reptilian darkness above, warm amber/copper lab glow below,
   yellow-green accents, honey-gold on absolute darkness
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="ember"] .bg-animated {
  position: fixed; inset: 0; z-index: -2;
  background: radial-gradient(ellipse at 50% 130%, rgba(196, 122, 32, 0.12) 0%, rgba(139, 64, 16, 0.06) 25%, #000000 55%);
  animation: none;
}

[data-theme="ember"] .orb {
  position: fixed; border-radius: 50%; filter: blur(100px); opacity: 0.18;
  animation: orbFloat 25s ease-in-out infinite; pointer-events: none;
}
[data-theme="ember"] .orb-1 { width: 600px; height: 300px; background: #c47a20; bottom: -150px; left: 10%; animation-delay: 0s; }
[data-theme="ember"] .orb-2 { width: 500px; height: 250px; background: #8b4010; bottom: -120px; right: 10%; animation-delay: -8s; }
[data-theme="ember"] .orb-3 { width: 350px; height: 180px; background: #a0b800; bottom: -80px; left: 45%; animation-delay: -15s; opacity: 0.08; }

[data-theme="ember"] body { background: #000000; color: #e8dcc0; }

[data-theme="ember"] .hero {
  background: #000000; border: 1px solid #3d2a10;
  border-bottom: 2px solid rgba(196, 122, 32, 0.5);
  box-shadow: 0 4px 30px rgba(196, 122, 32, 0.15), inset 0 -20px 40px rgba(139, 64, 16, 0.05);
}
[data-theme="ember"] .hero::before { background: radial-gradient(ellipse at 50% 100%, rgba(196, 122, 32, 0.1) 0%, transparent 60%); }
[data-theme="ember"] .hero h1 {
  color: #fff; background: linear-gradient(180deg, #ffffff 0%, #e8960a 50%, #8b4010 100%);
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
[data-theme="ember"] .hero p { color: rgba(196, 160, 80, 0.5); }

[data-theme="ember"] .cw-widget { background: rgba(196, 122, 32, 0.1); }
[data-theme="ember"] .cw-temp { color: #fef3c7; }
[data-theme="ember"] .cw-desc { color: rgba(196, 160, 80, 0.8); }
[data-theme="ember"] .cw-secondary { color: rgba(196, 160, 80, 0.6); }

[data-theme="ember"] .tabs { background: #050505; border: 1px solid #3d2a10; }
[data-theme="ember"] .tab { color: rgba(196, 160, 80, 0.4); }
[data-theme="ember"] .tab:hover { color: rgba(232, 200, 120, 0.8); }
[data-theme="ember"] .tab.active {
  background: rgba(196, 122, 32, 0.15); color: #e8960a;
  box-shadow: 0 0 20px rgba(196, 122, 32, 0.2); border: 1px solid rgba(196, 122, 32, 0.4);
}

[data-theme="ember"] .card {
  background: #0a0804; border: 1px solid #2a1c08;
  border-bottom: 1px solid rgba(196, 122, 32, 0.2); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}
[data-theme="ember"] .card-label { color: #c47a20; border-bottom: 1px solid #2a1c08; padding-bottom: 8px; }
[data-theme="ember"] .card a { color: rgba(232, 220, 192, 0.8); }
[data-theme="ember"] .card a:hover { background: rgba(196, 122, 32, 0.06); border-color: rgba(196, 122, 32, 0.3); }
[data-theme="ember"] .card a .arrow { color: #c47a20; }
[data-theme="ember"] .bottom-links a { color: #e8960a; }

[data-theme="ember"] .container {
  background: #050402; border: 1px solid #2a1c08;
  border-bottom: 1px solid rgba(196, 122, 32, 0.25); box-shadow: 0 12px 60px rgba(0, 0, 0, 0.8);
}
[data-theme="ember"] h1 { color: #e8960a; }
[data-theme="ember"] .subtitle { color: rgba(196, 160, 80, 0.4); }
[data-theme="ember"] h2 { color: #e8dcc0; border-bottom-color: #2a1c08; }
[data-theme="ember"] h3 { color: rgba(232, 220, 192, 0.9); }
[data-theme="ember"] p, [data-theme="ember"] li { color: rgba(232, 220, 192, 0.75); }
[data-theme="ember"] a { color: #e8960a; }
[data-theme="ember"] a:hover { color: #fbbf24; }
[data-theme="ember"] code { background: #0f0a04; color: #e8960a; border: 1px solid #3d2a10; }
[data-theme="ember"] pre { background: #000000; border: 1px solid #3d2a10; color: #e8dcc0; }

[data-theme="ember"] table { border-color: #2a1c08; }
[data-theme="ember"] th { background: #1a1005; border-color: #3d2a10; color: #e8960a; }
[data-theme="ember"] td { border-color: #1a1005; color: rgba(232, 220, 192, 0.8); }
[data-theme="ember"] tr:hover td { background: rgba(196, 122, 32, 0.04); }

[data-theme="ember"] .box { background: #0a0804; border-color: #3d2a10; }
[data-theme="ember"] .box-blue { background: #0a0804; border-color: rgba(196, 122, 32, 0.3); }
[data-theme="ember"] .box-green { background: #040a04; border-color: rgba(160, 184, 0, 0.25); }
[data-theme="ember"] .box-amber { background: #0f0a04; border-color: rgba(196, 122, 32, 0.5); }
[data-theme="ember"] .box-purple { background: #080408; border-color: rgba(196, 122, 32, 0.3); }
[data-theme="ember"] .box-red { background: #0a0404; border-color: rgba(185, 28, 28, 0.35); }
[data-theme="ember"] .diagram { background: #000000; border: 1px solid #3d2a10; color: #e8960a; }
[data-theme="ember"] .footer { border-top-color: #2a1c08; color: rgba(196, 160, 80, 0.25); }

[data-theme="ember"] .chart-box { background: #0a0804 !important; border: 1px solid #3d2a10 !important; border-bottom-color: rgba(196, 122, 32, 0.25) !important; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important; }
[data-theme="ember"] .graph-container { background: #0a0804 !important; border-color: #3d2a10 !important; }
[data-theme="ember"] .section-title { color: #c47a20 !important; }
[data-theme="ember"] .section-title::after { background: #2a1c08 !important; }
[data-theme="ember"] .fun-fact { background: #0a0804 !important; border-color: #3d2a10 !important; color: #e8dcc0 !important; }
[data-theme="ember"] .week-table { border-color: #3d2a10 !important; }
[data-theme="ember"] .week-table tbody tr { border-bottom-color: #1a1005 !important; }
[data-theme="ember"] .week-table td { color: rgba(232, 220, 192, 0.85) !important; }

[data-theme="ember"] [style*="background:linear-gradient(180deg, #fff5f5, #ffffff)"] { background: #0a0404 !important; border-color: rgba(185, 28, 28, 0.35) !important; }
[data-theme="ember"] [style*="background:linear-gradient(180deg, #f8fafc, #ffffff)"] { background: #0a0804 !important; border-color: #3d2a10 !important; }

[data-theme="ember"] [style*="background:#fff"], [data-theme="ember"] [style*="background: #fff"], [data-theme="ember"] [style*="background:#ffffff"] { background: #0a0804 !important; }
[data-theme="ember"] [style*="background:#f8f6f3"] { background: #0f0a04 !important; }
[data-theme="ember"] [style*="background:#f7fafc"] { background: #0a0804 !important; }
[data-theme="ember"] [style*="background:#edf2f7"] { background: #1a1005 !important; }
[data-theme="ember"] [style*="background:#fff5f5"] { background: #0a0404 !important; color: #fca5a5 !important; }
[data-theme="ember"] [style*="background:#fffff0"] { background: #0f0a04 !important; color: #fde68a !important; }
[data-theme="ember"] [style*="background:#f0fff4"] { background: #040a04 !important; color: #6ee7b7 !important; }
[data-theme="ember"] [style*="background:#ebf8ff"] { background: #040508 !important; color: #93c5fd !important; }
[data-theme="ember"] [style*="background:#fed7d7"] { background: rgba(185, 28, 28, 0.12) !important; color: #fca5a5 !important; }
[data-theme="ember"] [style*="color:#1a202c"] { color: #e8dcc0 !important; }
[data-theme="ember"] [style*="color:#718096"] { color: rgba(196, 160, 80, 0.55) !important; }
[data-theme="ember"] [style*="color:#4a5568"] { color: rgba(232, 220, 192, 0.7) !important; }
[data-theme="ember"] [style*="color:#2d3748"] { color: rgba(232, 220, 192, 0.85) !important; }
[data-theme="ember"] [style*="color:#742a2a"] { color: #fca5a5 !important; }
[data-theme="ember"] [style*="color:#276749"] { color: #a0b800 !important; }
[data-theme="ember"] [style*="color:#744210"] { color: #fbbf24 !important; }
[data-theme="ember"] [style*="color:#c53030"] { color: #fca5a5 !important; }
[data-theme="ember"] [style*="border:1px solid #e2e8f0"] { border-color: #3d2a10 !important; }

[data-theme="ember"] .header { background: linear-gradient(180deg, #000000 0%, rgba(139, 64, 16, 0.06) 100%) !important; border-bottom: 1px solid rgba(196, 122, 32, 0.3); }

[data-theme="ember"] {
  --bg-body: #000000;
  --bg-container: #050402;
  --bg-header: linear-gradient(180deg, #000000 0%, rgba(139, 64, 16, 0.06) 100%);
  --bg-section: #0a0804;
  --bg-footer: #000000;
  --text-primary: #e8dcc0;
  --text-secondary: rgba(232, 220, 192, 0.85);
  --text-muted: #c47a20;
  --text-faint: rgba(196, 160, 80, 0.35);
  --text-header: #ffffff;
  --border-color: #3d2a10;
  --border-footer: #2a1c08;
  --table-header-bg: #1a1005;
  --table-hourly-bg: #1a0f05;
  --table-row-even: #0a0804;
  --table-row-odd: #050402;
  --card-bg: #0a0804;
  --shadow-container: 0 12px 60px rgba(0, 0, 0, 0.8);
  --link-color: #e8960a;
  --summary-bg: rgba(196, 122, 32, 0.06);
  --fun-fact-bg: #0a0804;
  --fun-fact-text: #e8dcc0;
  --accent: #c47a20;
  --accent-soft: rgba(196, 122, 32, 0.08);
}


/* ═══════════════════════════════════════════════════════════════════════════
   CRIMSON THEME — Red and white with black contours
   Activated by <html data-theme="crimson">
   Clean, bold, high-contrast — like a Swiss poster design
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── No animated background — crisp and clean ─────────────────────────── */
[data-theme="crimson"] .bg-animated { display: none !important; }
[data-theme="crimson"] .orb { display: none !important; }

/* ─── Base — white background ──────────────────────────────────────────── */
[data-theme="crimson"] body {
  background: #fafafa;
  color: #1a1a1a;
}

/* ─── Hero — bold red ──────────────────────────────────────────────────── */
[data-theme="crimson"] .hero {
  background: #dc2626;
  border: 2px solid #1a1a1a;
  border-radius: 12px;
}

[data-theme="crimson"] .hero::before {
  background: none;
}

[data-theme="crimson"] .hero h1 {
  color: #ffffff;
  background: none;
  -webkit-text-fill-color: #ffffff;
}

[data-theme="crimson"] .hero p {
  color: rgba(255, 255, 255, 0.8);
}

/* ─── Tabs — outlined ──────────────────────────────────────────────────── */
[data-theme="crimson"] .tabs {
  background: #ffffff;
  border: 2px solid #1a1a1a;
}

[data-theme="crimson"] .tab {
  color: #4a4a4a;
}

[data-theme="crimson"] .tab:hover {
  color: #dc2626;
}

[data-theme="crimson"] .tab.active {
  background: #dc2626;
  color: #ffffff;
  box-shadow: none;
  border: none;
  border-radius: 6px;
}

/* ─── Cards — white with black border ─────────────────────────────────── */
[data-theme="crimson"] .card {
  background: #ffffff;
  border: 2px solid #1a1a1a;
  box-shadow: 4px 4px 0 #1a1a1a;
  border-radius: 10px;
}

[data-theme="crimson"] .card-label {
  color: #dc2626;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 8px;
  font-weight: 700;
}

[data-theme="crimson"] .card a {
  color: #1a1a1a;
}

[data-theme="crimson"] .card a:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

[data-theme="crimson"] .card a .arrow {
  color: #dc2626;
}

[data-theme="crimson"] .bottom-links a {
  color: #dc2626;
  font-weight: 700;
}

/* ─── Container (docs) ─────────────────────────────────────────────────── */
[data-theme="crimson"] .container {
  background: #ffffff;
  border: 2px solid #1a1a1a;
  box-shadow: 6px 6px 0 #1a1a1a;
}

[data-theme="crimson"] h1 { color: #dc2626; }
[data-theme="crimson"] .subtitle { color: #6b6b6b; }
[data-theme="crimson"] h2 { color: #1a1a1a; border-bottom: 2px solid #1a1a1a; }
[data-theme="crimson"] h3 { color: #1a1a1a; }
[data-theme="crimson"] p, [data-theme="crimson"] li { color: #2d2d2d; }
[data-theme="crimson"] a { color: #dc2626; font-weight: 600; }
[data-theme="crimson"] a:hover { color: #991b1b; }
[data-theme="crimson"] code { background: #f5f5f5; color: #dc2626; border: 1px solid #e5e5e5; }
[data-theme="crimson"] pre { background: #1a1a1a; border: 2px solid #1a1a1a; color: #f5f5f5; }

/* ─── Tables — strong borders ──────────────────────────────────────────── */
[data-theme="crimson"] table { border: 2px solid #1a1a1a; border-collapse: collapse; }
[data-theme="crimson"] th { background: #dc2626; border: 1px solid #1a1a1a; color: #ffffff; }
[data-theme="crimson"] td { border: 1px solid #1a1a1a; color: #1a1a1a; }
[data-theme="crimson"] tr:nth-child(even) td { background: #fafafa; }
[data-theme="crimson"] tr:hover td { background: #fef2f2; }

/* ─── Boxes ────────────────────────────────────────────────────────────── */
[data-theme="crimson"] .box { background: #fafafa; border: 2px solid #1a1a1a; }
[data-theme="crimson"] .box-blue { background: #fef2f2; border-color: #dc2626; }
[data-theme="crimson"] .box-green { background: #f0fdf4; border-color: #1a1a1a; }
[data-theme="crimson"] .box-amber { background: #fffbeb; border-color: #1a1a1a; }
[data-theme="crimson"] .box-purple { background: #faf5ff; border-color: #1a1a1a; }
[data-theme="crimson"] .box-red { background: #fef2f2; border-color: #dc2626; }

[data-theme="crimson"] .diagram { background: #1a1a1a; border: 2px solid #1a1a1a; color: #f5f5f5; }
[data-theme="crimson"] .footer { border-top: 2px solid #1a1a1a; color: #6b6b6b; }

/* ─── Charts — white with black frame ─────────────────────────────────── */
[data-theme="crimson"] .chart-box {
  background: #ffffff !important;
  border: 2px solid #1a1a1a !important;
  box-shadow: 3px 3px 0 #1a1a1a !important;
}

[data-theme="crimson"] .graph-container {
  background: #ffffff !important;
  border: 2px solid #1a1a1a !important;
}

[data-theme="crimson"] .section-title { color: #dc2626 !important; font-weight: 800 !important; }
[data-theme="crimson"] .section-title::after { background: #1a1a1a !important; height: 2px !important; }
[data-theme="crimson"] .fun-fact { background: #fffbeb !important; border: 2px solid #1a1a1a !important; color: #1a1a1a !important; }

/* ─── Risk sections ────────────────────────────────────────────────────── */
[data-theme="crimson"] [style*="background:linear-gradient(180deg, #fff5f5, #ffffff)"] {
  background: #fef2f2 !important;
  border: 2px solid #dc2626 !important;
}
[data-theme="crimson"] [style*="background:linear-gradient(180deg, #f8fafc, #ffffff)"] {
  background: #ffffff !important;
  border: 2px solid #1a1a1a !important;
}

/* ─── Inline overrides ─────────────────────────────────────────────────── */
[data-theme="crimson"] [style*="background:#fff5f5"] { background: #fef2f2 !important; }
[data-theme="crimson"] [style*="background:#fffff0"] { background: #fffbeb !important; }
[data-theme="crimson"] [style*="background:#f0fff4"] { background: #f0fdf4 !important; }
[data-theme="crimson"] [style*="background:#f7fafc"] { background: #fafafa !important; }
[data-theme="crimson"] [style*="background:#edf2f7"] { background: #dc2626 !important; color: #fff !important; }
[data-theme="crimson"] [style*="background:#ebf8ff"] { background: #fef2f2 !important; }
[data-theme="crimson"] [style*="background:#fed7d7"] { background: #fecaca !important; }
[data-theme="crimson"] [style*="border:1px solid #e2e8f0"] { border: 2px solid #1a1a1a !important; }

[data-theme="crimson"] .header {
  background: #dc2626 !important;
}

/* ─── CSS variables for forecast/history ───────────────────────────────── */
[data-theme="crimson"] {
  --bg-body: #fafafa;
  --bg-container: #ffffff;
  --bg-header: linear-gradient(160deg, #dc2626 0%, #b91c1c 40%, #991b1b 100%);
  --bg-section: #ffffff;
  --bg-footer: #fafafa;
  --text-primary: #1a1a1a;
  --text-secondary: #2d2d2d;
  --text-muted: #6b6b6b;
  --text-faint: #9ca3af;
  --text-header: #ffffff;
  --border-color: #1a1a1a;
  --border-footer: #1a1a1a;
  --table-header-bg: #dc2626;
  --table-hourly-bg: #991b1b;
  --table-row-even: #fafafa;
  --table-row-odd: #ffffff;
  --card-bg: #ffffff;
  --shadow-container: 6px 6px 0 #1a1a1a;
  --link-color: #dc2626;
  --summary-bg: rgba(220, 38, 38, 0.06);
  --fun-fact-bg: #fffbeb;
  --fun-fact-text: #92400e;
  --accent: #dc2626;
  --accent-soft: rgba(220, 38, 38, 0.08);
}


/* ═══════════════════════════════════════════════════════════════════════════
   JP THEME — Jurassic Park cinematic (red/orange uplighting on pitch black)
   Pitch black void, dramatic red/orange uplighting from below,
   cinematic silhouette feel, high contrast amber on absolute darkness
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Background — near-total black with subtle bottom glow ────────────── */
[data-theme="jp"] .bg-animated {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(ellipse at 50% 120%, rgba(180, 60, 0, 0.15) 0%, rgba(80, 20, 0, 0.05) 30%, #000000 60%);
  animation: none;
}

/* ─── Orbs — deep red underlighting from below ─────────────────────────── */
[data-theme="jp"] .orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  animation: orbFloat 25s ease-in-out infinite;
  pointer-events: none;
}

[data-theme="jp"] .orb-1 { width: 600px; height: 300px; background: #b91c1c; bottom: -150px; left: 10%; animation-delay: 0s; }
[data-theme="jp"] .orb-2 { width: 500px; height: 250px; background: #c2410c; bottom: -120px; right: 10%; animation-delay: -8s; }
[data-theme="jp"] .orb-3 { width: 400px; height: 200px; background: #92400e; bottom: -100px; left: 40%; animation-delay: -15s; }

/* ─── Base — absolute black ────────────────────────────────────────────── */
[data-theme="jp"] body {
  background: #000000;
  color: #e8dcc8;
}

/* ─── Hero — black with orange bottom-edge glow ────────────────────────── */
[data-theme="jp"] .hero {
  background: #000000;
  border: 1px solid #2a1500;
  border-bottom: 2px solid rgba(249, 115, 22, 0.5);
  box-shadow: 0 4px 30px rgba(180, 60, 0, 0.2), inset 0 -20px 40px rgba(180, 60, 0, 0.05);
}

[data-theme="jp"] .hero::before {
  background: radial-gradient(ellipse at 50% 100%, rgba(249, 115, 22, 0.12) 0%, transparent 60%);
}

[data-theme="jp"] .hero h1 {
  color: #ffffff;
  background: linear-gradient(180deg, #ffffff 0%, #f97316 70%, #b91c1c 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="jp"] .hero p {
  color: rgba(232, 180, 120, 0.5);
}

[data-theme="jp"] .cw-widget { background: rgba(232, 120, 60, 0.08); }
[data-theme="jp"] .cw-temp { color: #fef3c7; }
[data-theme="jp"] .cw-desc { color: rgba(232, 180, 120, 0.8); }
[data-theme="jp"] .cw-secondary { color: rgba(232, 180, 120, 0.6); }

/* ─── Tabs ─────────────────────────────────────────────────────────────── */
[data-theme="jp"] .tabs {
  background: #050505;
  border: 1px solid #2a1500;
}

[data-theme="jp"] .tab {
  color: rgba(232, 180, 120, 0.4);
}

[data-theme="jp"] .tab:hover {
  color: rgba(232, 180, 120, 0.8);
}

[data-theme="jp"] .tab.active {
  background: rgba(180, 60, 0, 0.2);
  color: #f97316;
  box-shadow: 0 0 20px rgba(180, 60, 0, 0.3), inset 0 -2px 8px rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.4);
}

/* ─── Cards — pitch black with faint amber edge ───────────────────────── */
[data-theme="jp"] .card {
  background: #050505;
  border: 1px solid #1a0f00;
  border-bottom: 1px solid rgba(180, 60, 0, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 2px 10px rgba(180, 60, 0, 0.05);
}

[data-theme="jp"] .card-label {
  color: #b45309;
  border-bottom: 1px solid #1a0f00;
  padding-bottom: 8px;
}

[data-theme="jp"] .card a {
  color: rgba(232, 220, 200, 0.8);
}

[data-theme="jp"] .card a:hover {
  background: rgba(180, 60, 0, 0.08);
  border-color: rgba(249, 115, 22, 0.3);
}

[data-theme="jp"] .card a .arrow {
  color: #b45309;
}

[data-theme="jp"] .bottom-links a {
  color: #f97316;
}

/* ─── Container (docs) — black void ────────────────────────────────────── */
[data-theme="jp"] .container {
  background: #030303;
  border: 1px solid #1a0f00;
  border-bottom: 1px solid rgba(180, 60, 0, 0.3);
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.8), 0 4px 20px rgba(180, 60, 0, 0.05);
}

[data-theme="jp"] h1 { color: #f97316; }
[data-theme="jp"] .subtitle { color: rgba(232, 180, 120, 0.4); }
[data-theme="jp"] h2 { color: #e8dcc8; border-bottom-color: #1a0f00; }
[data-theme="jp"] h3 { color: rgba(232, 220, 200, 0.9); }
[data-theme="jp"] p, [data-theme="jp"] li { color: rgba(232, 220, 200, 0.75); }
[data-theme="jp"] a { color: #f97316; }
[data-theme="jp"] a:hover { color: #fb923c; }
[data-theme="jp"] code { background: #0a0500; color: #f97316; border: 1px solid #2a1500; }
[data-theme="jp"] pre { background: #000000; border: 1px solid #2a1500; color: #e8dcc8; }

/* ─── Tables — black with amber headers ────────────────────────────────── */
[data-theme="jp"] table { border-color: #1a0f00; }
[data-theme="jp"] th { background: #1a0a00; border-color: #2a1500; color: #f97316; }
[data-theme="jp"] td { border-color: #120a00; color: rgba(232, 220, 200, 0.8); }
[data-theme="jp"] tr:hover td { background: rgba(180, 60, 0, 0.05); }

/* ─── Boxes ────────────────────────────────────────────────────────────── */
[data-theme="jp"] .box { background: #050505; border-color: #2a1500; }
[data-theme="jp"] .box-blue { background: #050505; border-color: rgba(249, 115, 22, 0.3); }
[data-theme="jp"] .box-green { background: #030805; border-color: rgba(132, 204, 22, 0.25); }
[data-theme="jp"] .box-amber { background: #080500; border-color: rgba(249, 115, 22, 0.5); }
[data-theme="jp"] .box-purple { background: #050308; border-color: rgba(180, 60, 0, 0.3); }
[data-theme="jp"] .box-red { background: #080303; border-color: rgba(185, 28, 28, 0.4); }

[data-theme="jp"] .diagram { background: #000000; border: 1px solid #2a1500; color: #f97316; }
[data-theme="jp"] .footer { border-top-color: #1a0f00; color: rgba(232, 180, 120, 0.25); }

/* ─── Charts & data — black with faint warm border ─────────────────────── */
[data-theme="jp"] .chart-box {
  background: #030303 !important;
  border: 1px solid #2a1500 !important;
  border-bottom-color: rgba(180, 60, 0, 0.3) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="jp"] .graph-container {
  background: #030303 !important;
  border-color: #2a1500 !important;
}

[data-theme="jp"] .section-title { color: #b45309 !important; }
[data-theme="jp"] .section-title::after { background: #1a0f00 !important; }
[data-theme="jp"] .fun-fact { background: #050505 !important; border-color: #2a1500 !important; color: #e8dcc8 !important; }

[data-theme="jp"] .week-table { border-color: #2a1500 !important; }
[data-theme="jp"] .week-table tbody tr { border-bottom-color: #120a00 !important; }
[data-theme="jp"] .week-table td { color: rgba(232, 220, 200, 0.85) !important; }

/* ─── Risk sections ────────────────────────────────────────────────────── */
[data-theme="jp"] [style*="background:linear-gradient(180deg, #fff5f5, #ffffff)"] {
  background: #080303 !important;
  border-color: rgba(185, 28, 28, 0.4) !important;
}
[data-theme="jp"] [style*="background:linear-gradient(180deg, #f8fafc, #ffffff)"] {
  background: #030303 !important;
  border-color: #2a1500 !important;
}

/* ─── Inline overrides ─────────────────────────────────────────────────── */
[data-theme="jp"] [style*="background:#fff"],
[data-theme="jp"] [style*="background: #fff"],
[data-theme="jp"] [style*="background:#ffffff"] {
  background: #050505 !important;
}
[data-theme="jp"] [style*="background:#f8f6f3"] { background: #080505 !important; }
[data-theme="jp"] [style*="background:#f7fafc"] { background: #050505 !important; }
[data-theme="jp"] [style*="background:#edf2f7"] { background: #1a0a00 !important; }
[data-theme="jp"] [style*="background:#fff5f5"] { background: #080303 !important; color: #fca5a5 !important; }
[data-theme="jp"] [style*="background:#fffff0"] { background: #080500 !important; color: #fde68a !important; }
[data-theme="jp"] [style*="background:#f0fff4"] { background: #030805 !important; color: #6ee7b7 !important; }
[data-theme="jp"] [style*="background:#ebf8ff"] { background: #030508 !important; color: #93c5fd !important; }
[data-theme="jp"] [style*="background:#fed7d7"] { background: rgba(185, 28, 28, 0.15) !important; color: #fca5a5 !important; }

[data-theme="jp"] [style*="color:#1a202c"] { color: #e8dcc8 !important; }
[data-theme="jp"] [style*="color:#718096"] { color: rgba(232, 180, 120, 0.5) !important; }
[data-theme="jp"] [style*="color:#4a5568"] { color: rgba(232, 220, 200, 0.7) !important; }
[data-theme="jp"] [style*="color:#2d3748"] { color: rgba(232, 220, 200, 0.85) !important; }
[data-theme="jp"] [style*="color:#742a2a"] { color: #fca5a5 !important; }
[data-theme="jp"] [style*="color:#276749"] { color: #6ee7b7 !important; }
[data-theme="jp"] [style*="color:#744210"] { color: #fde68a !important; }
[data-theme="jp"] [style*="color:#c53030"] { color: #fca5a5 !important; }
[data-theme="jp"] [style*="border:1px solid #e2e8f0"] { border-color: #2a1500 !important; }

/* ─── Header in generated pages ────────────────────────────────────────── */
[data-theme="jp"] .header {
  background: linear-gradient(180deg, #000000 0%, rgba(180, 60, 0, 0.08) 100%) !important;
  border-bottom: 1px solid rgba(249, 115, 22, 0.3);
}

/* ─── CSS variables for forecast/history ───────────────────────────────── */
[data-theme="jp"] {
  --bg-body: #000000;
  --bg-container: #030303;
  --bg-header: linear-gradient(180deg, #000000 0%, rgba(180, 60, 0, 0.08) 100%);
  --bg-section: #050505;
  --bg-footer: #000000;
  --text-primary: #e8dcc8;
  --text-secondary: rgba(232, 220, 200, 0.85);
  --text-muted: #b45309;
  --text-faint: rgba(232, 180, 120, 0.35);
  --text-header: #ffffff;
  --border-color: #2a1500;
  --border-footer: #1a0f00;
  --table-header-bg: #1a0a00;
  --table-hourly-bg: #1a0500;
  --table-row-even: #0a0500;
  --table-row-odd: #030303;
  --card-bg: #0a0500;
  --shadow-container: 0 8px 60px rgba(180, 60, 0, 0.15);
  --link-color: #f97316;
  --summary-bg: rgba(249, 115, 22, 0.06);
  --fun-fact-bg: #0a0500;
  --fun-fact-text: #f97316;
  --accent: #dc2626;
  --accent-soft: rgba(220, 38, 38, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRISM THEME — Bright cinematic, iridescent light refraction
   White-hot brightness, prismatic rainbow accents, frosted glass,
   like looking through a crystal in direct sunlight
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Background — brilliant white with prismatic shimmer ──────────────── */
[data-theme="prism"] .bg-animated {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(135deg, #f0f4ff 0%, #fff0f5 25%, #f0fff4 50%, #fffff0 75%, #f0f4ff 100%);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
}

[data-theme="prism"] .orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: orbFloat 18s ease-in-out infinite;
  pointer-events: none;
}

[data-theme="prism"] .orb-1 { width: 500px; height: 500px; background: linear-gradient(135deg, #a78bfa, #60a5fa); top: -100px; right: -50px; animation-delay: 0s; }
[data-theme="prism"] .orb-2 { width: 450px; height: 450px; background: linear-gradient(135deg, #fb7185, #f472b6); bottom: -50px; left: -50px; animation-delay: -6s; }
[data-theme="prism"] .orb-3 { width: 400px; height: 400px; background: linear-gradient(135deg, #34d399, #67e8f9); top: 30%; left: 20%; animation-delay: -12s; }

/* ─── Base ─────────────────────────────────────────────────────────────── */
[data-theme="prism"] body {
  background: linear-gradient(135deg, #ede9fe 0%, #fce7f3 50%, #ecfdf5 100%) !important;
  color: #1e1b4b;
}

/* ─── Hero — frosted glass with rainbow border ─────────────────────────── */
[data-theme="prism"] .hero {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 2px solid rgba(99, 102, 241, 0.3) !important;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15), 0 0 0 1px rgba(255,255,255,0.8) inset, 0 0 60px rgba(139, 92, 246, 0.08);
  position: relative;
  overflow: hidden;
}

[data-theme="prism"] .hero::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, #a78bfa, #60a5fa, #34d399, #fbbf24, #fb7185, #a78bfa);
  background-size: 200% 200%;
  animation: rainbowBorder 12s linear infinite;
  z-index: -1;
  opacity: 0.7;
}

@keyframes rainbowBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

[data-theme="prism"] .hero::before {
  background: none;
}

[data-theme="prism"] .hero h1 {
  color: #1e1b4b;
  background: linear-gradient(135deg, #5b21b6 0%, #1d4ed8 20%, #0e7490 40%, #047857 60%, #b45309 80%, #5b21b6 100%);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerText 10s ease-in-out infinite;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

@keyframes shimmerText {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

[data-theme="prism"] .hero p {
  color: #4338ca;
  font-weight: 600;
}

[data-theme="prism"] .cw-widget { background: rgba(99, 102, 241, 0.08); }
[data-theme="prism"] .cw-temp { color: #1e1b4b; }
[data-theme="prism"] .cw-desc { color: #3730a3; }
[data-theme="prism"] .cw-secondary { color: #4338ca; }

/* ─── Tabs — frosted with rainbow active ───────────────────────────────── */
[data-theme="prism"] .tabs {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.06);
}

[data-theme="prism"] .tab {
  color: #6366f1;
  font-weight: 500;
}

[data-theme="prism"] .tab:hover {
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.05);
}

[data-theme="prism"] .tab.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  border: none;
  border-radius: 8px;
}

/* ─── Cards — bright frosted glass ─────────────────────────────────────── */
[data-theme="prism"] .card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.06), 0 0 0 1px rgba(255,255,255,0.9) inset;
  border-radius: 14px;
}

[data-theme="prism"] .card-label {
  color: #7c3aed;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  padding-bottom: 8px;
  font-weight: 700;
}

[data-theme="prism"] .card a {
  color: #1e1b4b;
}

[data-theme="prism"] .card a:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
  border-color: rgba(99, 102, 241, 0.2);
}

[data-theme="prism"] .card a .arrow {
  color: #6366f1;
}

[data-theme="prism"] .bottom-links a {
  color: #6366f1;
  font-weight: 600;
}

/* ─── Container (docs) — frosted panel ─────────────────────────────────── */
[data-theme="prism"] .container {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(99, 102, 241, 0.1);
  box-shadow: 0 12px 48px rgba(99, 102, 241, 0.08);
}

[data-theme="prism"] h1 { color: #4f46e5; }
[data-theme="prism"] .subtitle { color: #7c3aed; }
[data-theme="prism"] h2 { color: #1e1b4b; border-bottom: 2px solid; border-image: linear-gradient(to right, transparent, #6366f1, transparent) 1; }
[data-theme="prism"] h3 { color: #312e81; }
[data-theme="prism"] p, [data-theme="prism"] li { color: #374151; }
[data-theme="prism"] a { color: #6366f1; font-weight: 500; }
[data-theme="prism"] a:hover { color: #4f46e5; }
[data-theme="prism"] code { background: rgba(99, 102, 241, 0.08); color: #4f46e5; border: 1px solid rgba(99, 102, 241, 0.12); }
[data-theme="prism"] pre { background: #1e1b4b; border: none; color: #e0e7ff; border-radius: 12px; box-shadow: 0 8px 24px rgba(30, 27, 75, 0.2); }

/* ─── Tables — clean with purple header ────────────────────────────────── */
[data-theme="prism"] table { border-color: rgba(99, 102, 241, 0.12); border-radius: 10px; overflow: hidden; }
[data-theme="prism"] th { background: linear-gradient(135deg, #6366f1, #8b5cf6); border-color: rgba(99, 102, 241, 0.15); color: #ffffff; }
[data-theme="prism"] td { border-color: rgba(99, 102, 241, 0.08); color: #1e1b4b; }
[data-theme="prism"] tr:nth-child(even) td { background: rgba(99, 102, 241, 0.03); }
[data-theme="prism"] tr:hover td { background: rgba(99, 102, 241, 0.06); }

/* ─── Boxes ────────────────────────────────────────────────────────────── */
[data-theme="prism"] .box { background: rgba(255, 255, 255, 0.7); border-color: rgba(99, 102, 241, 0.15); }
[data-theme="prism"] .box-blue { background: rgba(224, 231, 255, 0.5); border-color: rgba(99, 102, 241, 0.3); }
[data-theme="prism"] .box-green { background: rgba(209, 250, 229, 0.5); border-color: rgba(16, 185, 129, 0.3); }
[data-theme="prism"] .box-amber { background: rgba(254, 249, 195, 0.5); border-color: rgba(245, 158, 11, 0.3); }
[data-theme="prism"] .box-purple { background: rgba(237, 233, 254, 0.5); border-color: rgba(139, 92, 246, 0.3); }
[data-theme="prism"] .box-red { background: rgba(254, 226, 226, 0.5); border-color: rgba(239, 68, 68, 0.3); }
[data-theme="prism"] .diagram { background: #1e1b4b; border: none; color: #a5b4fc; border-radius: 12px; }
[data-theme="prism"] .footer { border-top-color: rgba(99, 102, 241, 0.1); color: #6366f1; }

/* ─── Charts — clean white with subtle shadow ──────────────────────────── */
[data-theme="prism"] .chart-box {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(99, 102, 241, 0.1) !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.06) !important;
  border-radius: 12px !important;
}

[data-theme="prism"] .graph-container {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(99, 102, 241, 0.1) !important;
}

[data-theme="prism"] .section-title { color: #6366f1 !important; font-weight: 700 !important; }
[data-theme="prism"] .section-title::after { background: linear-gradient(90deg, rgba(99, 102, 241, 0.3), transparent) !important; }
[data-theme="prism"] .fun-fact { background: linear-gradient(135deg, rgba(254, 249, 195, 0.5), rgba(254, 215, 170, 0.3)) !important; border-color: rgba(245, 158, 11, 0.2) !important; color: #92400e !important; border-radius: 12px !important; }
[data-theme="prism"] .week-table { border-color: rgba(99, 102, 241, 0.12) !important; border-radius: 10px !important; }
[data-theme="prism"] .week-table td { color: #1e1b4b !important; }

/* ─── Risk sections ────────────────────────────────────────────────────── */
[data-theme="prism"] [style*="background:linear-gradient(180deg, #fff5f5, #ffffff)"] { background: rgba(254, 226, 226, 0.5) !important; border-color: rgba(239, 68, 68, 0.2) !important; border-radius: 12px !important; }
[data-theme="prism"] [style*="background:linear-gradient(180deg, #f8fafc, #ffffff)"] { background: rgba(255, 255, 255, 0.8) !important; border-color: rgba(99, 102, 241, 0.12) !important; border-radius: 12px !important; }

/* ─── Inline overrides ─────────────────────────────────────────────────── */
[data-theme="prism"] [style*="background:#fff5f5"] { background: rgba(254, 226, 226, 0.5) !important; }
[data-theme="prism"] [style*="background:#fffff0"] { background: rgba(254, 249, 195, 0.5) !important; }
[data-theme="prism"] [style*="background:#f0fff4"] { background: rgba(209, 250, 229, 0.5) !important; }
[data-theme="prism"] [style*="background:#f7fafc"] { background: rgba(240, 244, 255, 0.5) !important; }
[data-theme="prism"] [style*="background:#edf2f7"] { background: linear-gradient(135deg, #6366f1, #8b5cf6) !important; color: #fff !important; }
[data-theme="prism"] [style*="background:#ebf8ff"] { background: rgba(224, 231, 255, 0.5) !important; }
[data-theme="prism"] [style*="background:#fed7d7"] { background: rgba(254, 205, 211, 0.5) !important; }
[data-theme="prism"] [style*="border:1px solid #e2e8f0"] { border-color: rgba(99, 102, 241, 0.12) !important; }

[data-theme="prism"] .header {
  background: linear-gradient(135deg, #4f46e5, #7c3aed, #6366f1) !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
[data-theme="prism"] .header h1 { color: #ffffff !important; -webkit-text-fill-color: #ffffff; background: none; }
[data-theme="prism"] .header .subtitle { color: rgba(255,255,255,0.9) !important; }
[data-theme="prism"] .header .summary { color: rgba(255,255,255,0.85) !important; }

/* ─── CSS variables ────────────────────────────────────────────────────── */
[data-theme="prism"] {
  --bg-body: #ffffff;
  --bg-container: rgba(255, 255, 255, 0.8);
  --bg-header: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --bg-section: rgba(255, 255, 255, 0.9);
  --bg-footer: rgba(240, 244, 255, 0.5);
  --text-primary: #1e1b4b;
  --text-secondary: #374151;
  --text-muted: #6366f1;
  --text-faint: #a5b4fc;
  --text-header: #ffffff;
  --border-color: rgba(99, 102, 241, 0.12);
  --border-footer: rgba(99, 102, 241, 0.08);
  --table-header-bg: linear-gradient(135deg, #6366f1, #8b5cf6);
  --table-hourly-bg: linear-gradient(135deg, #059669, #0891b2);
  --table-row-even: rgba(99, 102, 241, 0.03);
  --table-row-odd: rgba(255, 255, 255, 0.9);
  --card-bg: rgba(255, 255, 255, 0.75);
  --shadow-container: 0 12px 48px rgba(99, 102, 241, 0.08);
  --link-color: #6366f1;
  --summary-bg: rgba(99, 102, 241, 0.06);
  --fun-fact-bg: linear-gradient(135deg, rgba(254, 249, 195, 0.5), rgba(254, 215, 170, 0.3));
  --fun-fact-text: #92400e;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.08);
}

