/* ICAW Radar - Broadcast Theme CSS */
/* Optimized for 1920x1080 OBS browser source */

:root {
  /* Color scheme */
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #707070;
  --accent-blue: #00aaff;
  --accent-green: #00ff88;
  --border-color: #2a2a2a;

  /* Alert colors */
  --alert-tornado: #ff0000;
  --alert-severe: #ffa500;
  --alert-flood: #00ff00;
  --alert-winter: #ff69b4;

  /* Typography */
  --font-display: "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-body: "Roboto", Arial, sans-serif;
  --font-mono: "Roboto Mono", monospace;

  /* Layout */
  --sidebar-width: 180px;
  --ticker-height: 80px;
  --header-height: 0px;
}

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

html,
body {
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main layout grid */
.broadcast-layout {
  display: grid;
  width: 1920px;
  height: 1080px;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: 1fr var(--ticker-height);
  grid-template-areas:
    "sidebar radar"
    "sidebar ticker";
}

/* Sidebar */
.sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
}

/* Branding area */
.branding {
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.branding .logo {
  max-width: 140px;
  max-height: 80px;
  margin-bottom: 8px;
}

.branding .logo-placeholder {
  width: 140px;
  height: 80px;
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.branding .station-id {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: 2px;
}

.branding .station-name {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Current conditions */
.conditions {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.temperature-display {
  text-align: center;
}

.temperature-value {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.temperature-unit {
  font-size: 32px;
  color: var(--text-secondary);
}

.feels-like {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.weather-icon {
  text-align: center;
  padding: 8px 0;
  transition: opacity 0.3s ease;
}

.weather-icon svg,
.weather-icon img {
  width: 64px;
  height: 64px;
}

.conditions-text {
  font-size: 14px;
  text-align: center;
  color: var(--text-secondary);
  transition: opacity 0.3s ease;
}

.weather-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weather-detail {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.weather-detail .label {
  color: var(--text-secondary);
}

.weather-detail .value {
  color: var(--text-primary);
  font-weight: 500;
  transition: opacity 0.3s ease;
}

/* Clock */
.clock {
  padding: 16px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

.clock-time {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.clock-date {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Radar map container */
.radar-container {
  grid-area: radar;
  position: relative;
  background: var(--bg-primary);
}

.radar-map {
  width: 100%;
  height: 100%;
}

/* Layer Loading Overlay */
.layer-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 150;
  animation: layer-loading-fade-in 0.2s ease-out;
}

@keyframes layer-loading-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.layer-loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: layer-spin 0.8s linear infinite;
}

@keyframes layer-spin {
  to {
    transform: rotate(360deg);
  }
}

.layer-loading-text {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Radar timestamp overlay */
.radar-timestamp {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.75);
  padding: 8px 16px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
  z-index: 100;
}

/* Radar legend */
.radar-legend {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.75);
  padding: 8px;
  border-radius: 4px;
  z-index: 100;
}

.radar-legend-title {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-align: center;
}

.radar-legend-bar {
  display: flex;
  height: 12px;
  border-radius: 2px;
  overflow: hidden;
}

.radar-legend-color {
  flex: 1;
  min-width: 16px;
}

.radar-legend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Alert ticker */
.alert-ticker {
  grid-area: ticker;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.ticker-label {
  background: var(--alert-severe);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.ticker-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.ticker-scroll {
  display: flex;
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  padding: 0 48px;
  font-size: 18px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ticker-item .alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ticker-empty {
  padding: 0 24px;
  font-size: 16px;
  color: var(--text-secondary);
}

/* Alert overlay for severe weather */
.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: pulse-bg 2s ease-in-out infinite;
}

.alert-overlay-content {
  text-align: center;
  max-width: 1200px;
  padding: 48px;
}

.alert-overlay-icon {
  font-size: 120px;
  margin-bottom: 24px;
}

.alert-overlay-event {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: pulse-text 1s ease-in-out infinite;
}

.alert-overlay-headline {
  font-size: 32px;
  margin-bottom: 24px;
  line-height: 1.3;
}

.alert-overlay-area {
  font-size: 24px;
  color: var(--text-secondary);
}

@keyframes pulse-bg {
  0%,
  100% {
    background: rgba(0, 0, 0, 0.9);
  }
  50% {
    background: rgba(40, 0, 0, 0.9);
  }
}

@keyframes pulse-text {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Overlay mode (transparent background) */
.overlay-mode {
  background: transparent !important;
}

.overlay-mode .broadcast-layout {
  background: transparent;
}

.overlay-mode .sidebar {
  background: rgba(20, 20, 20, 0.85);
}

.overlay-mode .alert-ticker {
  background: rgba(20, 20, 20, 0.85);
}

.overlay-mode .radar-container {
  background: transparent;
}

/* Loading states */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error states */
.error {
  color: var(--alert-severe);
  font-size: 14px;
  text-align: center;
  padding: 16px;
}

/* Hardware acceleration hints */
.radar-map,
.ticker-scroll,
.alert-overlay {
  will-change: transform;
  transform: translateZ(0);
}

/* NewsTicker JS implementation styles */
.ticker-track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
}

.separator {
  color: var(--accent-blue);
  margin-left: 12px;
  opacity: 0.7;
  font-weight: 300;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: red;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 2s infinite;
  display: inline-block;
}

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

/* City Forecast List */
.city-forecast-list {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  flex: 1; /* Take up remaining space in sidebar */
  overflow-y: auto;
}

.city-list-header {
  font-family: var(--font-display);
  color: var(--accent-blue);
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.city-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.city-name {
  font-size: 13px;
  color: var(--text-secondary);
}

.city-temp {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
  margin-left: auto; /* Push to right */
  margin-right: 8px;
}

.city-icon {
  width: 24px;
  height: 24px;
}

/* Clickable city rows */
.city-item {
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
  border-radius: 4px;
  padding: 8px 6px;
  margin: 0 -6px;
}

.city-item:hover {
  background: rgba(0, 170, 255, 0.1);
}

.city-item.selected {
  background: rgba(0, 170, 255, 0.2);
  border-left: 3px solid var(--accent-blue);
  padding-left: 9px;
}

/* City Hourly Slide-out Panel */
.city-hourly-panel {
  position: fixed;
  top: 0;
  left: var(--sidebar-width); /* Align with sidebar edge */
  width: 380px;
  height: calc(100vh - var(--ticker-height)); /* Account for ticker bar */
  max-height: calc(100vh - var(--ticker-height));
  background: rgba(10, 15, 25, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  z-index: 200;
  transform: translateX(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              visibility 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.city-hourly-panel.open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

.city-hourly-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.city-hourly-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.city-hourly-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.city-hourly-close:hover {
  background: rgba(255, 68, 68, 0.3);
  border-color: rgba(255, 68, 68, 0.5);
  color: #ff6666;
}

.city-hourly-loading {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.city-hourly-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
}

.city-hourly-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.15s ease;
}

.city-hourly-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.city-hourly-item.now {
  background: linear-gradient(90deg, rgba(0, 170, 255, 0.15), transparent);
  border-left: 3px solid var(--accent-blue);
}

.city-hourly-time {
  width: 60px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

.city-hourly-item.now .city-hourly-time {
  color: var(--accent-blue);
  font-weight: 700;
}

.city-hourly-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.city-hourly-temp {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  width: 50px;
}

.city-hourly-precip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--accent-blue);
  margin-left: auto;
}

.city-hourly-precip .drop {
  font-size: 10px;
}

/* Day separator in hourly panel */
.city-hourly-day-separator {
  padding: 10px 20px;
  background: linear-gradient(90deg, rgba(0, 170, 255, 0.15), transparent);
  border-top: 1px solid rgba(0, 170, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.city-hourly-day-separator::before {
  content: "☀";
  font-size: 12px;
}

.city-hourly-day-separator.tomorrow::before {
  content: "→";
}

/* ========================================
   Glass Morphism & Enhanced UI Styles
   ======================================== */

/* Glass morphism for controls */
.radar-timestamp,
.radar-legend,
.layer-control {
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* LIVE indicator pulse animation */
.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-indicator .live-dot {
  width: 10px;
  height: 10px;
  background: #00ff88;
  border-radius: 50%;
  animation: live-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px #00ff88;
}

.live-indicator .live-text {
  color: #00ff88;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes live-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}

/* Animation controls styling */
.animation-controls {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 300px; /* Clearance for reflectivity legend (16 colors x 16px + padding + legend position) */
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 100;
}

.animation-controls button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
}

.animation-controls button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.animation-controls button.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.timeline-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-bar {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
}

.timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.timeline-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}

.timeline-handle:hover {
  transform: translate(-50%, -50%) scale(1.2);
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.speed-control button {
  width: auto;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
}

.speed-control button.active {
  background: var(--accent-blue);
}

/* Zoom controls styling */
.zoom-controls {
  position: absolute;
  bottom: 100px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
}

.zoom-controls button {
  width: 36px;
  height: 36px;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.zoom-controls button:hover {
  background: rgba(40, 40, 40, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Data freshness indicator */
.data-freshness {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.data-freshness.fresh {
  color: var(--accent-green);
}

.data-freshness.stale {
  color: var(--alert-severe);
  animation: pulse-text 1s ease-in-out infinite;
}

.refresh-pulse {
  animation: refresh-flash 0.5s ease-out;
}

@keyframes refresh-flash {
  0% {
    opacity: 1;
    background: rgba(0, 255, 136, 0.3);
  }
  100% {
    opacity: 1;
    background: transparent;
  }
}

/* Number transition animations */
.temperature-value,
.city-temp {
  transition: transform 0.3s ease, color 0.3s ease;
}

.value-updating {
  animation: value-update 0.4s ease-out;
}

@keyframes value-update {
  0% {
    transform: scale(1.1);
    color: var(--accent-green);
  }
  100% {
    transform: scale(1);
  }
}

/* Range rings styling */
.range-ring-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Warning polygon pulse animation */
@keyframes warning-pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.3;
  }
}

/* ========================================
   Sun/Moon Widget Styles
   ======================================== */

.sun-moon-widget {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: linear-gradient(
    180deg,
    var(--bg-tertiary) 0%,
    rgba(30, 30, 30, 0.95) 100%
  );
}

.sun-moon-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
}

/* Sun Arc Container */
.sun-arc {
  margin-bottom: 8px;
  padding: 0 4px;
}

.sun-arc-svg {
  width: 100%;
  height: 45px;
  overflow: visible;
}

.sun-marker-emoji {
  font-size: 8px;
}

/* Sun indicator animations */
.sun-indicator {
  animation: sun-glow 3s ease-in-out infinite;
}

.sun-outer-glow {
  animation: sun-pulse 2s ease-in-out infinite;
}

@keyframes sun-glow {
  0%, 100% {
    filter: url(#sunGlow) drop-shadow(0 0 4px #ffd700);
  }
  50% {
    filter: url(#sunGlow) drop-shadow(0 0 8px #ffd700);
  }
}

@keyframes sun-pulse {
  0%, 100% {
    r: 12;
    opacity: 0.3;
  }
  50% {
    r: 14;
    opacity: 0.2;
  }
}

/* Moon indicator for night mode */
.moon-indicator {
  filter: drop-shadow(0 0 4px rgba(200, 200, 220, 0.4));
  animation: moon-glow 4s ease-in-out infinite;
}

@keyframes moon-glow {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(200, 200, 220, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(200, 200, 220, 0.6));
  }
}

/* Sun Times Row */
.sun-times {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sun-time-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sun-time-item.sun-time-center {
  padding: 0 8px;
}

.sun-time-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sun-time-value {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-primary);
  font-weight: 500;
}

/* Moon Display */
.moon-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.moon-emoji {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 0 4px rgba(200, 200, 220, 0.3));
}

.moon-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 3px;
}

.moon-phase-name {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.moon-illum-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.moon-illum-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(180, 180, 200, 0.6),
    rgba(220, 220, 240, 0.8)
  );
  border-radius: 2px;
  transition: width 0.5s ease;
}

.moon-illum-text {
  font-size: 9px;
  color: var(--text-muted);
}

/* ========================================
   Mini Map (Picture-in-Picture Regional View)
   ======================================== */

.mini-map-container {
  position: absolute;
  bottom: 180px;
  right: 16px;
  width: 200px;
  height: 150px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.mini-map-header {
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-map-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.mini-map-close:hover {
  opacity: 1;
  color: #fff;
}

.mini-map {
  width: 100%;
  height: calc(100% - 24px);
}

/* Toggle button for mini-map */
.mini-map-toggle {
  position: absolute;
  bottom: 180px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  color: #fff;
  z-index: 99;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-map-toggle:hover {
  background: rgba(40, 40, 40, 0.8);
}

.mini-map-toggle.active {
  border-color: var(--accent-blue);
}

/* ========================================
   Hourly Forecast Strip
   ======================================== */

.hourly-forecast {
  position: absolute;
  bottom: 0; /* At bottom of radar container */
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.7) 70%,
    transparent 100%
  );
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: 8px 16px;
}

.hourly-header {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hourly-title {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-display);
}

.hourly-loading {
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hourly-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hourly-scroll::-webkit-scrollbar {
  display: none;
}

.hour-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.hour-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.hour-item.now {
  background: rgba(0, 170, 255, 0.2);
  border: 1px solid var(--accent-blue);
  box-shadow: 0 0 12px rgba(0, 170, 255, 0.3);
}

.hour-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-family: var(--font-mono);
}

.hour-item.now .hour-time {
  color: var(--accent-blue);
  font-weight: 700;
}

.hour-icon {
  font-size: 24px;
  margin-bottom: 4px;
  line-height: 1;
}

.hour-temp {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.hour-precip {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: var(--accent-blue);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.hour-precip .drop {
  font-size: 8px;
}

/* Overlay mode adjustments */
.overlay-mode .hourly-forecast {
  background: linear-gradient(
    to top,
    rgba(20, 20, 20, 0.85) 0%,
    rgba(20, 20, 20, 0.6) 70%,
    transparent 100%
  );
}

/* ========================================
   Velocity Legend Styles
   ======================================== */

.velocity-legend .velocity-legend-bar {
  display: flex;
  height: 12px;
  border-radius: 2px;
  overflow: hidden;
}

.velocity-legend .radar-legend-title {
  font-size: 10px;
}

.velocity-legend .velocity-legend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}

.velocity-legend .velocity-note {
  font-size: 8px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
  font-style: italic;
  max-width: 140px;
  line-height: 1.3;
}

/* ========================================
   Audio Toggle Control
   ======================================== */

.audio-toggle {
  position: absolute;
  top: 16px;
  right: 180px;
  width: 36px;
  height: 36px;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.audio-toggle:hover {
  background: rgba(40, 40, 40, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.audio-toggle:active {
  transform: scale(0.95);
}

.audio-toggle.enabled {
  border-color: var(--accent-green);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

.audio-toggle.enabled:hover {
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.5);
}

/* Visual feedback when alert sound plays */
@keyframes alert-sound-flash {
  0%, 100% {
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
  }
  25%, 75% {
    box-shadow: 0 0 24px rgba(255, 0, 0, 0.6);
    border-color: rgba(255, 0, 0, 0.8);
  }
  50% {
    box-shadow: 0 0 32px rgba(255, 0, 0, 0.8);
    border-color: #ff0000;
  }
}

.audio-toggle.alert-playing {
  animation: alert-sound-flash 0.5s ease-in-out 3;
}

/* Audio alert visual indicator on overlay */
.alert-overlay.audio-active::after {
  content: "\1F50A";
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 32px;
  animation: sound-wave 0.5s ease-in-out infinite;
}

@keyframes sound-wave {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

/* ========================================
   Storm Reports Overlay Styles
   ======================================== */

/* Storm report markers on map */
.storm-report-marker {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.storm-report-marker:hover {
  transform: scale(1.3);
}

/* Popup container */
.storm-report-popup {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 220px;
  max-width: 300px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.storm-report-popup .popup-arrow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(10, 10, 10, 0.95);
}

.storm-report-popup .popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s ease;
}

.storm-report-popup .popup-close:hover {
  color: #fff;
}

/* Report header with icon and type */
.storm-report-popup .report-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
  border-left: 3px solid;
  margin-bottom: 8px;
}

.storm-report-popup .report-icon {
  font-size: 20px;
}

.storm-report-popup .report-type {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.storm-report-popup .report-recent-badge {
  background: #ff0000;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: auto;
  animation: badge-pulse 1.5s ease-in-out infinite;
}

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

/* Report time */
.storm-report-popup .report-time {
  font-size: 11px;
  color: #888;
  margin-bottom: 6px;
}

/* Report magnitude (hail size, wind speed, etc.) */
.storm-report-popup .report-magnitude {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

/* Report location */
.storm-report-popup .report-location {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 6px;
}

/* Report details/remarks */
.storm-report-popup .report-details {
  font-size: 12px;
  color: #ccc;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1.4;
}

/* Recent report pulsing animation */
.report-recent {
  animation: report-pulse 2s ease-in-out infinite;
}

@keyframes report-pulse {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 0 rgba(255, 0, 0, 0.4);
  }
  50% {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(255, 0, 0, 0.2);
  }
}

/* Storm reports badge in layer control */
.storm-reports-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  margin-left: 6px;
}

/* Layer control button for storm reports */
.layer-control .storm-reports-btn {
  position: relative;
}

.layer-control .storm-reports-btn.has-reports::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #ff4444;
  border-radius: 50%;
  animation: badge-pulse 1.5s ease-in-out infinite;
}

/* ========================================
   Lightning Overlay Styles
   ======================================== */

/* Lightning flash animation for new strikes */
.lightning-flash {
  animation: lightning-strike 3s ease-out forwards;
}

@keyframes lightning-strike {
  0% {
    opacity: 1;
    transform: scale(1.5);
  }
  10% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.5);
  }
}

/* Lightning count badge */
.lightning-count {
  position: absolute;
  top: 60px;
  right: 16px;
  background: rgba(255, 215, 0, 0.9);
  color: #000;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: lightning-badge-pulse 2s ease-in-out infinite;
}

.lightning-count .bolt {
  font-size: 14px;
  animation: bolt-flash 1.5s ease-in-out infinite;
}

@keyframes lightning-badge-pulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
  }
  50% {
    box-shadow: 0 2px 16px rgba(255, 215, 0, 0.7);
  }
}

@keyframes bolt-flash {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 4px rgba(255, 255, 0, 0.8);
  }
  50% {
    opacity: 0.7;
    text-shadow: 0 0 8px rgba(255, 255, 0, 1);
  }
}

/* Lightning strike marker on map (fallback for non-GL rendering) */
.lightning-marker {
  position: absolute;
  width: 16px;
  height: 16px;
  background: radial-gradient(circle, #ffffff 0%, #ffff00 40%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: strike-appear 0.3s ease-out, strike-fade 3s ease-out 0.3s forwards;
}

@keyframes strike-appear {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

@keyframes strike-fade {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Lightning intensity variations */
.lightning-marker.intensity-1 {
  width: 10px;
  height: 10px;
}

.lightning-marker.intensity-2 {
  width: 12px;
  height: 12px;
}

.lightning-marker.intensity-3 {
  width: 14px;
  height: 14px;
}

.lightning-marker.intensity-4 {
  width: 18px;
  height: 18px;
}

.lightning-marker.intensity-5 {
  width: 22px;
  height: 22px;
  background: radial-gradient(
    circle,
    #ffffff 0%,
    #fffacd 30%,
    #ffff00 50%,
    transparent 70%
  );
}

/* ========================================
   Wind Particle Field Overlay
   ======================================== */

.wind-field-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  opacity: 0.85;
  mix-blend-mode: screen;
  will-change: contents;
  transform: translateZ(0);
}

/* Wind speed legend (optional - can be added as a component) */
.wind-legend {
  position: absolute;
  bottom: 80px;
  left: 16px;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 100;
}

.wind-legend-title {
  font-size: 10px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wind-legend-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  width: 120px;
}

.wind-legend-bar > div {
  flex: 1;
}

.wind-legend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Wind speed color scale classes */
.wind-color-calm {
  background: rgba(98, 113, 183, 1);
}
.wind-color-light {
  background: rgba(57, 97, 159, 1);
}
.wind-color-gentle {
  background: rgba(74, 148, 169, 1);
}
.wind-color-moderate {
  background: rgba(77, 167, 91, 1);
}
.wind-color-fresh {
  background: rgba(163, 192, 63, 1);
}
.wind-color-strong {
  background: rgba(247, 215, 50, 1);
}
.wind-color-high {
  background: rgba(246, 126, 36, 1);
}
.wind-color-gale {
  background: rgba(234, 51, 35, 1);
}
.wind-color-storm {
  background: rgba(190, 30, 98, 1);
}

/* Wind indicator when enabled */
.wind-active-indicator {
  position: absolute;
  top: 60px;
  left: 16px;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(74, 148, 169, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
}

.wind-active-indicator .wind-icon {
  animation: wind-flow 2s linear infinite;
}

@keyframes wind-flow {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(3px);
  }
  100% {
    transform: translateX(0);
  }
}

/* ========================================
   Day/Night Theme Transition System
   ======================================== */

/* Enable smooth transitions for all themed elements */
html,
body {
  transition: var(--theme-transition, none);
}

.sidebar,
.alert-ticker,
.radar-container,
.conditions,
.clock,
.city-forecast-list,
.branding,
.sun-moon-widget {
  transition:
    background-color 0.5s ease,
    border-color 0.5s ease,
    color 0.5s ease;
}

/* Smooth color transitions for all themed text elements */
.temperature-value,
.conditions-text,
.weather-detail,
.weather-detail .label,
.weather-detail .value,
.clock-time,
.clock-date,
.city-name,
.city-temp,
.station-id,
.station-name,
.feels-like,
.radar-timestamp,
.ticker-item,
.ticker-empty,
.hourly-title,
.hour-time,
.hour-temp {
  transition: color 0.5s ease;
}

/* Transition for overlay elements */
.radar-timestamp,
.radar-legend,
.layer-control,
.animation-controls,
.zoom-controls button,
.audio-toggle,
.mini-map-container {
  transition:
    background-color 0.5s ease,
    border-color 0.5s ease,
    box-shadow 0.5s ease;
}

/* ========================================
   Golden Hour Theme Overrides
   ======================================== */

.theme-golden .station-id {
  color: var(--accent-blue); /* Uses golden accent (orange) */
}

.theme-golden .city-list-header {
  color: var(--accent-blue);
}

.theme-golden .radar-timestamp {
  background: rgba(30, 20, 10, 0.7);
  border-color: rgba(255, 200, 100, 0.2);
}

.theme-golden .live-dot,
.theme-golden .live-indicator .live-dot {
  background: #ffcc44;
  box-shadow: 0 0 8px #ffcc44;
}

.theme-golden .live-text,
.theme-golden .live-indicator .live-text {
  color: #ffcc44;
}

.theme-golden .timeline-progress {
  background: linear-gradient(90deg, #ffaa00, #ffcc44);
}

.theme-golden .animation-controls button.active,
.theme-golden .speed-control button.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.theme-golden .hour-item.now {
  background: rgba(255, 170, 0, 0.2);
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(255, 170, 0, 0.3);
}

.theme-golden .hour-item.now .hour-time {
  color: var(--accent-blue);
}

.theme-golden .hour-precip {
  color: var(--accent-blue);
}

/* Warm glow effect for golden hour */
.theme-golden .radar-container {
  box-shadow: inset 0 0 100px rgba(255, 170, 0, 0.05);
}

.theme-golden .separator {
  color: var(--accent-blue);
}

/* Golden hour sun widget adjustments */
.theme-golden .sun-moon-widget {
  background: linear-gradient(
    180deg,
    var(--bg-tertiary) 0%,
    rgba(45, 36, 26, 0.95) 100%
  );
}

/* ========================================
   Day Theme Overrides
   ======================================== */

.theme-day .radar-legend,
.theme-day .layer-control,
.theme-day .animation-controls,
.theme-day .radar-timestamp {
  background: rgba(26, 26, 46, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.theme-day .zoom-controls button,
.theme-day .audio-toggle {
  background: rgba(26, 26, 46, 0.7);
}

.theme-day .sidebar {
  background: var(--bg-secondary);
}

.theme-day .clock,
.theme-day .city-forecast-list,
.theme-day .sun-moon-widget {
  background: var(--bg-tertiary);
}

/* Slightly brighter text during day */
.theme-day .weather-detail .label {
  color: var(--text-secondary);
}

/* Day theme sun widget styling */
.theme-day .sun-moon-widget {
  background: linear-gradient(
    180deg,
    var(--bg-tertiary) 0%,
    rgba(31, 43, 77, 0.95) 100%
  );
}

/* ========================================
   Night Theme Overrides (Default)
   ======================================== */

.theme-night .radar-container {
  background: var(--bg-primary);
}

.theme-night .sidebar {
  background: var(--bg-secondary);
}

/* Subtle blue glow for night mode accents */
.theme-night .live-dot,
.theme-night .live-indicator .live-dot {
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
}

/* Night theme emphasizes moon in sun widget */
.theme-night .moon-emoji {
  filter: drop-shadow(0 0 6px rgba(200, 200, 220, 0.5));
}

/* ========================================
   Theme Indicator (Optional Display)
   ======================================== */

.theme-indicator {
  position: fixed;
  top: 8px;
  left: 8px;
  font-size: 18px;
  z-index: 9999;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: default;
  user-select: none;
}

.theme-indicator:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* ========================================
   Feature Toggles Panel
   ======================================== */

.feature-toggles {
  position: absolute;
  top: 60px;
  left: 16px;
  z-index: 100;
}

.feature-toggles-btn {
  width: 36px;
  height: 36px;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  color: #fff;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-toggles-btn:hover {
  background: rgba(40, 40, 40, 0.8);
}

.feature-toggles.expanded .feature-toggles-btn {
  border-color: var(--accent-blue);
}

.feature-toggles-panel {
  position: absolute;
  top: 44px;
  left: 0;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
  min-width: 160px;
  animation: fadeInDown 0.2s ease;
}

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

.feature-toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.feature-toggle-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.feature-toggle-item input[type="checkbox"] {
  accent-color: var(--accent-blue);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.feature-toggle-item .icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.feature-toggle-item .label {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-body);
}

/* ========================================
   Lightning Count Badge
   ======================================== */

.lightning-count {
  position: absolute;
  top: 60px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 0, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 0, 0.4);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  z-index: 100;
  animation: lightningPulse 2s ease-in-out infinite;
}

.lightning-count .bolt {
  font-size: 14px;
  animation: boltFlash 1.5s ease-in-out infinite;
}

@keyframes lightningPulse {
  0%, 100% {
    background: rgba(255, 255, 0, 0.15);
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.2);
  }
  50% {
    background: rgba(255, 255, 0, 0.25);
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.4);
  }
}

@keyframes boltFlash {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* ========================================
   Storm Reports Popup
   ======================================== */

.storm-report-popup {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px;
  min-width: 200px;
  max-width: 280px;
  font-size: 12px;
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.storm-report-popup .popup-arrow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: rgba(10, 10, 10, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  transform: translateX(-50%) rotate(45deg);
}

.storm-report-popup .report-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  border-left: 3px solid;
  margin-bottom: 8px;
}

.storm-report-popup .report-icon {
  font-size: 16px;
}

.storm-report-popup .report-type {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.storm-report-popup .report-recent-badge {
  background: var(--alert-tornado);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  animation: recentPulse 1.5s ease-in-out infinite;
}

@keyframes recentPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.storm-report-popup .report-time {
  color: var(--text-secondary);
  font-size: 11px;
  margin-bottom: 4px;
}

.storm-report-popup .report-magnitude {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.storm-report-popup .report-location {
  color: var(--text-secondary);
  font-size: 11px;
  margin-bottom: 4px;
}

.storm-report-popup .report-details {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.4;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.storm-report-popup .popup-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: color 0.2s ease;
}

.storm-report-popup .popup-close:hover {
  color: var(--text-primary);
}

.storm-reports-badge {
  background: var(--alert-tornado);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
  margin-left: 4px;
}
