/* CSS Variables for Design System */
:root {
  /* Dark Mode Color Palette (Default) */
  --color-bg-primary: #0a0e1a;
  --color-bg-secondary: #121821;
  --color-bg-tertiary: #1a2332;
  --color-text-primary: #e0f2fe;
  --color-text-secondary: #94a3b8;
  --color-accent-primary: #38bdf8;
  --color-accent-secondary: #818cf8;
  --color-accent-glow: #7dd3fc;
  /* Semantic accents */
  --color-danger: #ef4444; /* red-500 */
  --color-danger-600: #dc2626;
  --color-danger-100: #fca5a5;
  --color-success: #22c55e; /* green-500 */
  --color-success-600: #16a34a;
  --color-success-100: #86efac;
  --color-neutral: #a8a29e; /* stone-400-ish */
  --color-neutral-900: #1e1b4b;
  /* Colors for text/icons placed on top of accent backgrounds */
  --color-on-accent: #ffffff;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Typography */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.3);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Color Palette */
html.light {
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8fafc;
  --color-bg-tertiary: #f1f5f9;
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-accent-primary: #0284c7;
  --color-accent-secondary: #6366f1;
  --color-accent-glow: #0ea5e9;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.3);
}

/*
  Tailwind-like color variable mappings and small utility classes
  This block maps commonly-used utility class names in the HTML (for
  example: text-slate-700, bg-white, dark:text-gray-300, etc.) to the
  site's design-system variables above. The key idea: the utilities
  read from variables like --color-text-primary which are overridden
  when `html.light` is present, so the classes automatically flip
  between dark and light appearances.
*/

/* Semantic aliases (point into the design-system variables) */
:root {
  --tw-slate-900: var(--color-text-primary);
  --tw-slate-700: var(--color-text-secondary);
  --tw-slate-600: var(--color-text-secondary);
  --tw-slate-50: var(--color-bg-secondary);
  --tw-slate-800: var(--color-bg-tertiary);
  --tw-bg-default: var(--color-bg-primary);

  --tw-gray-300: var(--color-text-secondary);
  --tw-gray-400: var(--color-text-secondary);

  --tw-teal-600: var(--color-accent-primary);
  --tw-teal-500: var(--color-accent-primary);
  --tw-teal-400: var(--color-accent-secondary);

  /* Additional mappings to cover more utility classes used across `public/` */
  --tw-gray-900: var(--color-text-primary);
  --tw-gray-200: var(--color-text-primary);
  --tw-text-white: var(--color-on-accent);
  --tw-slate-600-light: var(--color-text-secondary);
  --tw-bg-accent-glow: var(--color-accent-glow);
  /* nav/link helper backgrounds (low-alpha versions of accent) */
  --nav-link-bg: rgba(56, 189, 248, 0.08);
  --nav-link-active-bg: rgba(56, 189, 248, 0.16);
  --nav-link-border: rgba(56, 189, 248, 0.2);
}

/* Text color utilities */
.text-slate-900 {
  color: var(--tw-slate-900);
}
.text-slate-700 {
  color: var(--tw-slate-700);
}
.text-slate-600 {
  color: var(--tw-slate-600);
}
.text-slate-500 {
  color: var(--tw-slate-600);
}
.text-teal-600 {
  color: var(--tw-teal-600);
}
.text-teal-400 {
  color: var(--tw-teal-400);
}
.text-sm {
  font-size: 0.875rem;
}
.text-lg {
  font-size: 1.125rem;
}
.text-4xl {
  font-size: 2.25rem;
}
.text-6xl {
  font-size: 3.75rem;
}

.text-gray-900 {
  color: var(--tw-gray-900);
}
.text-gray-400 {
  color: var(--tw-gray-400);
}
.text-gray-300 {
  color: var(--tw-gray-300);
}
.text-white {
  color: var(--tw-text-white);
}

.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.tracking-tight {
  letter-spacing: -0.025em;
}

/* Literal "dark:..." utilities from the HTML are kept and remapped
   to use the same variables. In the project's theme the variables
   themselves change when `html.light` is present, so these classes
   will have the correct light-mode values automatically. */
.dark\:text-white {
  color: var(--tw-slate-900);
}
.dark\:text-teal-400 {
  color: var(--tw-teal-400);
}
.dark\:text-gray-300 {
  color: var(--tw-gray-300);
}
.dark\:text-gray-400 {
  color: var(--tw-gray-400);
}

/* common hover/interactive variants used in markup */
.hover\:bg-teal-400:hover {
  background-color: var(--tw-teal-400);
}
.hover\:text-teal-500:hover {
  color: var(--tw-teal-500);
}

/* Background utilities */
.bg-white {
  background-color: var(--tw-bg-default);
}
.bg-slate-50 {
  background-color: var(--tw-slate-50);
}
.bg-slate-900 {
  background-color: var(--tw-slate-800);
}
.bg-teal-500 {
  background-color: var(--tw-teal-500);
}

.bg-accent-glow {
  background-color: var(--tw-bg-accent-glow);
}

/* Literal dark: background utilities (escaped colon in selector) */
.dark\:bg-slate-800 {
  background-color: var(--tw-slate-800);
}
.dark\:bg-slate-900 {
  background-color: var(--tw-slate-800);
}

/* Border utilities (simple mappings; opacity encoded where used in HTML) */
.border {
  border-width: 1px;
  border-style: solid;
}
.border-slate-200 {
  border-color: rgba(148, 163, 184, 0.12);
}
.dark\:border-slate-700 {
  border-color: rgba(71, 85, 105, 0.18);
}
.border-teal-500\/20 {
  border-color: rgba(56, 189, 248, 0.2);
}
.border-teal-500\/50 {
  border-color: rgba(56, 189, 248, 0.5);
}
.dark\:border-teal-500\/30 {
  border-color: rgba(56, 189, 248, 0.3);
}

.rounded-full {
  border-radius: 9999px;
}

/* spacing helpers commonly used */
.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.p-3 {
  padding: 0.75rem;
}

/* flex/grid helpers (keeps HTML utilities working without adding page-specific rules) */
.flex {
  display: flex;
}
.flex-wrap {
  flex-wrap: wrap;
}
.justify-center {
  justify-content: center;
}
.items-center {
  align-items: center;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.gap-8 {
  gap: 2rem;
}
.grid {
  display: grid;
}
.lg\:grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* small utilities observed in the pages */
.min-h-\[300px\] {
  min-height: 300px;
}
.shadow-lg {
  box-shadow: var(--shadow-lg);
}
.shadow-md {
  box-shadow: var(--shadow-md);
}
.transition-all {
  transition: all var(--transition-base);
}
.duration-200 {
  transition-duration: 200ms;
}
.inline-block {
  display: inline-block;
}
.underline {
  text-decoration: underline;
}

/* Small helper utilities used in the pages */
.rounded-xl {
  border-radius: var(--radius-xl);
}
.rounded-lg {
  border-radius: var(--radius-lg);
}
.p-6 {
  padding: 1.5rem;
}
.p-4 {
  padding: 1rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mt-8 {
  margin-top: 2rem;
}
.max-w-4xl {
  max-width: 56rem;
}
.max-w-3xl {
  max-width: 48rem;
}
.max-w-6xl {
  max-width: 72rem;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.text-center {
  text-align: center;
}
.font-semibold {
  font-weight: 600;
}
.font-bold {
  font-weight: 700;
}
.space-y-2 > * + * {
  margin-top: 0.5rem;
}

/* For links with underline in the markup */
.underline {
  text-decoration: underline;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Chart legend label defaults (used by charts.js) */
.chart-legend {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.chart-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}
.chart-legend .legend-label {
  color: var(--color-text-primary);
  font-size: 0.875rem;
}
html.light .chart-legend .legend-item {
  background: rgba(0, 0, 0, 0.02);
}
html.light .chart-legend .legend-label {
  color: var(--color-text-primary) !important;
}

/* Navigation Header */
#mainNav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(18, 18, 18, 0.95);
  padding: 15px 20px;
  border-bottom: 2px solid var(--color-accent-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: background-color var(--transition-base),
    border-color var(--transition-base);
}

html.light #mainNav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 2px solid var(--color-accent-primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.nav-brand-link:hover {
  opacity: 0.8;
}

.nav-logo {
  width: 40px;
  height: 40px;
}

.nav-brand-name {
  font-size: 24px;
  font-weight: 600;
  color: #44daff;
  letter-spacing: 0.5px;
  transition: color var(--transition-base);
}

html.light .nav-brand-name {
  color: var(--color-accent-primary);
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--color-accent-glow);
  padding: 8px 16px;
  border-radius: 8px;
  transition: all var(--transition-fast);
  font-size: 14px;
}

.nav-link:hover {
  background: var(--nav-link-bg);
  color: var(--color-accent-primary);
  transform: translateY(-2px);
}

.nav-link.active {
  background: var(--nav-link-active-bg);
  color: var(--color-accent-primary);
  border: 1px solid var(--nav-link-border);
}

html.light .nav-link {
  color: #475569;
}

html.light .nav-link:hover {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
}

html.light .nav-link.active {
  background: rgba(2, 132, 199, 0.15);
  color: #0284c7;
  border: 1px solid #0284c7;
}

/* Theme Toggle Button */
#themeToggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nav-link-bg);
  border: 1px solid var(--nav-link-border);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 20px;
  color: var(--color-accent-glow);
}

#themeToggle:hover {
  background: var(--nav-link-active-bg);
  border-color: var(--nav-link-border);
  transform: translateY(-2px);
}

html.light #themeToggle {
  background: var(--nav-link-bg);
  border: 1px solid var(--nav-link-border);
  color: var(--color-text-secondary);
}

