/* Hide elements until Alpine.js initializes */
@import url('./menu.css');
@import url('./btn.css');

[x-cloak] {
  display: none !important;
}

/* Screen reader only - visually hidden but accessible to assistive technologies */
.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;
}

:root {
  --button-outline: rgba(255,255,255, .10);
  --badge-outline: rgba(255,255,255, .05);
  --opaque-button-border-intensity: 9;
  --elevate-1: rgba(255,255,255, .04);
  --elevate-2: rgba(255,255,255, .09);
  --background: 222 47% 5%;
  --foreground: 0 0% 100%;
  --border: 222 30% 15%;
  --card: 222 40% 8%;
  --card-foreground: 0 0% 100%;
  --card-border: 222 30% 12%;
  --primary: 158 64% 50%;
  --primary-foreground: 158 64% 98%;
  --secondary: 222 25% 16%;
  --secondary-foreground: 0 0% 100%;
  --muted: 222 25% 18%;
  --muted-foreground: 0 0% 70%;
  --accent: 270 60% 22%;
  --accent-foreground: 270 60% 95%;
  --destructive: 0 72% 50%;
  --destructive-foreground: 0 0% 100%;
  --input: 222 25% 25%;
  --ring: 158 64% 50%;
  --chart-1: 158 64% 50%;
  --chart-2: 270 70% 60%;
  --chart-3: 188 90% 45%;
  --chart-4: 190 70% 50%;
  --chart-5: 280 65% 55%;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', monospace;
  --radius: .375rem;
}

body {
  font-family: var(--font-sans);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
}

/* NOTE: Dashboard card styles moved to css/dashboard.css */
/* Legacy support maintained in dashboard.css */
.hero-stat-tile {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-chart-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
}

.hero-chart-card .hero-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chart-frame {
  position: relative;
  min-height: 260px;
  border-radius: 0.75rem;
  background: radial-gradient(circle at top, rgba(255,255,255,0.04), transparent 55%);
  border: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
}

.chart-frame canvas {
  position: relative;
  z-index: 5;
}

.chart-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  z-index: 10;
}

.chart-placeholder[style*="display: none"],
.chart-placeholder[x-cloak] {
  display: none !important;
}

.chart-placeholder .loading-dots span {
  animation: pulse 1.2s infinite ease-in-out;
  display: inline-block;
  margin-left: 0.25rem;
  opacity: 0.6;
}

.chart-placeholder .loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.chart-placeholder .loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

/* NOTE: Dashboard responsive styles moved to css/dashboard.css */
@media (max-width: 640px) {
  .hero-chart-card {
    min-height: 320px;
  }
  .hero-stat-tile {
    min-height: 110px;
  }
  .chart-frame {
    min-height: 220px;
  }
}

/* Accessibility: Font Size Controls */
[data-font-size="small"] {
  font-size: 0.875rem;
}
[data-font-size="normal"] {
  font-size: 1rem;
}
[data-font-size="large"] {
  font-size: 1.125rem;
}
[data-font-size="xlarge"] {
  font-size: 1.25rem;
}

/* Accessibility: High Contrast Mode */
.high-contrast {
  --background: 0 0% 0%;
  --foreground: 0 0% 100%;
  --border: 0 0% 50%;
  --card: 0 0% 10%;
  --muted: 0 0% 20%;
}
.high-contrast * {
  border-color: hsl(var(--border)) !important;
}

.hover-elevate {
  position: relative;
  transition: all 0.2s;
}

.hover-elevate:hover {
  background-color: var(--elevate-1);
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.skeleton {
  background: linear-gradient(90deg, hsl(var(--muted)) 25%, hsl(var(--card)) 50%, hsl(var(--muted)) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

/* Field Mode - Red skeleton for field mode */
[data-theme="field"] .skeleton {
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.1) 25%, rgba(255, 0, 0, 0.2) 50%, rgba(255, 0, 0, 0.1) 75%);
  background-size: 200% 100%;
}

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

/* Loading dots animation */
.loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.loading-dots span {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: currentColor;
  animation: loading-dot-bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes loading-dot-bounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Aurora Animation System */
:root {
  --aurora-sky-bg: #02030a;
  --aurora-horizon: #041022;
  --aurora-1: #7fffd4; /* mint */
  --aurora-2: #7be3ff; /* cyan */
  --aurora-3: #9b8cff; /* violet */
  --aurora-4: #8bffb8; /* soft green */
  --aurora-stars-color: rgba(255, 255, 255, 0.675);
  --aurora-slow: 18s;
  --aurora-med: 11s;
  --aurora-fast: 6s;
  --aurora-xfast: 3.5s;
  --aurora-opacity: 0.35;
  --aurora-blur: 30px;
  --aurora-grain-opacity: 0.06;
}

/* Aurora container (behind content) */
.aurora-wrap {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  pointer-events: none;
}

/* Stars container */
.stars-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Big Dipper constellation container */
.big-dipper-container {
  position: absolute;
  top: -6.25%;
  left: 50%;
  transform: translateX(-50%);
  width: 468px;
  height: 312px;
  z-index: 15;
  pointer-events: none;
}

/* Big Dipper SVG styling - white with very subtle glow (90% less) */
.big-dipper-container svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.4))
          drop-shadow(0 0 4px rgba(255, 255, 255, 0.3))
          drop-shadow(0 0 6px rgba(255, 255, 255, 0.2));
  opacity: 0.375;
}

.big-dipper-container svg path {
  fill: rgba(255, 255, 255, 0.375);
  stroke: rgba(255, 255, 255, 0.325);
  stroke-width: 1;
}


.star {
  position: absolute;
  background: var(--aurora-stars-color);
  border-radius: 50%;
  pointer-events: none;
}

.star.glow {
  box-shadow: 0 0 4px 1px rgba(255, 255, 255, 0.6),
              0 0 8px 2px rgba(255, 255, 255, 0.3);
}

.star.twinkle {
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(0.8);
  }
}

/* Aurora band styles */
.aurora {
  position: absolute;
  left: -20%;
  right: -20%;
  height: 40vh;
  bottom: 18vh;
  transform-origin: center;
  mix-blend-mode: screen;
  filter: blur(var(--aurora-blur));
  opacity: var(--aurora-opacity);
  will-change: transform;
}

.aurora.band-1 {
  background: linear-gradient(90deg, transparent 0%, var(--aurora-1) 15%, transparent 45%);
  transform: translateX(-10%) skewY(-6deg) scaleY(0.8);
  animation: float1 var(--aurora-slow) linear infinite;
  opacity: 0.36;
}

.aurora.band-2 {
  background: linear-gradient(90deg, transparent 0%, var(--aurora-2) 10%, transparent 45%);
  transform: translateX(0%) skewY(-4deg) scaleY(1.05);
  animation: float2 var(--aurora-med) linear infinite;
  opacity: 0.42;
}

.aurora.band-3 {
  background: linear-gradient(90deg, transparent 0%, var(--aurora-3) 20%, transparent 60%);
  height: 46vh;
  bottom: 10vh;
  transform: translateX(6%) skewY(-8deg) scaleY(1.15);
  animation: float3 var(--aurora-slow) linear infinite;
  opacity: 0.28;
}

.aurora.band-4 {
  background: linear-gradient(90deg, transparent 0%, var(--aurora-4) 8%, var(--aurora-2) 25%, transparent 60%);
  height: 36vh;
  bottom: 22vh;
  transform: translateX(-4%) skewY(-3deg) scaleY(0.9);
  animation: float4 var(--aurora-fast) linear infinite;
  opacity: 0.34;
}

/* Vertical streak bands - Enhanced visibility */
.aurora.streak-1 {
  background: linear-gradient(165deg, transparent 0%, var(--aurora-1) 30%, transparent 50%);
  height: 55vh;
  width: 18vw;
  bottom: 18vh;
  left: 15%;
  right: auto;
  transform: translateX(0%) skewY(12deg) scaleX(0.6);
  animation: streak1 var(--aurora-xfast) ease-in-out infinite;
  opacity: 0.18;
  filter: blur(35px);
  animation-delay: 4.5s;
}

.aurora.streak-2 {
  background: linear-gradient(170deg, transparent 0%, var(--aurora-3) 25%, var(--aurora-2) 45%, transparent 60%);
  height: 62vh;
  width: 22vw;
  bottom: 18vh;
  left: 60%;
  right: auto;
  transform: translateX(0%) skewY(15deg) scaleX(0.5);
  animation: streak2 4s ease-in-out infinite;
  opacity: 0.2;
  filter: blur(38px);
  animation-delay: 5.5s;
}

.aurora.streak-3 {
  background: linear-gradient(160deg, transparent 0%, var(--aurora-4) 20%, transparent 55%);
  height: 48vh;
  width: 16vw;
  bottom: 18vh;
  left: 78%;
  right: auto;
  transform: translateX(0%) skewY(10deg) scaleX(0.7);
  animation: streak3 3s ease-in-out infinite;
  opacity: 0.19;
  filter: blur(32px);
  animation-delay: 3s;
}