html.light #themeToggle:hover {
  background: var(--nav-link-active-bg);
  border-color: var(--nav-link-border);
}

.nav-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.nav-text {
  font-weight: 500;
}

/* Body & Layout */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  /* Fixed, low-alpha aurora background with dark overlay to keep contrast readable */
  background-image: linear-gradient(
      rgba(10, 14, 26, 0.9),
      rgba(10, 14, 26, 0.9)
    ),
    url("/aurora.jpeg");
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
  background-position: center center, center center;
  background-attachment: fixed, fixed;
  color: var(--color-text-primary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-base),
    color var(--transition-base);
}

html.light body {
  /* Light mode: lighter overlay over the aurora background for a softer look */
  background-image: linear-gradient(
      rgba(248, 250, 252, 0.92),
      rgba(241, 245, 249, 0.92)
    ),
    url("/aurora.jpeg");
  color: var(--color-text-primary);
}

/* Header */
header {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg) 0;
  position: relative;
  z-index: 10;
}

header h1 {
  font-weight: 900;
  font-size: clamp(1.5rem, 8vw, 3rem);
  /* letter-spacing: -0.04em; */
  background: linear-gradient(135deg, #44f844, #4d30b8, #ff0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  text-align: center;
  white-space: nowrap;
}

.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-sm);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  max-width: 600px;
  text-align: center;
}

.hero-question {
  font-size: clamp(var(--font-size-lg), 3vw, var(--font-size-2xl));
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.hero-description {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-xl) 0;
  line-height: 1.7;
  font-weight: 600;
  opacity: 0.95;
  text-align: center;
}

.header-subtitle {
  font-weight: 400;
  font-size: clamp(var(--font-size-sm), 2.5vw, var(--font-size-lg));
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--spacing-xl);
  line-height: 1.5;
}

/* Generic border-top/bottom helpers seen in markup */
.border-t {
  border-top-width: 1px;
  border-top-style: solid;
}
.border-b {
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

/* Padding helpers */
.pt-4 {
  padding-top: 1rem;
}
.pb-4 {
  padding-bottom: 1rem;
}
.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.py-20 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.p-8 {
  padding: 2rem;
}

/* Margin helpers */
.mt-16 {
  margin-top: 4rem;
}

/* More spacing utilities */
.space-y-4 > * + * {
  margin-top: 1rem;
}

/* Color dot helper used in key legend / kp scale */
.color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 9999px;
}

/* More utility fallbacks for small screens vs md: prefixed variants */
@media (min-width: 768px) {
  .md\:py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
  .md\:p-8 {
    padding: 2rem;
  }
  .md\:gap-3 {
    gap: 0.75rem;
  }
  .md\:text-6xl {
    font-size: 3.75rem;
  }
}