/* Vertical curtain bands - Enhanced visibility and movement */
.aurora.curtain-1 {
  background: linear-gradient(175deg, transparent 0%, var(--aurora-1) 15%, var(--aurora-4) 35%, transparent 60%);
  height: 70vh;
  width: 15vw;
  bottom: 15vh;
  left: 8%;
  right: auto;
  transform: translateY(0%) skewY(18deg) scaleX(0.8);
  animation: curtain1 14s ease-in-out infinite;
  opacity: 0.45;
  filter: blur(25px);
}

.aurora.curtain-2 {
  background: linear-gradient(170deg, transparent 0%, var(--aurora-3) 10%, var(--aurora-2) 30%, transparent 55%);
  height: 85vh;
  width: 20vw;
  bottom: 10vh;
  left: 28%;
  right: auto;
  transform: translateY(0%) skewY(22deg) scaleX(0.7);
  animation: curtain2 18s ease-in-out infinite;
  opacity: 0.5;
  filter: blur(28px);
  animation-delay: 2s;
}

.aurora.curtain-3 {
  background: linear-gradient(168deg, transparent 0%, var(--aurora-4) 12%, var(--aurora-1) 28%, transparent 58%);
  height: 75vh;
  width: 18vw;
  bottom: 12vh;
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(0%) skewY(20deg) scaleX(0.75);
  animation: curtain3 16s ease-in-out infinite;
  opacity: 0.48;
  filter: blur(26px);
  animation-delay: 4s;
}

.aurora.curtain-4 {
  background: linear-gradient(172deg, transparent 0%, var(--aurora-2) 8%, var(--aurora-3) 25%, var(--aurora-1) 45%, transparent 62%);
  height: 90vh;
  width: 22vw;
  bottom: 8vh;
  left: 68%;
  right: auto;
  transform: translateY(0%) skewY(25deg) scaleX(0.65);
  animation: curtain4 20s ease-in-out infinite;
  opacity: 0.52;
  filter: blur(30px);
  animation-delay: 1s;
}

.aurora.curtain-5 {
  background: linear-gradient(165deg, transparent 0%, var(--aurora-1) 18%, var(--aurora-4) 40%, transparent 65%);
  height: 68vh;
  width: 16vw;
  bottom: 16vh;
  left: 88%;
  right: auto;
  transform: translateY(0%) skewY(16deg) scaleX(0.85);
  animation: curtain5 15s ease-in-out infinite;
  opacity: 0.42;
  filter: blur(24px);
  animation-delay: 3s;
}

/* Horizontal drift motion - Slow east-west movement */
.aurora.drift-layer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 255, 136, 0.15) 30%,
    rgba(0, 255, 170, 0.2) 50%,
    rgba(0, 255, 136, 0.15) 70%,
    transparent 100%
  );
  height: 60vh;
  width: 150%;
  bottom: 20vh;
  left: -25%;
  right: auto;
  transform: translateX(0%);
  animation: horizontalDrift 25s linear infinite;
  opacity: 0.3;
  filter: blur(35px);
  mix-blend-mode: screen;
}

/* Subtle vertical ripples */
.aurora::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(0, 0, 0, 0) 35%);
  mix-blend-mode: overlay;
  opacity: 0.8;
  transform-origin: center;
  animation: ripple 3.5s ease-in-out infinite;
}

/* Noise / grain layer */
.grain {
  position: absolute;
  inset: -10%;
  z-index: 60;
  pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><filter id="n"><feTurbulence baseFrequency="0.9" numOctaves="1" stitchTiles="stitch"></feTurbulence><feColorMatrix type="saturate" values="0"/></filter><rect width="100%" height="100%" filter="url(%23n)" /></svg>');
  opacity: var(--aurora-grain-opacity);
  mix-blend-mode: overlay;
}

/* Horizon glow */
.horizon-glow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28vh;
  background: radial-gradient(ellipse at 50% 100%, rgba(20, 60, 80, 0.7) 0%, rgba(2, 6, 12, 0) 60%);
  z-index: 12;
  pointer-events: none;
}

/* Animation keyframes */
@keyframes float1 {
  0% { transform: translateX(-12%) skewY(-6deg) scaleY(0.8) translateY(0%); }
  50% { transform: translateX(8%) skewY(-4deg) scaleY(0.95) translateY(-3%); }
  100% { transform: translateX(-12%) skewY(-6deg) scaleY(0.8) translateY(0%); }
}

@keyframes float2 {
  0% { transform: translateX(0%) skewY(-4deg) scaleY(1.05) translateY(0%); }
  50% { transform: translateX(-14%) skewY(-7deg) scaleY(1.18) translateY(-5%); }
  100% { transform: translateX(0%) skewY(-4deg) scaleY(1.05) translateY(0%); }
}

@keyframes float3 {
  0% { transform: translateX(6%) skewY(-8deg) scaleY(1.15) translateY(0%); }
  50% { transform: translateX(-6%) skewY(-10deg) scaleY(1.3) translateY(-6%); }
  100% { transform: translateX(6%) skewY(-8deg) scaleY(1.15) translateY(0%); }
}

@keyframes float4 {
  0% { transform: translateX(-4%) skewY(-3deg) scaleY(0.9) translateY(0%); }
  50% { transform: translateX(14%) skewY(0deg) scaleY(1.05) translateY(-2%); }
  100% { transform: translateX(-4%) skewY(-3deg) scaleY(0.9) translateY(0%); }
}

@keyframes streak1 {
  0% { transform: translateX(0%) translateY(0%) skewY(12deg) scaleX(0.6); opacity: 0.18; }
  40% { opacity: 0.24; }
  50% { transform: translateX(8%) translateY(-18%) skewY(18deg) scaleX(0.7); opacity: 0.28; }
  90% { opacity: 0.12; }
  100% { transform: translateX(0%) translateY(0%) skewY(12deg) scaleX(0.6); opacity: 0.18; }
}

@keyframes streak2 {
  0% { transform: translateX(0%) translateY(0%) skewY(15deg) scaleX(0.5); opacity: 0.2; }
  40% { opacity: 0.28; }
  50% { transform: translateX(-12%) translateY(-22%) skewY(20deg) scaleX(0.65); opacity: 0.32; }
  90% { opacity: 0.14; }
  100% { transform: translateX(0%) translateY(0%) skewY(15deg) scaleX(0.5); opacity: 0.2; }
}

@keyframes streak3 {
  0% { transform: translateX(0%) translateY(0%) skewY(10deg) scaleX(0.7); opacity: 0.19; }
  40% { opacity: 0.26; }
  50% { transform: translateX(6%) translateY(-16%) skewY(14deg) scaleX(0.8); opacity: 0.3; }
  90% { opacity: 0.13; }
  100% { transform: translateX(0%) translateY(0%) skewY(10deg) scaleX(0.7); opacity: 0.19; }
}

@keyframes curtain1 {
  0%, 100% { transform: translateY(0%) skewY(18deg) scaleX(0.8); opacity: 0.45; }
  25% { transform: translateY(-8%) skewY(22deg) scaleX(0.9); opacity: 0.58; }
  50% { transform: translateY(-15%) skewY(25deg) scaleX(0.95); opacity: 0.52; }
  75% { transform: translateY(-8%) skewY(20deg) scaleX(0.85); opacity: 0.48; }
}

@keyframes curtain2 {
  0%, 100% { transform: translateY(0%) skewY(22deg) scaleX(0.7); opacity: 0.5; }
  30% { transform: translateY(-12%) skewY(28deg) scaleX(0.85); opacity: 0.65; }
  60% { transform: translateY(-20%) skewY(32deg) scaleX(0.9); opacity: 0.6; }
  80% { transform: translateY(-10%) skewY(24deg) scaleX(0.75); opacity: 0.55; }
}

@keyframes curtain3 {
  0%, 100% { transform: translateX(-50%) translateY(0%) skewY(20deg) scaleX(0.75); opacity: 0.48; }
  35% { transform: translateX(-50%) translateY(-10%) skewY(26deg) scaleX(0.88); opacity: 0.62; }
  65% { transform: translateX(-50%) translateY(-18%) skewY(30deg) scaleX(0.92); opacity: 0.58; }
}

@keyframes curtain4 {
  0%, 100% { transform: translateY(0%) skewY(25deg) scaleX(0.65); opacity: 0.52; }
  28% { transform: translateY(-14%) skewY(32deg) scaleX(0.82); opacity: 0.68; }
  55% { transform: translateY(-22%) skewY(36deg) scaleX(0.88); opacity: 0.64; }
  85% { transform: translateY(-12%) skewY(28deg) scaleX(0.72); opacity: 0.58; }
}

@keyframes curtain5 {
  0%, 100% { transform: translateY(0%) skewY(16deg) scaleX(0.85); opacity: 0.42; }
  40% { transform: translateY(-9%) skewY(20deg) scaleX(0.95); opacity: 0.56; }
  70% { transform: translateY(-16%) skewY(24deg) scaleX(1); opacity: 0.52; }
}

@keyframes ripple {
  0% { transform: translateY(0) scaleY(1); opacity: 0.75; }
  50% { transform: translateY(-12%) scaleY(0.95); opacity: 0.55; }
  100% { transform: translateY(0) scaleY(1); opacity: 0.75; }
}