/* keep generic text scales available */
.text-2xl {
  font-size: 1.5rem;
}
.text-3xl {
  font-size: 1.875rem;
}

.header-stats {
  display: flex;
  justify-content: center;
  gap: var(--spacing-2xl);
  margin-top: var(--spacing-xl);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-md) var(--spacing-xl);
  background: rgba(26, 35, 50, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-lg);
  min-width: 140px;
  transition: all var(--transition-base);
}

.stat-item:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--shadow-md), 0 0 20px rgba(56, 189, 248, 0.2);
}

html.light .stat-item {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(2, 132, 199, 0.2);
}

html.light .stat-item:hover {
  border-color: rgba(2, 132, 199, 0.4);
  box-shadow: var(--shadow-md), 0 0 20px rgba(2, 132, 199, 0.2);
}

.stat-value {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--color-accent-primary),
    var(--color-accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

header h3 {
  font-weight: 400;
  font-size: clamp(var(--font-size-sm), 2.5vw, var(--font-size-lg));
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Aurora Status Card */
.aurora-status-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xl);
  margin: var(--spacing-2xl) auto;
  padding: var(--spacing-3xl) var(--spacing-3xl);
  max-width: 900px;
  background: rgba(36, 36, 36, 0.51);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 6px solid rgba(155, 67, 255, 0.712);
  border-radius: 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 2s ease-out;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  opacity: 1;
  pointer-events: auto;
  overflow: hidden;
}


.viewer-h1 {
  font-size: clamp(var(--font-size-3xl), 6vw, var(--font-size-5xl));
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(
    135deg,
    var(--color-accent-primary),
    var(--color-accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin: 0;
  text-align: center;
}

.viewer-question {
  font-size: clamp(var(--font-size-xl), 4vw, var(--font-size-3xl));
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
  text-align: center;
}

.viewer-description {
  font-size: clamp(var(--font-size-base), 3vw, var(--font-size-lg));
  color: var(--color-text-secondary);
  margin: 0;
  text-align: center;
  line-height: 1.5;
}

.viewer-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.aurora-status-card:hover {
  transform: translate(-50%, -50%) scale(1.03);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15),
    0 12px 24px rgba(245, 245, 245, 0.25), 0 4px 12px rgba(156, 156, 156, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.aurora-status-card.faded {
  opacity: 0;
  pointer-events: none;
}

.viewer-count-number {
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 900;
  background: linear-gradient(
    135deg,
    #58d086,
    #8b64f7
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 0.9;
  margin-bottom: var(--spacing-sm);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.viewer-count-label {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.95;
  margin-bottom: var(--spacing-md);
  text-align: center;
}

.viewer-count-note {
  font-size: 1.25rem;
  color: var(--color-text-primary);
  opacity: 0.9;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
  max-width: 400px;
}

html.light .aurora-status-card {
  background: linear-gradient(
    135deg,
    rgba(255, 182, 193, 0.15),
    rgba(255, 218, 185, 0.12),
    rgba(221, 160, 221, 0.1),
    rgba(173, 216, 230, 0.08)
  );
  border: 1px solid rgba(255, 159, 67, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(255, 159, 67, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

html.light .viewer-count-number {
  -webkit-text-fill-color: transparent;
}

@media (max-width: 640px) {
  .aurora-status-card {
    padding: var(--spacing-2xl) var(--spacing-2xl);
    max-width: 95%;
  }

  .viewer-count-number {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .viewer-count-label {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
  }

  .viewer-count-note {
    font-size: 1rem;
  }

  header h1 {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .hero-description {
    font-size: clamp(1.1rem, 5vw, 1.3rem);
  }
}

/* Ensure header titles render as solid readable text in light mode (disable gradient clip) */
html.light header h1,
html.light header h2,
html.light .header-title {
  -webkit-text-fill-color: var(--color-text-primary) !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  background: none !important;
  color: var(--color-text-primary) !important;
}

@media (max-width: 640px) {
  header {
    padding: var(--spacing-md) var(--spacing-lg) 0;
  }
  
  header h1 {
    font-size: clamp(1.1rem, 6vw, 1.5rem);
    white-space: nowrap;
    margin-bottom: var(--spacing-lg);
  }

  .header-subtitle {
    font-size: clamp(var(--font-size-xs), 3.5vw, var(--font-size-base));
    padding: 0 var(--spacing-sm);
  }

  .header-stats {
    gap: var(--spacing-md);
  }

  .stat-item {
    min-width: 120px;
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .stat-value {
    font-size: var(--font-size-2xl);
  }

  header h3 {
    font-size: clamp(var(--font-size-xs), 3.5vw, var(--font-size-base));
    padding: 0 var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  header {
    padding: var(--spacing-sm) var(--spacing-md) 0;
  }
  
  header h1 {
    font-size: clamp(0.9rem, 5vw, 1.1rem);
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  header h1 {
    font-size: 0.85rem;
    white-space: nowrap;
  }

}

/* Footer */
footer {
  background: linear-gradient(
    180deg,
    rgba(10, 14, 26, 0.95) 0%,
    rgba(5, 8, 15, 0.98) 100%
  );
  border-top: 2px solid rgba(56, 189, 248, 0.3);
  margin-top: var(--spacing-3xl);
  position: relative;
  z-index: 10;
  transition: background var(--transition-base),
    border-color var(--transition-base);
}

html.light footer {
  background: linear-gradient(
    180deg,
    rgba(248, 250, 252, 0.95) 0%,
    rgba(241, 245, 249, 0.98) 100%
  );
  border-top: 2px solid rgba(2, 132, 199, 0.3);
}

/* Centralized light-mode overrides previously living in information.css
   - Ensure informational pages (kp-info, bzinfo, solarwindinfo, etc.) use
     the same text color tokens in light mode and that header gradients
     fall back to a solid color for accessibility. */
html.light .info-page,
html.light .info-page h1,
html.light .info-page h2,
html.light .info-page h3 {
  color: var(--color-text-primary) !important;
}

/* kp-info specific header fix: some headers used gradient background-clip
   which results in transparent text in light mode; force a readable solid
   color and disable the text-clip for light theme. */
html.light #kp-info-header h1,
html.light #kp-info-header h2,
html.light #kp-info-header .header-title {
  -webkit-text-fill-color: var(--color-text-primary) !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  background: none !important;
  color: var(--color-text-primary) !important;
}

/* Make any remaining .text-white usages within info pages show dark text in light mode */
html.light .info-page .text-white {
  color: var(--color-text-primary) !important;
}

/* Slightly stronger contrast for section headings on info pages in light mode */
html.light .info-page h2 {
  color: var(--color-text-primary) !important;
  text-shadow: none !important;
}

/* Modern Footer Layout */
.modern-footer #lastUpdate {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-xl);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  background: rgba(56, 189, 248, 0.05);
  margin: 0;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

.modern-footer .footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-2xl);
  width: 100%;
  padding: var(--spacing-xl) var(--spacing-xl);
}

.modern-footer .footer-column h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-accent-primary);
  margin-bottom: var(--spacing-md);
  letter-spacing: 0.025em;
}

.modern-footer .footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modern-footer .footer-column ul li {
  margin-bottom: var(--spacing-sm);
}

.modern-footer .footer-column a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
  display: inline-block;
}

.modern-footer .footer-column a:hover {
  color: var(--color-accent-primary);
  text-decoration: underline;
}

.modern-footer .footer-text {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

.modern-footer .social-links {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-sm);
}

.modern-footer .social-icon {
  font-size: var(--font-size-xl);
  transition: transform var(--transition-fast);
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.modern-footer .social-icon:hover {
  transform: scale(1.2);
}

/* Footer Bottom Bar */
.modern-footer .footer-bottom {
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  padding: var(--spacing-lg) var(--spacing-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  width: 100%;
}

.modern-footer .footer-bottom p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

.modern-footer .footer-legal {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.modern-footer .footer-legal a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}

.modern-footer .footer-legal a:hover {
  color: var(--color-accent-primary);
  text-decoration: underline;
}

.modern-footer .footer-legal .separator {
  color: var(--color-text-secondary);
  opacity: 0.5;
}

/* Tablet responsiveness */
@media (max-width: 1024px) {
  .modern-footer .footer-columns {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    padding: var(--spacing-2xl) var(--spacing-lg);
  }
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .modern-footer .footer-columns {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl) var(--spacing-md);
  }

  .modern-footer .footer-column h3 {
    font-size: var(--font-size-base);
  }

  .modern-footer .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: var(--spacing-md);
  }

  .modern-footer .footer-bottom p,
  .modern-footer .footer-legal a {
    font-size: var(--font-size-xs);
  }
}

/* Legacy footer support (for pages not using modern footer) */
footer:not(.modern-footer) {
  text-align: center;
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-bg-tertiary);
  background-color: rgba(0, 0, 0, 0.85);
}

footer:not(.modern-footer) p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: var(--spacing-xs) 0;
}

@media (max-width: 640px) {
  footer:not(.modern-footer) p {
    font-size: var(--font-size-xs);
  }
}

/* Main Content Area */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  gap: var(--spacing-xl);
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

/* Map Container */
#mapWrapper {
  width: 100%;
  max-width: 1400px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  border: 1px solid var(--color-bg-tertiary);
  position: relative;
  transition: transform var(--transition-base),
    box-shadow var(--transition-base);
}

#mapWrapper:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), 0 0 30px rgba(56, 189, 248, 0.4);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  #mapWrapper {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  #mapWrapper {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
  }

  main {
    padding: var(--spacing-md);
    gap: var(--spacing-lg);
  }

  header {
    padding: var(--spacing-lg) var(--spacing-md);
  }
}

@media (max-width: 480px) {
  #mapWrapper {
    aspect-ratio: 3/4;
  }
}

/* Aurora Legend */
#auroraLegend {
  position: absolute;
  bottom: calc(var(--spacing-md) + 30px);
  /* left: var(--spacing-lg); */
  right: calc(var(--spacing-lg) + 20px);

  width: 240px;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--color-text-primary);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  z-index: 10;
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

/* Playback Mode Toggle Button */
#playbackToggleBtn {
  position: absolute;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  z-index: 1000;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--color-text-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

#playbackToggleBtn:hover {
  background: rgba(10, 14, 26, 0.95);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: var(--shadow-lg);
}

#playbackToggleBtn.active {
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.3),
    rgba(118, 75, 162, 0.3)
  );
  border-color: rgba(102, 126, 234, 0.6);
}

/* Playback Controls Container */
#playbackControls {
  position: absolute;
  bottom: var(--spacing-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--color-text-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  min-width: 400px;
  box-shadow: var(--shadow-xl);
  display: none;
}

#playbackControls.visible {
  display: block;
}

.playback-slider-container {
  margin-bottom: var(--spacing-md);
}

.playback-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.playback-timestamp {
  font-weight: 600;
  color: var(--color-accent-primary);
}

#playbackSlider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

#playbackSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent-primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
  transition: all var(--transition-fast);
}

#playbackSlider::-webkit-slider-thumb:hover {
  background: var(--color-accent-glow);
  transform: scale(1.2);
}

#playbackSlider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent-primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
  transition: all var(--transition-fast);
}

#playbackSlider::-moz-range-thumb:hover {
  background: var(--color-accent-glow);
  transform: scale(1.2);
}

.playback-buttons {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  justify-content: center;
}

.playback-btn {
  background: linear-gradient(
    135deg,
    var(--color-accent-primary),
    var(--color-accent-secondary)
  );
  color: var(--color-bg-primary);
  border: none;
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.playback-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

.playback-btn:active {
  transform: translateY(0);
}

.playback-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.playback-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
}