/* Horizontal drift animation - Slow east-west movement */
@keyframes horizontalDrift {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(25%);
  }
}

/* Parallax transforms */
.parallax {
  transform-style: preserve-3d;
  transition: transform 0.12s linear;
  will-change: transform;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .aurora,
  .aurora::before,
  .grain {
    animation: none !important;
    transition: none !important;
  }
  .aurora {
    opacity: 0.38;
    transform: none !important;
    filter: blur(8px) !important;
  }
  .star.twinkle,
  .big-dipper-container svg {
    animation: none !important;
  }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
  /* Big Dipper - medium size for tablet */
  .big-dipper-container {
    width: 360px;
    height: 240px;
    top: -6.25%;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .aurora {
    height: 32vh;
    bottom: 12vh;
  }
  .aurora.band-3 {
    height: 36vh;
    bottom: 6vh;
  }
  .aurora.streak-1,
  .aurora.streak-2,
  .aurora.streak-3 {
    width: 28vw;
    height: 42vh;
  }
  .aurora.curtain-1,
  .aurora.curtain-2,
  .aurora.curtain-3,
  .aurora.curtain-4,
  .aurora.curtain-5 {
    width: 25vw;
    height: 55vh;
    opacity: 0.28;
  }
  /* Big Dipper - smaller and repositioned for mobile */
  .big-dipper-container {
    width: 280px;
    height: 187px;
    top: -2.5%;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Leaflet Map Styling */
#alaska-interactive-map {
  z-index: 0;
}

.leaflet-container {
  background: hsl(var(--background));
  font-family: var(--font-sans);
}

/* Viewing Spots Map Container - Ensure proper rendering */
[id^="viewing-spots-map-"] {
  min-height: 500px;
  height: 500px;
  width: 100%;
  position: relative;
  z-index: 0;
}

[id^="viewing-spots-map-"] .leaflet-container {
  height: 100%;
  width: 100%;
  min-height: 500px;
}

/* Ensure map tiles load properly */
.leaflet-tile-container img {
  max-width: none !important;
  max-height: none !important;
}

.leaflet-popup-content-wrapper {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  border-radius: var(--radius);
}

.leaflet-popup-tip {
  background: hsl(var(--card));
}

.leaflet-control-layers {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}

.leaflet-control-layers-overlays label {
  color: hsl(var(--foreground));
}

.leaflet-control-zoom a {
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
}

.leaflet-control-zoom a:hover {
  background-color: hsl(var(--muted));
}

/* Aurora Map SVG Grid Styling */
#aurora-svg-map {
  background: #0f172a; /* slate-900 */
}

/* Add visible world map background grid */
#aurora-svg-map .world-grid {
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 0.5;
  fill: none;
}

#aurora-svg-map .world-coastline {
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 0.5;
  fill: rgba(0, 0, 0, 0.1);
}