/* Paid Feature Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  background: linear-gradient(135deg, rgba(20, 30, 60, 0.95) 0%, rgba(30, 40, 80, 0.95) 100%);
  border: 1px solid rgba(100, 180, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #fff;
}

.modal-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.modal-title {
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.modal-description {
  color: #d1d5db;
  font-size: 15px;
  margin: 12px 0;
  line-height: 1.5;
}

.modal-button {
  display: inline-block;
  padding: 10px 20px;
  margin-top: 12px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

.modal-button.primary {
  background: linear-gradient(135deg, #64b5ff 0%, #3b9eff 100%);
  color: #fff;
  margin-bottom: 8px;
}

.modal-button.primary:hover {
  background: linear-gradient(135deg, #7ac3ff 0%, #4dacff 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(100, 180, 255, 0.3);
}

.modal-button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-button.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 480px) {
  .modal-content {
    padding: 24px 20px;
  }
  
  .modal-title {
    font-size: 20px;
  }
  
  .modal-description {
    font-size: 14px;
  }
}

/* Responsive Playback Controls */
@media (max-width: 640px) {
  #playbackControls {
    min-width: 90%;
    max-width: 90%;
    padding: var(--spacing-md);
  }

  #playbackToggleBtn {
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    padding: var(--spacing-sm);
    font-size: var(--font-size-xs);
  }

  .playback-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .playback-btn {
    width: 100%;
    justify-content: center;
  }
}

#auroraLegend:hover {
  background: rgba(10, 14, 26, 0.95);
  border-color: rgba(56, 189, 248, 0.4);
}

#legendGradient {
  height: 16px;
  margin-top: 4px;
  border: 1px solid white;
  border-left-width: 1px;
  border-right-width: 1px;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    rgb(0, 64, 0) 0%,
    rgb(0, 128, 0) 10%,
    rgb(255, 255, 0) 50%,
    rgb(255, 128, 0) 75%,
    rgb(255, 0, 0) 100%
  );
}

.legendLabels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--spacing-sm);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

/* BZ Page (extracted from bzinfo.html) - keeps info pages consistent and variable-driven */
.info-page.bz-page .bz-header {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
    var(--color-bg-primary);
  border-bottom: 2px solid var(--color-danger);
}

.info-page.bz-page .bz-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.info-page.bz-page .bz-header p {
  font-size: 1.25rem;
  color: var(--color-danger-100);
  max-width: 800px;
  margin: 0 auto;
}

.info-page.bz-page .bz-explorer-section {
  background: rgba(30, 27, 75, 0.5);
  border-radius: 12px;
  padding: 32px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-bottom: 40px;
}

.info-page.bz-page .bz-explorer-section h2 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-text-primary);
  margin-bottom: 10px;
}

.info-page.bz-page .bz-explorer-description {
  text-align: center;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1rem;
  line-height: 1.6;
}

.info-page.bz-page .bz-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.info-page.bz-page .bz-button {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  color: var(--color-text-primary);
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 9999px;
  padding: 10px 20px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.info-page.bz-page .bz-button:hover {
  background: rgba(99, 102, 241, 0.25);
  transform: translateY(-2px);
}

.info-page.bz-page .bz-button.active-bz {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(165, 180, 252, 0.35);
}
.info-page.bz-page .bz-button.active-bz.south {
  background-color: var(--color-danger);
  color: var(--color-on-accent);
  border-color: var(--color-danger-600);
}
.info-page.bz-page .bz-button.active-bz.neutral {
  background-color: var(--color-neutral);
  color: var(--color-neutral-900);
  border-color: rgba(120, 113, 108, 0.6);
}
.info-page.bz-page .bz-button.active-bz.north {
  background-color: var(--color-success);
  color: var(--color-on-accent);
  border-color: var(--color-success-600);
}

.info-page.bz-page .bz-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 1024px) {
  .info-page.bz-page .bz-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.info-page.bz-page .bz-info-display {
  background: rgba(30, 27, 75, 0.8);
  padding: 24px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.info-page.bz-page .bz-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text-primary);
}
.info-page.bz-page .bz-title.text-red {
  color: var(--color-danger-100);
}
.info-page.bz-page .bz-title.text-green {
  color: var(--color-success-100);
}
.info-page.bz-page .bz-title.text-stone {
  color: var(--color-neutral);
}

.info-page.bz-page .bz-range {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}
.info-page.bz-page .bz-impact-section {
  border-top: 1px solid rgba(99, 102, 241, 0.3);
  padding-top: 16px;
}
.info-page.bz-page .bz-impact-title {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
  font-size: 1rem;
}
.info-page.bz-page .bz-impact {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.info-page.bz-page .bz-chart-container {
  background: rgba(30, 27, 75, 0.8);
  padding: 24px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.info-page.bz-page .bz-chart-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-text-primary);
  margin-bottom: 16px;
}
.info-page.bz-page .chart-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  height: 300px;
}
@media (min-width: 640px) {
  .info-page.bz-page .chart-wrapper {
    height: 350px;
  }
}

.info-page.bz-page .why-section {
  margin-top: 64px;
}
.info-page.bz-page .why-section h2 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-text-primary);
  margin-bottom: 32px;
}
.info-page.bz-page .why-content {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(30, 27, 75, 0.5);
  border-radius: 12px;
  padding: 32px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.info-page.bz-page .why-content p {
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 1rem;
}
.info-page.bz-page .why-content .highlight {
  font-weight: 600;
  color: var(--color-danger-100);
}

.info-page.bz-page .interpret-section {
  margin-top: 64px;
}
.info-page.bz-page .interpret-section h2 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-text-primary);
  margin-bottom: 32px;
}
.info-page.bz-page .interpret-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .info-page.bz-page .interpret-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.info-page.bz-page .interpret-card {
  background: rgba(30, 27, 75, 0.5);
  padding: 24px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  text-align: center;
}
.info-page.bz-page .interpret-card .icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}
.info-page.bz-page .interpret-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}
.info-page.bz-page .interpret-card p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.info-page.bz-page .additional-info-section {
  margin-top: 64px;
}
.info-page.bz-page .additional-info-section h2 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-text-primary);
  margin-bottom: 32px;
}
.info-page.bz-page .info-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .info-page.bz-page .info-cards {
    grid-template-columns: 1fr 1fr;
  }
}
.info-page.bz-page .info-card {
  background: rgba(30, 27, 75, 0.5);
  padding: 24px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.info-page.bz-page .info-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}
.info-page.bz-page .info-card p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}
.info-page.bz-page .info-card ul {
  list-style-type: none;
  padding-left: 0;
  margin-top: 12px;
}
.info-page.bz-page .info-card li {
  color: var(--color-text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}
.info-page.bz-page .info-card li:last-child {
  border-bottom: none;
}
.info-page.bz-page .info-card .value {
  color: var(--color-danger-100);
  font-weight: 600;
}

@media (max-width: 768px) {
  .info-page.bz-page .bz-header h1 {
    font-size: 2rem;
  }
  .info-page.bz-page .bz-header p {
    font-size: 1rem;
  }
  .info-page.bz-page .bz-explorer-section h2,
  .info-page.bz-page .why-section h2,
  .info-page.bz-page .interpret-section h2,
  .info-page.bz-page .additional-info-section h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 1024px) {
  #auroraLegend {
    width: 220px;
  }
}

@media (max-width: 768px) {
  #auroraLegend {
    width: auto;
    left: var(--spacing-md);
    right: var(--spacing-md);
    bottom: var(--spacing-md);
    width: 50%;
  }
}

@media (max-width: 480px) {
  #auroraLegend {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    bottom: var(--spacing-sm);
    width: 50%;
    /* min-width: 65%; */
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-xs);
  }

  .legendLabels {
    font-size: 0.625rem;
  }
}
/* (Settings panel and min probability slider styles removed) */
/* Legacy styles cleanup */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles for accessibility */
*:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Cesium Container */
#cesiumContainer {
  position: relative;
  width: 100%;
  min-height: 100%;
  z-index: 10;
  flex-grow: 1;
}

/* Aurora Background */
#auroraBG {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity var(--transition-slow);
  /* hide animated canvas to ensure static aurora.jpeg is the only visible background */
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  #auroraBG {
    opacity: 0.2;
  }
}

/* Toggle Switch */
.toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--spacing-lg);
  gap: var(--spacing-md);
}

.toggle-wrapper span {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.toggle-input {
  position: relative;
  width: 48px;
  height: 24px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(148, 163, 184, 0.3);
  outline: none;
  border-radius: 24px;
  transition: all var(--transition-base);
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-input:hover {
  background: rgba(148, 163, 184, 0.4);
}

.toggle-input::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.toggle-input:checked {
  background: linear-gradient(
    135deg,
    var(--color-accent-primary),
    var(--color-accent-secondary)
  );
}

.toggle-input:checked::before {
  transform: translateX(24px);
}

.toggle-input:focus {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
}


/* Search Container */
.search-container {
  position: relative;
  display: inline-block;
}

/* Button Styles */
#locateBtn,
#searchBtn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  z-index: 12;
  position: relative;
  font-family: inherit;
}

#locateBtn {
  background: linear-gradient(
    135deg,
    var(--color-accent-primary),
    var(--color-accent-secondary)
  );
  color: var(--color-bg-primary);
  box-shadow: var(--shadow-md);
  /* make the locate button border visible and white to match search button width */
  border-color: #3e3e3e;
  width: 50px;
  height: 45px;
  padding: 5px 0 0  ;
  box-sizing: border-box;
}

#locateBtn:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  filter: brightness(1.1);
}

#locateBtn:active {
  box-shadow: var(--shadow-md);
}

html.light #locateBtn {
  color: #ffffff;
  border-color: rgba(2, 132, 199, 0.3);
}

#searchBtn {
  background: var(--color-bg-tertiary);
  color: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
  box-shadow: var(--shadow-sm);
}

#searchBtn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--color-accent-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

#searchBtn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

html.light #searchBtn {
  background: var(--color-bg-tertiary);
  color: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
}

html.light #searchBtn:hover {
  background: rgba(2, 132, 199, 0.1);
  border-color: var(--color-accent-glow);
}

.button-icon {
  font-size: var(--font-size-xl);
  line-height: 1;
}

.button-text {
  line-height: 1;
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + var(--spacing-sm));
  left: 0;
  right: 0;
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-accent-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  min-width: 300px;
  max-height: 400px;
  overflow: hidden;
  animation: dropdownSlide 0.2s ease-out;
}

html.light .search-dropdown {
  background: var(--color-bg-primary);
  border: 2px solid var(--color-accent-primary);
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-input {
  width: 100%;
  padding: var(--spacing-md);
  background: var(--color-bg-tertiary);
  border: none;
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-family: inherit;
  outline: none;
}

.search-input::placeholder {
  color: var(--color-text-secondary);
}

.search-input:focus {
  background: rgba(56, 189, 248, 0.05);
}

.search-results {
  max-height: 350px;
  overflow-y: auto;
  overflow-x: hidden;
}

.search-results::-webkit-scrollbar {
  width: 8px;
}

.search-results::-webkit-scrollbar-track {
  background: var(--color-bg-tertiary);
}

.search-results::-webkit-scrollbar-thumb {
  background: var(--color-accent-primary);
  border-radius: var(--radius-sm);
}

.search-results::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-glow);
}

.search-result-item {
  padding: var(--spacing-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(56, 189, 248, 0.1);
}

.search-result-item .city-name {
  color: var(--color-text-primary);
  font-weight: 600;
  font-size: var(--font-size-base);
}

.search-result-item .city-country {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-left: var(--spacing-xs);
}

.search-result-item .city-coords {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  opacity: 0.7;
  margin-left: auto;
}

.search-no-results {
  padding: var(--spacing-xl);
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

/* Consolidated Location/Search Control */
.location-search-control {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 100;
}

.location-search-control .search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-accent-primary);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: width var(--transition-base), box-shadow var(--transition-base);
  width: 50px;
  height: 50px;
  overflow: hidden;
}

.location-search-control .search-container.collapsed {
  width: 50px;
}

.location-search-control .search-container.expanded {
  width: 400px;
  max-width: calc(100vw - 40px);
}

.location-search-control .search-container:hover {
  border-color: var(--color-accent-glow);
  box-shadow: var(--shadow-lg);
}

.location-search-control .search-toggle-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--color-accent-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.2rem;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.location-search-control .search-toggle-btn:hover {
  background: rgba(56, 189, 248, 0.1);
}

.location-search-control .search-toggle-btn.loading {
  animation: pulse 1.5s infinite;
}