/* Aurora Color Bins - 10 levels for smooth gradient */
.aurora-bin-0 { fill: #0d4d0d; opacity: 0.2; } /* Very Low - Dark Green */
.aurora-bin-1 { fill: #1a8533; opacity: 0.3; } /* Low - Green */
.aurora-bin-2 { fill: #2d9f4a; opacity: 0.4; } /* Low-Moderate - Bright Green */
.aurora-bin-3 { fill: #4ade80; opacity: 0.5; } /* Moderate - Light Green */
.aurora-bin-4 { fill: #84cc16; opacity: 0.6; } /* Moderate-High - Yellow-Green */
.aurora-bin-5 { fill: #ffd700; opacity: 0.7; } /* High - Yellow */
.aurora-bin-6 { fill: #ffa500; opacity: 0.75; } /* High-Very High - Orange */
.aurora-bin-7 { fill: #ff8c00; opacity: 0.8; } /* Very High - Dark Orange */
.aurora-bin-8 { fill: #ff6347; opacity: 0.85; } /* Extreme - Red-Orange */
.aurora-bin-9 { fill: #ff0000; opacity: 0.9; } /* Extreme - Red */

/* Hover states */
.aurora-cell {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 0.1;
  transition: opacity 0.2s, stroke-width 0.2s;
  cursor: pointer;
}
.aurora-cell:hover {
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 0.3;
  opacity: 1 !important;
}

/* Fix width overflow */
* {
  box-sizing: border-box;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Field Mode Root Container */
#field-mode-root,
[id="field-mode-root"] {
  min-height: 100vh;
}

/* Field Mode Content Container - this gets dimmed */
#field-mode-content,
[id="field-mode-content"] {
  min-height: 100vh;
}

/* Light Theme */
.light-theme {
  --background: 0 0% 98%;
  --foreground: 222 47% 11%;
  --border: 214 32% 91%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --primary: 158 64% 40%;
  --primary-foreground: 0 0% 100%;
  --secondary: 210 40% 96%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;
  --accent: 210 40% 96%;
}

/* Field Mode Theme - Ultra Low-Light (STRICT: BLACK + RED ONLY) */
[data-theme="field"] {
  /* Field Mode CSS Variables */
  --bg-field: #000000;
  --text-field: #ff0000;
  --text-secondary-field: #cc0000;
  --text-muted-field: #990000;
  --border-field: #ff0000;
  --accent-field: #ff0000;
  
  /* Override all theme variables to red/black only */
  --background: 0 0% 0%;
  --foreground: 0 100% 50%;
  --border: 0 100% 50%;
  --card: 0 0% 0%;
  --card-foreground: 0 100% 50%;
  --card-border: 0 100% 50%;
  --primary: 0 100% 50%;
  --primary-foreground: 0 0% 0%;
  --secondary: 0 0% 0%;
  --secondary-foreground: 0 100% 50%;
  --muted: 0 0% 0%;
  --muted-foreground: 0 100% 40%;
  --accent: 0 100% 50%;
  --accent-foreground: 0 0% 0%;
  --destructive: 0 100% 50%;
  --destructive-foreground: 0 0% 0%;
  --input: 0 0% 0%;
  --ring: 0 100% 50%;
  --chart-1: 0 100% 50%;
  --chart-2: 0 100% 40%;
  --chart-3: 0 100% 45%;
  --chart-4: 0 100% 35%;
  --chart-5: 0 100% 30%;
}

/* Hero Title Text Shadow - REMOVED (glow effect disabled) */
/* Glow effect code saved in _docs-v101/styling/GLOW_EFFECT.md for future reference */
/* 
#hero-title,
#focus-mode-title,
[id="hero-title"],
[id="focus-mode-title"],
#banner-main-title,
[id="banner-main-title"] {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.5);
}

.light-theme #hero-title,
.light-theme #focus-mode-title,
.light-theme [id="hero-title"],
.light-theme [id="focus-mode-title"],
.light-theme #banner-main-title {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="field"] #hero-title,
[data-theme="field"] #focus-mode-title,
[data-theme="field"] [id="hero-title"],
[data-theme="field"] [id="focus-mode-title"],
[data-theme="field"] #banner-main-title {
  text-shadow: 0 2px 10px rgba(255, 0, 0, 0.9), 0 0 20px rgba(255, 0, 0, 0.5) !important;
}
*/

/* Field Mode - STRICT: Remove all gradients, glows, and non-red colors */
[data-theme="field"] .aurora-gradient-overlay {
  display: none !important;
}

[data-theme="field"] body,
[data-theme="field"] div,
[data-theme="field"] section,
[data-theme="field"] article,
[data-theme="field"] p,
[data-theme="field"] span {
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Field Mode - Override text colors to red only (more specific selectors) */
[data-theme="field"] body,
[data-theme="field"] div:not([class*="bg-"]):not([class*="border-"]),
[data-theme="field"] p,
[data-theme="field"] span:not([class*="bg-"]),
[data-theme="field"] .text-white,
[data-theme="field"] .text-black,
[data-theme="field"] .text-gray-50,
[data-theme="field"] .text-gray-100,
[data-theme="field"] .text-gray-200,
[data-theme="field"] .text-gray-300,
[data-theme="field"] .text-gray-400,
[data-theme="field"] .text-gray-500,
[data-theme="field"] .text-gray-600,
[data-theme="field"] .text-gray-700,
[data-theme="field"] .text-gray-800,
[data-theme="field"] .text-gray-900,
[data-theme="field"] .text-blue-50,
[data-theme="field"] .text-blue-100,
[data-theme="field"] .text-blue-200,
[data-theme="field"] .text-blue-300,
[data-theme="field"] .text-blue-400,
[data-theme="field"] .text-blue-500,
[data-theme="field"] .text-blue-600,
[data-theme="field"] .text-blue-700,
[data-theme="field"] .text-blue-800,
[data-theme="field"] .text-blue-900,
[data-theme="field"] .text-green-50,
[data-theme="field"] .text-green-100,
[data-theme="field"] .text-green-200,
[data-theme="field"] .text-green-300,
[data-theme="field"] .text-green-400,
[data-theme="field"] .text-green-500,
[data-theme="field"] .text-green-600,
[data-theme="field"] .text-green-700,
[data-theme="field"] .text-green-800,
[data-theme="field"] .text-green-900,
[data-theme="field"] .text-yellow-50,
[data-theme="field"] .text-yellow-100,
[data-theme="field"] .text-yellow-200,
[data-theme="field"] .text-yellow-300,
[data-theme="field"] .text-yellow-400,
[data-theme="field"] .text-yellow-500,
[data-theme="field"] .text-yellow-600,
[data-theme="field"] .text-yellow-700,
[data-theme="field"] .text-yellow-800,
[data-theme="field"] .text-yellow-900 {
  color: var(--text-field) !important;
}

/* Keep indicator lines and values green in field mode */
[data-theme="field"] #kp-mini-chart-indicator,
[data-theme="field"] #hpi-mini-chart-indicator {
  background-color: #22c55e !important; /* green-500 */
}

[data-theme="field"] #kp-mini-chart-value-overlay .text-green-400,
[data-theme="field"] #hpi-mini-chart-value-overlay .text-green-400 {
  color: #22c55e !important; /* green-500 */
}

[data-theme="field"] .text-muted-foreground,
[data-theme="field"] .text-muted,
[data-theme="field"] .text-secondary,
[data-theme="field"] label,
[data-theme="field"] .text-xs,
[data-theme="field"] .text-sm {
  color: var(--text-muted-field) !important;
}

[data-theme="field"] h1,
[data-theme="field"] h2,
[data-theme="field"] h3,
[data-theme="field"] h4,
[data-theme="field"] h5,
[data-theme="field"] h6,
[data-theme="field"] .text-foreground,
[data-theme="field"] .text-primary,
[data-theme="field"] .text-chart-1,
[data-theme="field"] .text-chart-2,
[data-theme="field"] .text-chart-3,
[data-theme="field"] .text-chart-4,
[data-theme="field"] .text-chart-5 {
  color: var(--text-field) !important;
}

/* Logo styles moved to css/logo.css */

/* Field Mode - Override ALL backgrounds to black */
[data-theme="field"] body,
[data-theme="field"] html,
[data-theme="field"] #field-mode-root,
[data-theme="field"] #field-mode-content,
[data-theme="field"] [id="field-mode-root"],
[data-theme="field"] [id="field-mode-content"] {
  background: var(--bg-field) !important;
}

[data-theme="field"] .bg-background,
[data-theme="field"] .bg-card,
[data-theme="field"] .bg-muted,
[data-theme="field"] .bg-secondary,
[data-theme="field"] .bg-white,
[data-theme="field"] .bg-black,
[data-theme="field"] .bg-gray-50,
[data-theme="field"] .bg-gray-100,
[data-theme="field"] .bg-gray-200,
[data-theme="field"] .bg-gray-300,
[data-theme="field"] .bg-gray-400,
[data-theme="field"] .bg-gray-500,
[data-theme="field"] .bg-gray-600,
[data-theme="field"] .bg-gray-700,
[data-theme="field"] .bg-gray-800,
[data-theme="field"] .bg-gray-900,
[data-theme="field"] .bg-blue-50,
[data-theme="field"] .bg-blue-100,
[data-theme="field"] .bg-blue-200,
[data-theme="field"] .bg-blue-300,
[data-theme="field"] .bg-blue-400,
[data-theme="field"] .bg-blue-500,
[data-theme="field"] .bg-blue-600,
[data-theme="field"] .bg-blue-700,
[data-theme="field"] .bg-blue-800,
[data-theme="field"] .bg-blue-900,
[data-theme="field"] .bg-green-50,
[data-theme="field"] .bg-green-100,
[data-theme="field"] .bg-green-200,
[data-theme="field"] .bg-green-300,
[data-theme="field"] .bg-green-400:not(#kp-mini-chart-indicator):not(#hpi-mini-chart-indicator),
[data-theme="field"] .bg-green-500,
[data-theme="field"] .bg-green-600,
[data-theme="field"] .bg-green-700,
[data-theme="field"] .bg-green-800,
[data-theme="field"] .bg-green-900,
[data-theme="field"] .bg-yellow-50,
[data-theme="field"] .bg-yellow-100,
[data-theme="field"] .bg-yellow-200,
[data-theme="field"] .bg-yellow-300,
[data-theme="field"] .bg-yellow-400,
[data-theme="field"] .bg-yellow-500,
[data-theme="field"] .bg-yellow-600,
[data-theme="field"] .bg-yellow-700,
[data-theme="field"] .bg-yellow-800,
[data-theme="field"] .bg-yellow-900 {
  background: var(--bg-field) !important;
}

[data-theme="field"] .bg-primary,
[data-theme="field"] .bg-chart-1,
[data-theme="field"] .bg-chart-2 {
  background: var(--bg-field) !important;
  border: 1px solid var(--border-field) !important;
}

/* Field Mode - Override borders to red */
[data-theme="field"] .border,
[data-theme="field"] [class*="border"],
[data-theme="field"] button,
[data-theme="field"] input,
[data-theme="field"] select,
[data-theme="field"] textarea,
[data-theme="field"] .card,
[data-theme="field"] div[class*="border"] {
  border-color: var(--border-field) !important;
}

/* Field Mode - Override buttons */
[data-theme="field"] button {
  background: var(--bg-field) !important;
  color: var(--text-field) !important;
  border-color: var(--border-field) !important;
}

[data-theme="field"] button:hover {
  background: var(--bg-field) !important;
  color: var(--text-field) !important;
  border-color: var(--border-field) !important;
  box-shadow: none !important;
}

/* Field Mode - Override links */
[data-theme="field"] a {
  color: var(--text-field) !important;
}

[data-theme="field"] a:hover {
  color: var(--text-secondary-field) !important;
}

/* Field Mode - Override SVG icons */
[data-theme="field"] svg {
  color: var(--text-field) !important;
  stroke: var(--text-field) !important;
  fill: var(--text-field) !important;
}

/* Field Mode - Override inputs */
[data-theme="field"] input,
[data-theme="field"] textarea,
[data-theme="field"] select {
  background: var(--bg-field) !important;
  color: var(--text-field) !important;
  border-color: var(--border-field) !important;
}

/* Field Mode - Remove all animations, glows, pulses */
[data-theme="field"] .animate-pulse,
[data-theme="field"] .animate-spin {
  animation: none !important;
}

[data-theme="field"] .animate-pulse * {
  opacity: 1 !important;
}

/* Field Mode - Override chart canvas */
[data-theme="field"] canvas {
  filter: none !important;
}

/* Field Mode - None/Color Photo Mode (default when no overlay selected) */
[data-theme="field"][data-image-overlay="none"] img:not(#banner-background-image),
[data-theme="field"]:not([data-image-overlay]) img:not(#banner-background-image) {
  opacity: 1;
  filter: none !important;
}

/* Field Mode - B&W image overlay option */
[data-theme="field"][data-image-overlay="bw"] img:not(#banner-background-image) {
  opacity: 0.7;
  filter: grayscale(100%) brightness(0.6) !important;
}

/* Field Mode - Red tinted image overlay option */
[data-theme="field"][data-image-overlay="red"] img:not(#banner-background-image) {
  opacity: 0.7;
  filter: grayscale(100%) brightness(0.6) sepia(100%) hue-rotate(0deg) saturate(300%) !important;
}

/* Field Mode - Banner Image Overlays */
[data-theme="field"][data-image-overlay="none"] #banner-background-image,
[data-theme="field"]:not([data-image-overlay]) #banner-background-image,
[data-theme="field"][data-image-overlay="none"] [id="banner-background-image"],
[data-theme="field"]:not([data-image-overlay]) [id="banner-background-image"] {
  filter: none !important;
  position: absolute !important;
  opacity: 1 !important;
  display: block !important;
  visibility: visible !important;
  z-index: 0 !important;
}

/* Field Mode - Banner with red overlay */
[data-theme="field"][data-image-overlay="red"] #banner-background-image,
[data-theme="field"][data-image-overlay="red"] [id="banner-background-image"] {
  filter: grayscale(100%) brightness(0.5) sepia(100%) hue-rotate(0deg) saturate(300%) contrast(1.1) !important;
  position: absolute !important;
  opacity: 1 !important;
  display: block !important;
  visibility: visible !important;
  z-index: 0 !important;
}

/* Field Mode - Banner with B&W overlay */
[data-theme="field"][data-image-overlay="bw"] #banner-background-image,
[data-theme="field"][data-image-overlay="bw"] [id="banner-background-image"] {
  filter: grayscale(100%) brightness(0.5) !important;
  position: absolute !important;
  opacity: 1 !important;
  display: block !important;
  visibility: visible !important;
  z-index: 0 !important;
}

/* Field Mode - Reduce banner overlay darkness so background image is visible */
[data-theme="field"] #banner-overlay,
[data-theme="field"] [id="banner-overlay"] {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.2)) !important;
}

/* Field Mode - Add red overlay to banner image (only for red tint mode) */
[data-theme="field"][data-image-overlay="red"] #banner-background-image::before,
[data-theme="field"][data-image-overlay="red"] [id="banner-background-image"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.4));
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
}

/* Field Mode - Remove all backdrop blur effects */
[data-theme="field"] .backdrop-blur-sm,
[data-theme="field"] .backdrop-blur {
  backdrop-filter: none !important;
}

/* Field Mode - Ensure html and body are black */
html[data-theme="field"],
html[data-theme="field"] body {
  background: #000000 !important;
  color: #ff0000 !important;
}

/* Field Mode Dimmer - applies brightness filter to main content only, not controls */
[data-theme="field"] #field-mode-content,
[data-theme="field"] [id="field-mode-content"] {
  filter: brightness(var(--field-dimmer, 1));
  transition: filter 0.3s ease;
}

/* Ensure controls are always visible and not affected by dimmer */
/* Settings Buttons Container - Independent Container */
#settings-buttons-container {
  filter: brightness(1) !important;
  position: fixed !important;
  bottom: 1.5rem !important;
  left: 1.5rem !important;
  z-index: 100 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.75rem !important;
  pointer-events: auto !important;
}

/* Field Mode - Ensure controls stay in correct position (same as dark/light) */
[data-theme="field"] #settings-buttons-container {
  position: fixed !important;
  bottom: 1.5rem !important;
  left: 1.5rem !important;
  z-index: 100 !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.75rem !important;
  pointer-events: auto !important;
}

/* Settings Panel Container - Independent Container */
/* Positioned to align with settings-buttons-container */
#settings-panel-container {
  position: fixed !important;
  bottom: 1.5rem !important;
  left: 1.5rem !important;
  z-index: 100 !important;
  pointer-events: none !important;
}

[data-theme="field"] #settings-panel-container {
  filter: brightness(1) !important;
  pointer-events: none !important;
}

/* Ensure buttons inside container are inline */
#settings-buttons-container > button {
  display: inline-flex !important;
  flex-shrink: 0 !important;
}

/* Expanded Controls Panel - Positioned relative to settings button */
#expanded-controls-panel {
  position: absolute !important;
  bottom: calc(100% + 0.75rem) !important;
  left: 0 !important;
}

/* Scroll to Top Button - Right Corner */
#scroll-to-top-button {
  position: fixed !important;
  bottom: 1.5rem !important;
  right: 1.5rem !important;
  z-index: 50 !important;
}

[data-theme="field"] #scroll-to-top-button {
  position: fixed !important;
  bottom: 1.5rem !important;
  right: 1.5rem !important;
  z-index: 101 !important;
  background: #000000 !important;
  border: 2px solid #ff0000 !important;
  color: #ff0000 !important;
  filter: brightness(1) !important;
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

[data-theme="field"] #scroll-to-top-button:hover {
  background: #1a0000 !important;
  border-color: #ff3333 !important;
  color: #ff3333 !important;
}

[data-theme="field"] #scroll-to-top-button svg {
  color: #ff0000 !important;
  stroke: #ff0000 !important;
}

/* Main control button styling */
#main-control-button {
  position: relative;
  overflow: visible;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(209, 244, 234, 0.9));
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.15);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

#main-control-button:hover {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.45);
  transform: translateY(-2px);
}

/* Field Mode specific styling */
[data-theme="field"] #main-control-button {
  background: linear-gradient(135deg, rgba(60, 0, 0, 0.9), rgba(20, 0, 0, 0.9));
  border-color: rgba(255, 26, 26, 0.6);
  box-shadow: 0 8px 20px rgba(255, 26, 26, 0.15);
}

[data-theme="field"] #main-control-button:hover {
  box-shadow: 0 0 0 3px rgba(255, 26, 26, 0.6);
}

/* Loading Skeleton */
.skeleton-loader {
  background: linear-gradient(90deg, hsl(var(--muted)) 25%, hsl(var(--card)) 50%, hsl(var(--muted)) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 0.375rem;
}

/* Field Mode - Red skeleton loader */
[data-theme="field"] .skeleton-loader {
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.1) 25%, rgba(255, 0, 0, 0.2) 50%, rgba(255, 0, 0, 0.1) 75%);
  background-size: 200% 100%;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

  /* Mobile Bottom Nav Spacing */
@media (max-width: 768px) {
  main {
    padding-bottom: 4rem; /* Space for bottom nav */
  }
  
  #settings-buttons-container,
  [data-theme="field"] #settings-buttons-container {
    bottom: 5.5rem !important; /* Above mobile nav */
    left: 1rem !important;
    gap: 0.5rem !important;
  }
  
  #scroll-to-top-button,
  [data-theme="field"] #scroll-to-top-button {
    bottom: 5.5rem !important; /* Above mobile nav */
    right: 1rem !important;
    z-index: 101 !important;
  }
  
  /* Chart optimization for mobile */
  canvas {
    max-height: 300px !important;
  }
}

/* Swipe Gesture Support */
.swipe-container {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

/* Mobile Responsive Improvements */
/* Mobile: Images take full width of container */
@media (max-width: 768px) {
  img, video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
  .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-4 {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Keep menu width fixed on mobile */
  #expanded-controls-panel {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
  }
  
  /* Ensure all cards and containers are full width on mobile */
  .w-full {
    width: 100% !important;
  }
  
  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }
  
  /* Make tables scrollable on mobile */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Ensure grids stack on mobile */
  .grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Improve touch targets on mobile */
  button, a {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Ensure tab navigation is scrollable on mobile */
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  
  /* Hide scrollbar for tab navigation containers */
  .border-b.overflow-x-auto {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .border-b.overflow-x-auto::-webkit-scrollbar {
    display: none;
  }
  
  /* Fix tab menu bar on mobile - prevent merging and ensure proper spacing */
  /* NOTE: Dashboard tab menu responsive styles moved to css/dashboard.css */
  #hero-tab-menu-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    overflow-x: visible !important;
  }
  
  #hero-tab-menu-bar button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex-shrink: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  /* Ensure hemisphere tabs don't merge on mobile */
  [role="tablist"] {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
  }
  
  [role="tablist"] button {
    flex-shrink: 0 !important;
    min-width: fit-content !important;
    white-space: nowrap !important;
  }
  
  /* Better spacing on mobile */
  .space-y-6 > * + * {
    margin-top: 1rem;
  }
  
  /* Full width sections on mobile */
  section {
    width: 100%;
    max-width: 100%;
  }
}

/* Responsive text sizing */
@media (max-width: 768px) {
  h1 { font-size: 2rem !important; }
  h2 { font-size: 1.5rem !important; }
  h3 { font-size: 1.25rem !important; }
  h4 { font-size: 1.125rem !important; }
}

/* Ensure all sections inside main respect container width */
main section {
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure accordion content respects width - collapse plugin handles overflow */
[x-collapse] {
  box-sizing: border-box;
}

/* ========== CARD & BOX STYLING - Standalone CSS (No Tailwind Dependency) ========== */

/* Card Background Colors */
.bg-card {
  background-color: hsl(var(--card));
}

.bg-background {
  background-color: hsl(var(--background));
}

.bg-muted {
  background-color: hsl(var(--muted));
}

.bg-secondary {
  background-color: hsl(var(--secondary));
}

.bg-primary {
  background-color: hsl(var(--primary));
}

/* Card Text Colors */
.text-card-foreground {
  color: hsl(var(--card-foreground));
}

.text-foreground {
  color: hsl(var(--foreground));
}

.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

.text-primary {
  color: hsl(var(--primary));
}

/* Border Styling */
.border {
  border-width: 1px;
  border-style: solid;
  border-color: hsl(var(--border));
}

.border-border {
  border-color: hsl(var(--border));
}

.border-card-border {
  border-color: hsl(var(--card-border));
}

/* Card Container - Base Card Styling */
.card,
[class*="card"] {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--card-border));
  border-radius: var(--radius);
}

/* Box Shadows - Match Tailwind shadow utilities */
.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.shadow-none {
  box-shadow: none;
}

/* Light Theme - Card Shadows */
.light-theme .shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.light-theme .shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.light-theme .shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.light-theme .shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.light-theme .shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Rounded Corners */
.rounded {
  border-radius: var(--radius);
}

.rounded-lg {
  border-radius: calc(var(--radius) + 2px);
}

.rounded-md {
  border-radius: calc(var(--radius) - 2px);
}

.rounded-sm {
  border-radius: calc(var(--radius) - 4px);
}

/* Padding Utilities */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

/* Margin Utilities */
.m-2 { margin: 0.5rem; }
.m-4 { margin: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }

/* ========== TIME PILL / DATA UPDATED PILL STYLING ========== */
/* 
 * NOTE: Dashboard live badge styling moved to css/dashboard.css
 * Legacy support maintained in dashboard.css with #hero-live-badge selector
 */

/* ========== LOCATION PILL STYLING ========== */
/* 
 * NOTE: Dashboard location pill styling moved to css/dashboard.css
 * Legacy support maintained in dashboard.css with #hero-live-badge-wrapper selectors
 */
/* ========== END LOCATION PILL STYLING ========== */

/* ========== TAB MENU BAR STYLING ========== */
/* 
 * NOTE: Dashboard tab menu bar styling moved to css/dashboard.css
 * Legacy support maintained in dashboard.css with #hero-tab-menu-bar selector
 * Use .dashboard-tab-menu class for new implementations
 */
/* ========== END TAB MENU BAR STYLING ========== */