.location-search-control .search-input {
  flex: 1;
  padding: 0 var(--spacing-md);
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-family: inherit;
  outline: none;
  height: 50px;
  min-width: 0;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.location-search-control .search-container.expanded .search-input {
  opacity: 1;
}

.location-search-control .search-input::placeholder {
  color: var(--color-text-secondary);
}

.location-search-control .location-pin-btn {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  text-align: center;
  line-height: 40px;
  width: 50px;
  height: 50px;
  padding: 0;
  box-sizing: border-box;
  flex: 0 0 50px;
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.2rem;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  opacity: 0;
}

.location-search-control .search-container.expanded .location-pin-btn {
  opacity: 1;
}

.location-search-control .location-pin-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

.location-search-control .location-pin-btn.loading {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.location-search-control .search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 300px;
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-accent-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  max-height: 320px;
  overflow: hidden;
  animation: dropdownSlide 0.2s ease-out;
}

html.light .location-search-control .search-dropdown {
  background: var(--color-bg-primary);
  border-color: var(--color-accent-primary);
}

/* Aurora result box (persistent, matches site buttons) */
.aurora-result-box {
  /* Fixed width matching the combined width of Check My Forecast + Search Location buttons */
  /* Combined: 247px + 225px + 16px gap = 488px */
  width: 488px;
  max-width: 100%;
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-accent-primary);
  color: var(--color-text-primary);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 10;
  font-size: var(--font-size-base);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin: 0 auto var(--spacing-md) auto;
  height: 180px; /* Fixed height, adjust as needed */
  overflow-y: auto;
}

.aurora-result-box .aurora-result-content {
  /* Take full width when alone, shrink when buttons appear */
  flex: 1 1 100%;
  text-align: center;
  word-break: break-word;
  line-height: 1.5;
  font-size: 1.25em;
}

/* "Set Home" button inside the result box */
.aurora-result-box .home-location-btn {
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  flex-shrink: 0;
  flex-basis: auto;
  /* Center buttons within the flex container */
  margin: 0 auto;
}

@media (max-width: 640px) {
  .aurora-result-box {
    width: calc(100% - 32px);
    max-width: 488px;
    flex-wrap: wrap;
  }

  .aurora-result-box .home-location-btn {
    width: 100%;
    margin-left: 0 !important;
    margin-top: var(--spacing-xs);
  }

  .aurora-result-box .aurora-result-content {
    text-align: center;
  }
}

/* Home Location Controls */
.home-location-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  margin: var(--spacing-md) 0;
  width: 100%;
  max-width: 600px;
}

.home-location-display {
  text-align: center;
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(26, 35, 50, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(56, 189, 248, 0.2);
  width: 100%;
}

.home-location-display span {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.home-location-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

.home-location-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  font-family: inherit;
}

.home-location-btn.set-btn {
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
  box-shadow: var(--shadow-sm);
}

.home-location-btn.set-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: var(--color-accent-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.home-location-btn.clear-btn {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: #ef4444;
  box-shadow: var(--shadow-sm);
}

.home-location-btn.clear-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #f87171;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.home-location-btn.simulate-btn {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border-color: #a78bfa;
  box-shadow: var(--shadow-sm);
}

.home-location-btn.simulate-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: #c4b5fd;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.home-location-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.home-location-btn .button-icon {
  font-size: var(--font-size-lg);
  line-height: 1;
}

.home-location-btn .button-text {
  line-height: 1;
}

  #locateBtn,
  #searchBtn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .search-container {
    width: 100%;
    max-width: 300px;
  }

  .search-dropdown {
    min-width: 100%;
  }

  .home-location-controls {
    padding: 0 var(--spacing-md);
  }

  .home-location-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .home-location-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Responsive Navigation */
@media (max-width: 768px) {
  #mainNav {
    padding: 10px 15px;
  }

  .nav-brand-name {
    font-size: 18px;
  }

  .nav-logo {
    width: 32px;
    height: 32px;
  }

  .nav-links {
    gap: 10px;
  }

  .nav-link {
    padding: 6px 10px;
    font-size: 12px;
  }

  .nav-icon {
    font-size: 20px;
  }

  .nav-text {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .nav-brand-name {
    font-size: 16px;
  }

  .nav-logo {
    width: 28px;
    height: 28px;
  }

  .nav-links {
    gap: 5px;
  }

  .nav-link {
    padding: 5px 8px;
  }

  .nav-icon {
    font-size: 18px;
  }
}

/* Space Weather Section Styles */
.info-banner {
  width: 100%;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.1) 0%,
    rgba(129, 140, 248, 0.1) 100%
  );
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  padding: var(--spacing-2xl) 0;
  margin-top: var(--spacing-xl);
  transition: background var(--transition-base),
    border-color var(--transition-base);
}

html.light .info-banner {
  background: linear-gradient(
    135deg,
    rgba(2, 132, 199, 0.1) 0%,
    rgba(99, 102, 241, 0.1) 100%
  );
  border-top: 1px solid rgba(2, 132, 199, 0.2);
  border-bottom: 1px solid rgba(2, 132, 199, 0.2);
}

.info-banner .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  text-align: center;
}

.info-banner-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  text-align: center;
}