/* ========== CORNER PILL MARKERS (JSON/TXT BADGES) STYLING ========== */
/* 
 * NOTE: JSON/TXT tag styling has been moved to css/dashboard.css
 * This section is kept for backward compatibility but styles are now in dashboard.css
 * See dashboard.css for the current implementation matching the HPI TXT tag reference design
 */
/* ========== END CORNER PILL MARKERS STYLING ========== */

/* ========== SECTION TITLES - LEFT ALIGN ========== */

/* Ensure all main section titles are left-aligned (but not banner titles) */
section h2:not(#banner-main-title),
section[id*="section"] h2:not(#banner-main-title),
[id*="section"] h2:not(#banner-main-title),
[id*="-header"] h2:not(#banner-main-title),
[id*="-title"]:not(#banner-main-title):not(#banner-subtitle),
h2.text-2xl:not(#banner-main-title),
h2[class*="text-2xl"]:not(#banner-main-title),
h2[class*="font-bold"]:not(#banner-main-title) {
  text-align: left !important;
}

/* Section header containers should be left-aligned (but not banner containers) */
[id*="-header"]:not([id*="banner"]),
[id*="-title-wrapper"]:not([id*="banner"]),
[id*="-title-wrapper"]:not([id*="banner"]) > *,
section > div:first-child:not([id*="banner"]),
.flex.items-center.gap-3:not([id*="banner"]) {
  text-align: left !important;
  justify-content: flex-start !important;
}

/* All title wrappers with flex should be left-aligned */
[id*="-title-wrapper"].flex,
div[id*="-title-wrapper"].flex {
  justify-content: flex-start !important;
}

/* Force left alignment on specific title wrappers */
#forecast-maps-title-wrapper,
#forecast-maps-title-wrapper *,
#forecast-maps-title,
[id*="-title-wrapper"].flex.items-center.gap-3,
[id*="-title-wrapper"].flex.items-center.gap-3 *,
div[id*="-title-wrapper"].flex.items-center.gap-3,
div[id*="-title-wrapper"].flex.items-center.gap-3 h2,
div[id*="-title-wrapper"].flex.items-center.gap-3 * {
  text-align: left !important;
  justify-content: flex-start !important;
}

/* Ensure parent headers don't override title wrapper alignment */
[id*="-header"].flex.items-center.justify-between [id*="-title-wrapper"],
[id*="-header"].flex.items-center.justify-between > [id*="-title-wrapper"] {
  justify-content: flex-start !important;
  margin-right: auto !important;
  text-align: left !important;
}

/* Specific fix for forecast-maps-title-wrapper */
#forecast-maps-header #forecast-maps-title-wrapper,
#forecast-maps-header #forecast-maps-title-wrapper * {
  justify-content: flex-start !important;
  text-align: left !important;
}

/* Fix for all header title wrappers - ensure left alignment */
#active-alerts-header,
#active-alerts-header #active-alerts-title-wrapper,
#active-alerts-header #active-alerts-title-wrapper *,
#active-alerts-title,
#cme-notices-header,
#cme-notices-header #cme-notices-title-wrapper,
#cme-notices-header #cme-notices-title-wrapper *,
#cme-notices-title,
#current-conditions-header,
#current-conditions-header #current-conditions-title-wrapper,
#current-conditions-header #current-conditions-title-wrapper *,
#current-conditions-title {
  justify-content: flex-start !important;
  text-align: left !important;
}

/* Ensure headers with justify-between don't center their children */
#active-alerts-header.flex.items-center.justify-between,
#cme-notices-header.flex.items-center.justify-between,
#current-conditions-header.flex.items-center.justify-between {
  justify-content: space-between !important;
}

#active-alerts-header.flex.items-center.justify-between > *:first-child,
#cme-notices-header.flex.items-center.justify-between > *:first-child,
#current-conditions-header.flex.items-center.justify-between > *:first-child {
  margin-right: auto !important;
  flex: 0 0 auto !important;
}

/* Specific section title selectors */
#forecast-maps-title,
#active-alerts-title,
#current-conditions-title,
#hpi-forecast-charts-title,
#kp-forecast-charts-title,
#top-viewing-locations-title-header,
#weather-forecast-title-header,
#aurora-colors-heights-title,
#aurora-how-works-title,
#aurora-scientific-title,
#faq-title,
#interactive-map-title,
#guides-tips-title,
#aurora-tour-operators-title,
#aurora-lodging-title,
#resources-title,
#sources-title,
#about-nlak-version-title {
  text-align: left !important;
}

/* Ensure flex containers with titles are left-aligned (but not banner containers) */
.flex.items-center.gap-3:not([id*="banner"]) h2:not(#banner-main-title),
.flex.items-center.justify-between:not([id*="banner"]) h2:not(#banner-main-title),
[id*="-title-wrapper"]:not([id*="banner"]) h2:not(#banner-main-title),
[id*="-header"]:not([id*="banner"]) h2:not(#banner-main-title) {
  text-align: left !important;
}

/* Force left alignment on all group/section titles */
h2.text-2xl.md\:text-3xl.font-bold {
  text-align: left !important;
}

/* Banner title should remain centered */
#banner-content-container,
#banner-title-wrapper,
#banner-main-title,
#banner-subtitle,
[id="banner-content-container"],
[id="banner-title-wrapper"],
[id="banner-main-title"],
[id="banner-subtitle"] {
  text-align: center !important;
}

/* Ensure banner content container stays centered */
#banner-content-wrapper,
[id="banner-content-wrapper"] {
  justify-content: center !important;
}

/* ========== END SECTION TITLES STYLING ========== */

/* ========== PLUS/MINUS BUTTONS - RIGHT ALIGN ========== */

/* Ensure plus/minus indicator buttons are right-aligned */
/* Target buttons with justify-between that contain plus/minus indicators */
button[id*="-header"][class*="justify-between"] > div:last-child,
button[class*="flex items-center justify-between"] > div:last-child:has(svg[x-show]),
[id*="-header"] > div:last-child.flex.items-center {
  margin-left: auto !important;
  flex-shrink: 0 !important;
}

/* Ensure accordion buttons with plus/minus maintain right alignment */
button[class*="flex items-center justify-between"] {
  justify-content: space-between !important;
}

/* Plus/Minus indicator container - force to right */
/* Target divs that contain the plus/minus SVG icons */
div.flex.items-center:has(svg[stroke*="M12 4v16"]),
div.flex.items-center:has(svg[stroke*="M20 12H4"]),
div.flex.items-center:has(svg[x-show*="SectionOpen"]) {
  margin-left: auto !important;
  flex-shrink: 0 !important;
}

/* Specific selector for plus/minus indicators in header buttons */
[id*="-header"] > div.flex.items-center:last-child {
  margin-left: auto !important;
  flex-shrink: 0 !important;
}

/* ========== END PLUS/MINUS BUTTONS STYLING ========== */

/* ========== REMOVE BORDERS FROM NAV, FOOTER, AND BUTTONS ========== */

/* Remove borders and rounded corners from footer elements */
footer,
footer.border-t,
footer[class*="border-t"],
footer[class*="border-border"],
footer .border-t,
footer .border-border,
#main-footer,
#footer-container,
#shared-footer-container,
footer[class*="rounded"],
footer[class*="rounded-"] {
  border-top: none !important;
  border: none !important;
  border-radius: 0 !important;
}

/* Remove borders from nav elements */
nav,
nav.border-t,
nav[class*="border-t"],
nav[class*="border-border"],
nav#mobile-bottom-nav,
nav#mobile-bottom-nav.border-t,
nav#mobile-bottom-nav[class*="border-t"],
nav#mobile-bottom-nav[class*="border-border"] {
  border-top: none !important;
  border: none !important;
}

/* Remove borders from buttons (unless they need them for styling) */
button:not([class*="border-"]) {
  border: none !important;
}

/* Remove borders from banner overlay */
#banner-overlay,
div#banner-overlay,
[id="banner-overlay"],
[id="banner-background-image"] {
  border: none !important;
}

/* Remove borders and rounded corners from shared header and footer containers */
#shared-header-container,
#shared-footer-container,
[id*="shared-header"],
[id*="shared-footer"] {
  border: none !important;
  border-radius: 0 !important;
}

/* ========== SHARED HEADER CONTAINER STYLING ========== */
/* Ensure header container displays correctly */
#shared-header-container {
  position: relative;
  width: 100%;
  z-index: 50;
  margin: 0;
  padding: 0;
}

/* Ensure header inside container is properly styled */
#shared-header-container header {
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: hsl(var(--background) / 0.95) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border-bottom: 1px solid hsl(var(--border)) !important;
}

/* Ensure header content is properly laid out */
#shared-header-container header .container {
  width: 100% !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* Ensure header flex layout works correctly */
#shared-header-container header > .container > .flex {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 4rem !important;
  width: 100% !important;
}

/* Ensure logo displays correctly */
#shared-header-container .nlak-logo-link {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
  z-index: 1 !important;
}

/* Ensure logo SVG displays correctly */
#shared-header-container .nlak-logo-svg {
  display: block !important;
  width: 8em !important;
  height: 2.5em !important;
}

/* Ensure navigation menu displays correctly */
#shared-header-container nav {
  display: flex !important;
  align-items: center !important;
  gap: 1.5rem !important;
  flex-shrink: 0 !important;
}

/* Ensure hamburger menu button displays correctly */
#shared-header-container button[aria-label*="Menu"],
#shared-header-container button[aria-label*="menu"],
#shared-header-container button[aria-label*="Full Screen Menu"],
#shared-header-container button[aria-label*="full screen menu"] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  color: hsl(var(--foreground)) !important;
}

/* Ensure hamburger menu SVG displays correctly */
#shared-header-container button svg {
  display: block !important;
  width: 1.5rem !important;
  height: 1.5rem !important;
}

/* Mobile: Hide desktop nav, show hamburger */
@media (max-width: 767px) {
  #shared-header-container nav.hidden.md\:flex,
  #shared-header-container nav[class*="hidden md:flex"] {
    display: none !important;
  }
}

/* Desktop: Show desktop nav */
@media (min-width: 768px) {
  #shared-header-container nav.hidden.md\:flex,
  #shared-header-container nav[class*="hidden md:flex"] {
    display: flex !important;
  }
}

/* Ensure header links are properly styled */
#shared-header-container nav a {
  display: inline-block !important;
  text-decoration: none !important;
  color: hsl(var(--foreground)) !important;
  transition: color 0.2s ease !important;
}

#shared-header-container nav a:hover {
  color: hsl(var(--primary)) !important;
}

/* Fix any overflow issues */
#shared-header-container,
#shared-header-container * {
  box-sizing: border-box !important;
}

/* Ensure header doesn't get cut off */
#shared-header-container {
  overflow: visible !important;
}

#shared-header-container header {
  overflow: visible !important;
}
/* ========== END SHARED HEADER CONTAINER STYLING ========== */

/* Remove borders from mobile bottom nav specifically */
#mobile-bottom-nav,
nav#mobile-bottom-nav {
  border-top: none !important;
  border: none !important;
}

/* Ensure all footer nav bars are solid (not transparent) */
#dashboard-standard-bottom-nav,
#dashboard-focus-bottom-nav,
#other-pages-bottom-nav,
#map-page-bottom-nav,
nav#dashboard-standard-bottom-nav,
nav#dashboard-focus-bottom-nav,
nav#other-pages-bottom-nav,
nav#map-page-bottom-nav {
  background-color: hsl(var(--background)) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
}

/* Remove borders from footer bottom bar */
footer .border-t,
footer [class*="border-t"] {
  border-top: none !important;
  border: none !important;
}

/* Remove border and outline from main-content - ALL MODES - HIGHEST PRIORITY */
#main-content,
main#main-content,
main#main-content.container,
#main-content.container,
main.container#main-content,
main[id="main-content"],
main[id="main-content"].container,
main.container[id="main-content"] {
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  outline: 0 !important;
  outline-width: 0 !important;
  outline-style: none !important;
  outline-color: transparent !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
}

/* Remove borders from main-content in all theme modes */
[data-theme="field"] #main-content,
[data-theme="field"] main#main-content,
[data-theme="field"] main#main-content.container,
.light-theme #main-content,
.light-theme main#main-content,
.light-theme main#main-content.container,
[data-theme=""] #main-content,
[data-theme=""] main#main-content,
[data-theme=""] main#main-content.container,
body #main-content,
body main#main-content,
html #main-content,
html main#main-content {
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  outline: 0 !important;
  outline-width: 0 !important;
  outline-style: none !important;
  outline-color: transparent !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
}

/* Note: Borders are now allowed on hero-section and main-content-tabs-section */
/* Only remove border-radius from specific elements that should have straight edges */

/* Remove borders from footer nav buttons */
#mobile-bottom-nav button,
#focus-mode-bottom-nav button {
  border: none !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  border-bottom: none !important;
}

/* Remove border from hero-tab-menu-bar */
#hero-tab-menu-bar {
  border: none !important;
  border-bottom: none !important;
}

/* Remove border and outline from div-min-h-screen - ALL MODES - HIGHEST PRIORITY */
#div-min-h-screen,
div#div-min-h-screen,
[id="div-min-h-screen"] {
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  outline: 0 !important;
  outline-width: 0 !important;
  outline-style: none !important;
  outline-color: transparent !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
}

/* Remove borders from div-min-h-screen in all theme modes */
[data-theme="field"] #div-min-h-screen,
[data-theme="field"] div#div-min-h-screen,
[data-theme="field"] [id="div-min-h-screen"],
.light-theme #div-min-h-screen,
.light-theme div#div-min-h-screen,
.light-theme [id="div-min-h-screen"],
[data-theme=""] #div-min-h-screen,
[data-theme=""] div#div-min-h-screen,
[data-theme=""] [id="div-min-h-screen"],
body #div-min-h-screen,
body div#div-min-h-screen,
html #div-min-h-screen,
html div#div-min-h-screen {
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  outline: 0 !important;
  outline-width: 0 !important;
  outline-style: none !important;
  outline-color: transparent !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
}

/* ========== END REMOVE BORDERS STYLING ========== */

/* ========== COLOR SCALE BOXES - VISIBLE IN ALL THEMES ========== */

/* Ensure color scale boxes are visible in all theme modes */
#color-green,
#color-yellow,
#color-orange,
#color-red,
#color-red-max,
[id*="color-green"],
[id*="color-yellow"],
[id*="color-orange"],
[id*="color-red"] {
  /* Force visibility - inline styles take precedence but this ensures fallback */
  opacity: 1 !important;
  visibility: visible !important;
}

/* Field mode - color boxes should still show their colors */
[data-theme="field"] #color-green,
[data-theme="field"] #color-yellow,
[data-theme="field"] #color-orange,
[data-theme="field"] #color-red,
[data-theme="field"] #color-red-max {
  /* Colors are set via inline styles, but ensure text is readable */
  opacity: 1 !important;
}

/* Color intensity chart boxes - ensure visibility */
.color-intensity-chart [style*="background-color"] {
  opacity: 1 !important;
  visibility: visible !important;
}

[data-theme="field"] .color-intensity-chart [style*="background-color"] {
  opacity: 1 !important;
}

/* ========== END COLOR SCALE BOXES STYLING ========== */

/* ========== KP INDEX HISTORY YEAR PAGES - HERO BANNER STYLING ========== */

/* Hero Background Section */
#overview,
section#overview,
[id="overview"],
section.hero-bg,
[id="overview"].hero-bg {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg,
[class*="hero-bg"],
#overview.hero-bg,
section#overview.hero-bg {
  background-image: url('../img/NLAK-Header-BG.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Hero Banner Content */
#overview .relative.z-10,
section#overview .relative.z-10,
[id="overview"] .relative.z-10,
#overview-content {
  position: relative;
  z-index: 10;
  text-align: center !important;
  padding: 1rem;
}

/* Ensure title is centered within content container */
#overview-content .kp-year-banner-title,
#overview-content #overview-title,
#overview-content h1.kp-year-banner-title {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Historical Archive Label */
#overview-label,
#overview p.text-xs,
section#overview p.text-xs,
[id="overview"] p.text-xs,
[id="overview-label"] {
  text-transform: uppercase;
  letter-spacing: 0.45em;
  color: hsl(var(--primary));
}

/* Kp Index Records Title */
#overview-title,
#overview h1,
section#overview h1,
[id="overview"] h1,
[id="overview-title"],
.kp-year-banner-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: hsl(var(--primary));
  text-align: center !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
}

@media (min-width: 768px) {
  #overview-title,
  #overview h1,
  section#overview h1,
  [id="overview"] h1,
  [id="overview-title"],
  .kp-year-banner-title {
    font-size: 3.75rem;
  }
}

/* Aurora Pill Styling */
#overview-year-pill,
.aurora-pill,
[class*="aurora-pill"],
[id="overview-year-pill"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  border: 2px solid hsl(var(--primary));
  background: white;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: hsl(var(--primary));
  text-shadow: none;
  overflow: hidden;
  backdrop-filter: blur(8px);
  box-shadow: 
    0 0 20px rgba(16, 185, 129, 0.4),
    0 0 40px rgba(14, 165, 233, 0.3),
    0 0 60px rgba(139, 92, 246, 0.2);
  animation: aurora-glow 3s ease-in-out infinite;
}

#overview-year-pill span,
.aurora-pill span,
[class*="aurora-pill"] span,
[id="overview-year-pill"] span,
#overview-year-text,
[id="overview-year-text"] {
  position: relative;
  z-index: 1;
}

/* Aurora Pill Animations */
@keyframes aurora-move {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(10px, -10px) rotate(5deg);
  }
  50% {
    transform: translate(-5px, 5px) rotate(-3deg);
  }
  75% {
    transform: translate(-10px, -5px) rotate(2deg);
  }
}

@keyframes aurora-move-reverse {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-8px, 8px) rotate(-4deg);
  }
  50% {
    transform: translate(5px, -5px) rotate(3deg);
  }
  75% {
    transform: translate(8px, 5px) rotate(-2deg);
  }
}