.info-banner h3 {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--color-accent-primary);
  margin-bottom: var(--spacing-md);
  background: linear-gradient(
    135deg,
    var(--color-accent-primary),
    var(--color-accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.info-banner p {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.space-weather-section {
  width: 100%;
  /* Use a semi-transparent overlay so the fixed aurora background remains visible behind this section */
  background: linear-gradient(
    180deg,
    rgba(10, 14, 26, 0.65) 0%,
    rgba(10, 14, 26, 0.65) 100%
  );
  padding: var(--spacing-3xl) 0;
  transition: background var(--transition-base);
}

html.light .space-weather-section {
  background: linear-gradient(
    180deg,
    rgba(248, 250, 252, 0.65) 0%,
    rgba(241, 245, 249, 0.65) 100%
  );
}

.space-weather-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.weather-card {
  background: rgba(26, 35, 50, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  opacity: 0;
  transform: translateY(40px);
}

.weather-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), 0 0 30px rgba(56, 189, 248, 0.3);
  border-color: rgba(56, 189, 248, 0.4);
}

html.light .weather-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(2, 132, 199, 0.2);
}

html.light .weather-card:hover {
  box-shadow: var(--shadow-xl), 0 0 30px rgba(2, 132, 199, 0.2);
  border-color: rgba(2, 132, 199, 0.4);
}

.weather-card h2 {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--color-accent-primary);
  margin-bottom: var(--spacing-md);
  background: linear-gradient(
    135deg,
    var(--color-accent-primary),
    var(--color-accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.weather-card .card-description {
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  line-height: 1.6;
  margin-bottom: var(--spacing-xl);
}

.weather-card .card-description strong {
  color: var(--color-accent-primary);
  font-weight: 600;
}

.chart-container {
  width: 100%;
  min-height: 300px;
  position: relative;
}

.chart-container canvas {
  display: block;
  width: 100%;
}

.kp-scale-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(56, 189, 248, 0.1);
}

.scale-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
}

.chart-legend .legend-item.inactive {
  opacity: 0.3;
  background: rgba(255, 255, 255, 0.02) !important;
}

.chart-legend .legend-item.inactive:hover {
  opacity: 0.5;
}

/* Responsive adjustments for space weather section */
@media (max-width: 768px) {
  .space-weather-section {
    padding: var(--spacing-2xl) 0;
  }

  .weather-card {
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
  }

  .weather-card h2 {
    font-size: var(--font-size-xl);
  }

  .kp-scale-info {
    gap: var(--spacing-sm);
  }

  .scale-item {
    font-size: var(--font-size-xs);
  }
}

@media (max-width: 480px) {
  .space-weather-section .container {
    padding: 0 var(--spacing-md);
  }

  .weather-card {
    padding: var(--spacing-md);
  }

  .kp-scale-info {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
}
/* Aurora Alert Signup Popup Modal Styles */
.alert-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 26, 0.75);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.alert-popup-modal {
  background: var(--color-bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px rgba(56, 189, 248, 0.25),
    0 8px 24px rgba(0, 0, 0, 0.3);
  padding: 2.5rem 2rem 2.5rem 2rem;
  max-width: 450px;
  width: 95%;
  text-align: center;
  position: relative;
  color: var(--color-text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  transition: background var(--transition-base), color var(--transition-base);
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.alert-popup-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  font-size: 1.8em;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
  line-height: 1;
}
.alert-popup-close:hover {
  color: var(--color-accent-primary);
  transform: scale(1.1);
}

.alert-popup-title {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(
    135deg,
    var(--color-accent-primary),
    var(--color-accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
html.light .alert-popup-title {
  -webkit-text-fill-color: var(--color-text-primary) !important;
  background-clip: unset !important;
  background: none !important;
  color: var(--color-text-primary) !important;
}

.alert-popup-message {
  margin-bottom: 24px;
  font-size: 1.1em;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

.alert-popup-icon {
  font-size: 3em;
  margin-bottom: 12px;
  color: var(--color-accent-primary);
  filter: drop-shadow(0 4px 12px var(--color-accent-glow));
  animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.alert-popup-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75em;
  margin-top: 20px;
}
.alert-popup-buttons button {
  min-width: 160px;
  padding: 0.8em 1.8em;
  font-size: 1.05em;
  border-radius: var(--radius-lg);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
  font-family: inherit;
}
.alert-popup-buttons .setup-alerts-btn {
  background: linear-gradient(
    135deg,
    var(--color-accent-primary),
    var(--color-accent-secondary)
  );
  color: var(--color-on-accent);
  box-shadow: var(--shadow-lg), 0 0 20px var(--color-accent-glow);
}
.alert-popup-buttons .setup-alerts-btn:hover {
  background: linear-gradient(
    135deg,
    var(--color-accent-secondary),
    var(--color-accent-primary)
  );
  box-shadow: var(--shadow-xl), 0 0 30px var(--color-accent-glow);
  transform: translateY(-2px);
}
.alert-popup-buttons .maybe-later-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-secondary);
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: none;
}
.alert-popup-buttons .maybe-later-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  color: var(--color-accent-primary);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

html.light .alert-popup-modal {
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  box-shadow: 0 20px 40px rgba(2, 132, 199, 0.2), 0 8px 24px rgba(0, 0, 0, 0.15);
}
html.light .alert-popup-message {
  color: var(--color-text-secondary);
}
html.light .alert-popup-icon {
  color: var(--color-accent-primary);
}
html.light .alert-popup-buttons .maybe-later-btn {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(2, 132, 199, 0.2);
}
html.light .alert-popup-buttons .maybe-later-btn:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.4);
}

/* Alert Signup Popup Modal */
.alert-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: var(--spacing-lg);
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.alert-popup-modal {
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-accent-primary);
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  position: relative;
  transform: scale(0.9);
  animation: scaleIn 0.3s ease-out forwards;
}

@keyframes scaleIn {
  to {
    transform: scale(1);
  }
}

.alert-popup-close {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-size: var(--font-size-2xl);
  cursor: pointer;
  padding: var(--spacing-xs);
  line-height: 1;
  transition: all var(--transition-fast);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.alert-popup-close:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.alert-popup-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.alert-popup-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
  text-align: center;
}

.alert-popup-message {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

.alert-popup-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

.alert-popup-btn {
  -webkit-appearance: none;
  appearance: none;
  padding: var(--spacing-sm) var(--spacing-xl);
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  font-family: "Inter", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  white-space: nowrap;
}

.alert-popup-btn-primary {
  background: linear-gradient(
    135deg,
    var(--color-accent-primary),
    var(--color-accent-secondary)
  );
  color: var(--color-on-accent);
  border-color: var(--color-accent-primary);
}

.alert-popup-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4);
}

.alert-popup-btn-secondary {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  border-color: var(--color-text-secondary);
}

.alert-popup-btn-secondary:hover {
  background: var(--color-bg-primary);
  border-color: var(--color-text-primary);
}

@media (max-width: 640px) {
  .alert-popup-modal {
    padding: var(--spacing-xl);
    margin: var(--spacing-md);
  }

  .alert-popup-buttons {
    flex-direction: column;
    width: 100%;
  }

  .alert-popup-btn {
    width: 100%;
    justify-content: center;
  }

  .alert-popup-title {
    font-size: var(--font-size-xl);
  }

  .alert-popup-message {
    font-size: var(--font-size-sm);
  }
}