@keyframes aurora-glow {
  0%, 100% {
    box-shadow: 
      0 0 20px rgba(16, 185, 129, 0.4),
      0 0 40px rgba(14, 165, 233, 0.3),
      0 0 60px rgba(139, 92, 246, 0.2);
  }
  50% {
    box-shadow: 
      0 0 30px rgba(16, 185, 129, 0.6),
      0 0 50px rgba(14, 165, 233, 0.5),
      0 0 70px rgba(139, 92, 246, 0.4);
  }
}

/* Hero Banner Description Text */
#overview-description,
#overview p.text-base,
section#overview p.text-base,
[id="overview"] p.text-base,
[id="overview-description"] {
  color: hsl(var(--primary) / 0.9);
  line-height: 1.75;
}

/* Hero Banner Buttons */
#overview-back-button,
#overview-data-sources-button,
#overview a,
section#overview a,
[id="overview"] a,
[id="overview-back-button"],
[id="overview-data-sources-button"] {
  transition: all 0.3s ease;
}

/* Back to Archive Button */
#overview-back-button,
#overview a[href*="history"]:not([href*="data-sources"]),
section#overview a[href*="history"]:not([href*="data-sources"]),
[id="overview"] a[href*="history"]:not([href*="data-sources"]),
[id="overview-back-button"] {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 2px solid hsl(var(--primary));
  color: hsl(var(--primary));
}

#overview-back-button:hover,
#overview a[href*="history"]:not([href*="data-sources"]):hover,
section#overview a[href*="history"]:not([href*="data-sources"]):hover,
[id="overview"] a[href*="history"]:not([href*="data-sources"]):hover,
[id="overview-back-button"]:hover {
  background: hsl(var(--primary));
  color: white;
}

/* Data Sources Button */
#overview-data-sources-button,
#overview a[href*="data-sources"],
section#overview a[href*="data-sources"],
[id="overview"] a[href*="data-sources"],
[id="overview-data-sources-button"] {
  background: hsl(var(--primary));
  color: white;
}

#overview-data-sources-button:hover,
#overview a[href*="data-sources"]:hover,
section#overview a[href*="data-sources"]:hover,
[id="overview"] a[href*="data-sources"]:hover,
[id="overview-data-sources-button"]:hover {
  background: hsl(var(--primary) / 0.9);
}

/* ========== END KP INDEX HISTORY YEAR PAGES STYLING ========== */

/* ========== PERFORMANCE OPTIMIZATIONS ========== */

/* Content Visibility - Skip rendering off-screen content */
.accordion-content:not([data-open="true"]) {
  content-visibility: auto;
  contain-intrinsic-size: 200px;
}

/* Optimize sections that are initially hidden */
section[x-show="false"],
div[x-show="false"] {
  content-visibility: auto;
  contain-intrinsic-size: 100px;
}

/* Optimize accordion content that's collapsed */
div[x-collapse]:not([x-show="true"]) {
  content-visibility: auto;
  contain-intrinsic-size: 50px;
}

/* Will-change hints for animated elements */
.chart-container,
canvas {
  will-change: transform;
  transform: translateZ(0); /* Force GPU acceleration */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Optimize canvas rendering for smooth scrolling with fallbacks */
canvas[id*="aurora"] {
  /* GPU acceleration with vendor prefixes for older browsers */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -moz-transform: translateZ(0);
  
  /* Performance hints */
  will-change: contents;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  
  /* Image rendering */
  image-rendering: auto;
  -webkit-image-rendering: auto;
  -moz-image-rendering: auto;
}

/* Smooth scrolling for entire page with fallbacks */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* iOS Safari */
}

/* Fallback for browsers that don't support scroll-behavior */
@supports not (scroll-behavior: smooth) {
  html {
    scroll-behavior: auto;
  }
}

/* Optimize canvas containers - use class-based approach for better compatibility */
.aurora-canvas-container {
  /* CSS containment with fallback */
  contain: layout style paint;
  -webkit-contain: layout style paint;
  
  /* GPU acceleration */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -moz-transform: translateZ(0);
  
  /* Performance hints */
  will-change: contents;
}

/* Fallback for browsers that don't support CSS containment */
@supports not (contain: layout) {
  .aurora-canvas-container {
    /* Use isolation as fallback */
    isolation: isolate;
    position: relative;
  }
}

/* Optimize image rendering */
img {
  content-visibility: auto;
  image-rendering: auto;
}

/* Optimize video elements */
video {
  content-visibility: auto;
}

/* ========== END PERFORMANCE OPTIMIZATIONS ========== */

/* ========== BREADCRUMB COMPONENT STYLES ========== */
.breadcrumb-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  padding: 0 1rem 0.75rem 1rem;
  border-radius: 0;
  border: none;
  border-bottom: none;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* Override any page-specific rounded breadcrumb styles */
.breadcrumb-bar {
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
}

/* Mobile-friendly responsive styles - keep items in single row */
@media (max-width: 640px) {
  .breadcrumb-bar {
    padding: 0.375rem 0.75rem 0.5rem 0.75rem;
    gap: 0.25rem;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    align-items: center !important;
    min-height: 1.75rem;
  }
  
  /* Hide scrollbar for Chrome, Safari and Opera */
  .breadcrumb-bar::-webkit-scrollbar {
    display: none;
  }
  
  /* Ensure breadcrumb items don't shrink on mobile */
  .breadcrumb-bar > * {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
  }
  
  /* Ensure links and dividers stay aligned */
  .breadcrumb-link,
  .breadcrumb-divider {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
  }
}

.breadcrumb-link {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.75);
  transition: color 200ms ease;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Mobile-friendly font sizes */
@media (max-width: 640px) {
  .breadcrumb-link {
    font-size: 0.5rem;
    letter-spacing: 0.05em;
    line-height: 1.2;
  }
}

@media (min-width: 641px) {
  .breadcrumb-link {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }
}

.breadcrumb-link:hover,
.breadcrumb-link:focus-visible {
  color: #f8fafc;
  outline: none;
}

/* Light theme breadcrumb link styles */
.light-theme .breadcrumb-link {
  color: hsl(var(--muted-foreground));
}

.light-theme .breadcrumb-link:hover,
.light-theme .breadcrumb-link:focus-visible {
  color: hsl(var(--foreground));
}

.breadcrumb-divider {
  color: rgba(148, 163, 184, 0.65);
  font-size: 0.6875rem;
  margin: 0 0.25rem;
  flex-shrink: 0;
}

/* Light theme breadcrumb divider */
.light-theme .breadcrumb-divider {
  color: hsl(var(--muted-foreground) / 0.6);
}

/* Mobile-friendly divider */
@media (max-width: 640px) {
  .breadcrumb-divider {
    font-size: 0.5rem;
    margin: 0 0.125rem;
    line-height: 1.2;
  }
}

/* Breadcrumb container - aligned with header container */
#breadcrumb-container {
  width: 100%;
  position: relative;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0.5rem;
  margin-top: 0;
  margin-bottom: 0;
  text-align: left !important; /* Force left alignment on all pages */
  z-index: 40; /* Below header but above content */
}

/* Override any text-center classes on breadcrumb container */
#breadcrumb-container.text-center {
  text-align: left !important;
}

/* Ensure breadcrumb bar aligns left with same padding as header */
#breadcrumb-container .breadcrumb-bar {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-left: 1rem; /* Match header px-4 (1rem) */
  padding-right: 1rem;
  justify-content: flex-start !important; /* Force left alignment */
}
/* ========== END BREADCRUMB COMPONENT STYLES ========== */

/* Logo styles moved to css/logo.css */

/* ========== SHARED BUTTON CLASSES ========== */
/* Primary button - main action buttons */
.btn-primary {
  padding: 0.5rem 1rem;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.5);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Secondary button - secondary actions */
.btn-secondary {
  padding: 0.5rem 1rem;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background-color 0.2s;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: hsl(var(--muted) / 0.5);
}

.btn-secondary:focus {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.5);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Ghost button - minimal style */
.btn-ghost {
  padding: 0.5rem 1rem;
  color: hsl(var(--foreground));
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background-color 0.2s;
  border: none;
  background: transparent;
  cursor: pointer;
}

.btn-ghost:hover {
  background-color: hsl(var(--muted) / 0.3);
}

.btn-ghost:focus {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.5);
}

.btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Checkbox button - for alert toggles */
.btn-checkbox {
  border-radius: 0.25rem;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--primary));
  transition: all 0.2s;
  cursor: pointer;
  accent-color: hsl(var(--primary));
}

.btn-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.5);
}

.btn-checkbox:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Small button variant */
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Large button variant */
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* ========== END SHARED BUTTON CLASSES ========== */

/* Theme Icon Visibility - Show only the icon for the current theme */
/* Theme Icon Visibility - Show only the icon for the current theme */
[data-theme-button] .theme-icon {
  display: none !important;
}

[data-theme-button][data-theme="dark"] .theme-icon-dark {
  display: block !important;
}

[data-theme-button][data-theme="light"] .theme-icon-light {
  display: block !important;
}

[data-theme-button][data-theme="field"] .theme-icon-field {
  display: block !important;
}

/* Fallback: if no theme is set, show dark icon */
[data-theme-button]:not([data-theme]) .theme-icon-dark,
[data-theme-button][data-theme=""] .theme-icon-dark {
  display: block !important;
}
