/* Premium Dark Mode Aesthetics with Warm Orange Harmonious Blend */
:root {
  --brand-orange: #ff6600;
  --brand-orange-light: #fb923c;
  --brand-orange-dark: #c2410c;
  --brand-amber: #f59e0b;
  --neon-green: #10b981;
  --bg-dark: #0b0d13;
  --glass-card-bg: rgba(18, 23, 37, 0.94);
  --glass-card-border: rgba(249, 115, 22, 0.22);
  --glass-card-border-hover: rgba(249, 115, 22, 0.6);
  --spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --spring-smooth: cubic-bezier(0.34, 1.35, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  overflow-x: clip;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-orange) #0b0d13;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-orange) #0b0d13;
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.08) 0%, transparent 60%);
  color: #f1f5f9;
  position: relative;
  overflow-x: clip;
  min-height: 100vh;
}

/* Legibility floor for micro-text classes */
[class*="text-[8px]"],
[class*="text-[9px]"],
[class*="text-[10px]"],
[class*="text-[10.5px]"] {
  font-size: 12px !important;
  line-height: 1.25rem !important;
}

[class*="text-[11px]"] {
  font-size: 12.5px !important;
  line-height: 1.3rem !important;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0b0d13;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
  border-radius: 4px;
}

code {
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 0.35rem;
  font-size: 0.85em;
  color: #fed7aa;
}

a {
  color: inherit;
  transition: all 0.2s ease-in-out;
}

/* Glassmorphism Utilities with Guaranteed Contrast & Warm Accents */
.glass-panel {
  background: rgba(16, 21, 34, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-card-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.55), 0 0 15px -3px rgba(249, 115, 22, 0.08);
  border-radius: 12px;
}

.glass-card {
  background: var(--glass-card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-card-border);
  border-radius: 12px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5), 0 0 12px -2px rgba(249, 115, 22, 0.06);
  transition: transform 0.38s cubic-bezier(0.34, 1.35, 0.64, 1),
              border-color 0.25s ease,
              box-shadow 0.35s ease;
  will-change: transform;
}

.glass-card:hover {
  transform: translateY(-4px) scale(1.012);
  border-color: var(--glass-card-border-hover);
  box-shadow: 0 14px 34px -5px rgba(0, 0, 0, 0.75), 0 0 25px -2px rgba(249, 115, 22, 0.32);
}

.glass-card:active {
  transform: translateY(-1px) scale(0.988);
  transition-duration: 0.12s;
}

/* Tactile Spring Buttons */
button, input[type="button"], input[type="submit"], .btn-spring, a.btn-spring {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease,
              background-color 0.2s ease,
              border-color 0.2s ease,
              opacity 0.2s ease;
  touch-action: manipulation;
}

button:hover, input[type="button"]:hover, input[type="submit"]:hover, .btn-spring:hover {
  transform: translateY(-1px) scale(1.02);
}

button:active, input[type="button"]:active, input[type="submit"]:active, .btn-spring:active {
  transform: translateY(1px) scale(0.95);
  transition-duration: 0.1s;
}

/* High-contrast form controls with comfortable tap typography */
select, input[type="text"], input[type="search"], input[type="email"] {
  background-color: #0f1422 !important;
  color: #f1f5f9 !important;
  border-color: rgba(249, 115, 22, 0.3) !important;
  font-size: 14px;
}

select:focus, input[type="text"]:focus, input[type="search"]:focus, input[type="email"]:focus {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.35) !important;
  outline: none !important;
}

select option {
  background-color: #101524;
  color: #f1f5f9;
}

/* Micro-animations */
.animate-glow {
  animation: glow 2.5s infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 0 0 10px rgba(249, 115, 22, 0.25), 0 0 20px rgba(245, 158, 11, 0.2);
  }
  to {
    text-shadow: 0 0 15px rgba(249, 115, 22, 0.7), 0 0 30px rgba(245, 158, 11, 0.5);
  }
}

table td, table th { vertical-align: middle; }

/* Ambient Living Canvas (Motion-driven breathing atmosphere) */
body::before {
  content: "";
  position: fixed;
  top: -40%;
  left: -40%;
  width: 180%;
  height: 180%;
  background: radial-gradient(circle at 50% 15%, rgba(249, 115, 22, 0.08) 0%, rgba(245, 158, 11, 0.03) 30%, transparent 65%);
  pointer-events: none;
  z-index: -1;
  animation: aurora-shift 22s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  bottom: -35%;
  right: -35%;
  width: 170%;
  height: 170%;
  background: radial-gradient(circle at 75% 75%, rgba(245, 158, 11, 0.06) 0%, rgba(234, 88, 12, 0.02) 35%, transparent 65%);
  pointer-events: none;
  z-index: -1;
  animation: aurora-shift-reverse 26s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

@keyframes aurora-shift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(2.5%, 2%) scale(1.03); }
  100% { transform: translate(-2%, 3.5%) scale(1.02); }
}

@keyframes aurora-shift-reverse {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(-3%, -2.5%) scale(1.04) rotate(1deg); }
  100% { transform: translate(2%, -3%) scale(0.98) rotate(-1deg); }
}

/* Page Entrance */
main {
  animation: page-entrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Global News Ticker Crawler */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: linear-gradient(90deg, #090c13 0%, #101626 50%, #090c13 100%);
  border-bottom: 1px solid rgba(249, 115, 22, 0.25);
  box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
}

.ticker-wrap::before, .ticker-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  z-index: 5;
  pointer-events: none;
}

.ticker-wrap::before {
  left: 0;
  background: linear-gradient(to right, #0b0d13 30%, transparent);
}

.ticker-wrap::after {
  right: 0;
  background: linear-gradient(to left, #0b0d13 30%, transparent);
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: ticker-marquee 110s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

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

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.25rem;
  font-size: 0.8125rem;
  color: #e2e8f0;
  transition: color 0.15s ease;
}

.ticker-item:hover {
  color: #fb923c;
}

/* Staggered Card Entrance with Spring Settle */
.fade-up-card {
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.34, 1.35, 0.64, 1);
  will-change: opacity, transform;
}

.fade-up-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Rank Podium Glowing Treatments (Continental Leaders) */
.rank-badge-1 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(217, 119, 6, 0.5) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.8) !important;
  box-shadow: 0 0 22px -2px rgba(245, 158, 11, 0.55), inset 0 0 15px rgba(251, 191, 36, 0.2) !important;
  color: #fef08a !important;
  animation: gold-podium-glow 3.5s ease-in-out infinite alternate;
}

@keyframes gold-podium-glow {
  0% {
    box-shadow: 0 0 18px -2px rgba(245, 158, 11, 0.45), inset 0 0 10px rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.65);
  }
  100% {
    box-shadow: 0 0 32px 3px rgba(245, 158, 11, 0.75), inset 0 0 20px rgba(251, 191, 36, 0.35);
    border-color: rgba(254, 240, 138, 0.95);
  }
}

.rank-badge-2 {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.22) 0%, rgba(100, 116, 139, 0.4) 100%) !important;
  border: 1px solid rgba(148, 163, 184, 0.7) !important;
  box-shadow: 0 0 14px -2px rgba(148, 163, 184, 0.4) !important;
  color: #f8fafc !important;
}

.rank-badge-3 {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.22) 0%, rgba(180, 83, 9, 0.4) 100%) !important;
  border: 1px solid rgba(217, 119, 6, 0.65) !important;
  box-shadow: 0 0 14px -2px rgba(217, 119, 6, 0.35) !important;
  color: #fed7aa !important;
}

/* ==========================================================================
   Flashes & Call-to-Attention System
   ========================================================================== */

/* Flash Sheen Beam: sweeping radiant light sheen */
.flash-sheen {
  position: relative;
  overflow: hidden;
}

.flash-sheen::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -80%;
  width: 35%;
  height: 220%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 20%,
    rgba(254, 215, 170, 0.45) 50%,
    rgba(255, 255, 255, 0.12) 75%,
    transparent 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  opacity: 0;
}

.flash-sheen:hover::after,
.flash-sheen-auto::after {
  animation: flash-sheen-sweep 5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes flash-sheen-sweep {
  0% {
    transform: translateX(-150%) rotate(25deg);
    opacity: 0;
  }
  6% {
    opacity: 1;
  }
  22% {
    transform: translateX(700%) rotate(25deg);
    opacity: 0;
  }
  100% {
    transform: translateX(700%) rotate(25deg);
    opacity: 0;
  }
}

/* Border Beam Effect: continuous electric energy trace */
.border-beam-container {
  position: relative;
}

.border-beam-container::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(
    115deg,
    rgba(249, 115, 22, 0.85) 0%,
    rgba(251, 191, 36, 0.95) 20%,
    rgba(249, 115, 22, 0.1) 40%,
    transparent 70%,
    rgba(249, 115, 22, 0.75) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: border-beam-rotate 8s linear infinite;
}

@keyframes border-beam-rotate {
  0% { filter: hue-rotate(0deg); opacity: 0.8; }
  50% { filter: hue-rotate(25deg); opacity: 1; }
  100% { filter: hue-rotate(0deg); opacity: 0.8; }
}

/* Call-to-Attention Flashing Badges */
.badge-flash-live {
  animation: badge-live-pulse 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes badge-live-pulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.3);
    border-color: rgba(244, 63, 94, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 18px 2px rgba(244, 63, 94, 0.85);
    border-color: rgba(251, 113, 133, 0.9);
    transform: scale(1.05);
  }
}

.badge-flash-amber {
  animation: badge-amber-pulse 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes badge-amber-pulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.35);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 16px 2px rgba(245, 158, 11, 0.75);
    border-color: rgba(251, 191, 36, 0.85);
    transform: scale(1.04);
  }
}

/* Multi-Ring Concentric Radar Beacon Pulse */
.pulse-live-beacon {
  position: relative;
  display: inline-block;
}

.pulse-live-beacon::before,
.pulse-live-beacon::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.8) 0%, rgba(225, 29, 72, 0.3) 50%, transparent 75%);
  pointer-events: none;
}

.pulse-live-beacon::before {
  animation: live-pulse-beacon 1.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.pulse-live-beacon::after {
  animation: live-pulse-beacon 1.8s cubic-bezier(0.16, 1, 0.3, 1) infinite 0.7s;
}

@keyframes live-pulse-beacon {
  0% { transform: scale(0.85); opacity: 0.95; }
  60% { transform: scale(2.2); opacity: 0.25; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* Counter Settle Pop Flash */
.counter-pop-flash {
  animation: counter-pop-flash-anim 0.7s cubic-bezier(0.34, 1.6, 0.64, 1) forwards;
}

@keyframes counter-pop-flash-anim {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  35% {
    transform: scale(1.15);
    filter: brightness(1.7) drop-shadow(0 0 14px rgba(251, 191, 36, 0.9));
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

/* Toast Notifications with Spring Pop */
.tvi-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #101524;
  border: 1px solid rgba(249, 115, 22, 0.5);
  color: #f8fafc;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.8), 0 0 20px -2px rgba(249, 115, 22, 0.45);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  transform: translateY(30px) scale(0.9);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  pointer-events: none;
}

.tvi-toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Horizontal Scroller */
.horizontal-scroller {
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(249, 115, 22, 0.35) transparent;
}
.horizontal-scroller::-webkit-scrollbar {
  height: 5px;
}
.horizontal-scroller::-webkit-scrollbar-thumb {
  background: rgba(249, 115, 22, 0.35);
  border-radius: 3px;
}

/* Live Equalizer Waveform - 5-Bar Enhanced with Natural Spring Frequencies */
.epg-waveform {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.epg-waveform-bar {
  width: 2.5px;
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  border-radius: 1px;
}
.epg-waveform-bar:nth-child(1) { height: 45%; animation: epg-wave 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate; animation-delay: 0.1s; }
.epg-waveform-bar:nth-child(2) { height: 95%; animation: epg-wave 0.55s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate; animation-delay: 0.25s; }
.epg-waveform-bar:nth-child(3) { height: 65%; animation: epg-wave 0.85s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate; animation-delay: 0.4s; }
.epg-waveform-bar:nth-child(4) { height: 100%; animation: epg-wave 0.65s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate; animation-delay: 0.15s; }
.epg-waveform-bar:nth-child(5) { height: 50%; animation: epg-wave 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate; animation-delay: 0.3s; }

@keyframes epg-wave {
  0% { transform: scaleY(0.25); }
  100% { transform: scaleY(1); }
}

/* Timeline Active Date Pill */
.date-tab-active {
  background: linear-gradient(135deg, #ea580c 0%, #d97706 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px -3px rgba(249, 115, 22, 0.6) !important;
  border-color: rgba(251, 191, 36, 0.8) !important;
}

/* Time Scrubber Active */
.scrubber-btn-active {
  background: rgba(249, 115, 22, 0.25) !important;
  color: #fbbf24 !important;
  border-color: rgba(249, 115, 22, 0.7) !important;
}

/* ==========================================================================
   Hero Carousel Smooth Directional Transitions & Stacking Stage
   ========================================================================== */
.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  position: relative;
  align-items: start;
  width: 100%;
}

.hero-panel {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.hero-panel.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  z-index: 2;
}

.hero-panel.exit-left {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transform: translateX(-24px);
  z-index: 1;
}

.hero-panel.exit-right {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transform: translateX(24px);
  z-index: 1;
}

.hero-panel.enter-left {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transform: translateX(-24px);
  z-index: 2;
}

.hero-panel.enter-right {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transform: translateX(24px);
  z-index: 2;
}

.hero-dot {
  touch-action: manipulation;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s ease,
              box-shadow 0.3s ease,
              transform 0.2s ease;
}

.hero-dot:hover {
  transform: scaleY(1.3);
}

.hero-nav-btn {
  touch-action: manipulation;
  transition: background-color 0.2s ease,
              border-color 0.2s ease,
              transform 0.15s ease,
              color 0.2s ease;
}

.hero-nav-btn:hover {
  transform: scale(1.08);
}

.hero-nav-btn:active {
  transform: scale(0.94);
}

/* Hero Slide Progress Line */
.hero-progress-track {
  width: 100%;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.08);
  position: absolute;
  bottom: 0;
  left: 0;
  overflow: hidden;
  border-radius: 0 0 12px 12px;
  z-index: 10;
}

.hero-progress-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #f97316 0%, #fbbf24 60%, #34d399 100%);
  transform-origin: left;
  transform: scaleX(0);
}

.hero-progress-bar.animate {
  animation: hero-progress-fill 8s linear forwards;
}

.hero-progress-bar.paused {
  animation-play-state: paused;
}

@keyframes hero-progress-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ==========================================================================
   Continental Broadcast Clock HUD
   ========================================================================== */
#broadcast-clock-hud {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.2rem 0.65rem;
  background: rgba(12, 16, 26, 0.9);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 9999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.clock-zone {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.clock-zone-label {
  color: #fb923c;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.625rem;
}

.clock-zone-time {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.clock-divider {
  color: rgba(249, 115, 22, 0.4);
  font-size: 0.6rem;
}

/* ==========================================================================
   Floating Live Telemetry HUD (Corner Uplink Pill)
   ========================================================================== */
#telemetry-hud {
  position: fixed;
  top: 84px;
  right: 20px;
  z-index: 45;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: rgba(13, 17, 29, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(249, 115, 22, 0.4);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8), 0 0 20px rgba(249, 115, 22, 0.18);
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  overflow: hidden;
}

#telemetry-hud.minimized {
  transform: translateY(calc(-100% + 38px));
}

#telemetry-hud.dismissed {
  opacity: 0;
  transform: translateY(-40px) scale(0.95);
  pointer-events: none;
}

.telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(10, 14, 24, 0.85);
  border-bottom: 1px solid rgba(249, 115, 22, 0.2);
  cursor: pointer;
  user-select: none;
}

.telemetry-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fed7aa;
}

.telemetry-body {
  padding: 10px 12px;
  font-size: 0.75rem;
  min-height: 52px;
  display: flex;
  align-items: center;
  position: relative;
}

.telemetry-event {
  width: 100%;
  animation: telemetry-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.telemetry-time {
  font-size: 0.65rem;
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: #94a3b8;
  margin-top: 2px;
}

/* ==========================================================================
   Docked Floating Live Audio / Radio Player
   ========================================================================== */
#floating-audio-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(12, 16, 26, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(249, 115, 22, 0.4);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.85);
  padding: 10px 16px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#floating-audio-dock.active {
  transform: translateY(0);
}

.audio-dock-inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.audio-station-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.audio-station-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: #090d16;
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 2px;
  flex-shrink: 0;
}

.audio-station-meta {
  min-width: 0;
}

.audio-station-name {
  font-weight: 800;
  font-size: 0.875rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-station-dial {
  font-size: 0.6875rem;
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 6px;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.audio-btn-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ea580c 0%, #d97706 100%);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.5);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.audio-btn-play:hover {
  transform: scale(1.08);
}

.audio-btn-play:active {
  transform: scale(0.94);
}

.audio-vol-slider {
  accent-color: #f97316;
  width: 72px;
  height: 4px;
  cursor: pointer;
}

/* ==========================================================================
   Interactive Sparkline Scrubber
   ========================================================================== */
.sparkline-wrap {
  position: relative;
  cursor: crosshair;
}

.sparkline-scrubber-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: rgba(251, 191, 36, 0.85);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 5;
}

.sparkline-scrubber-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #f59e0b;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 6;
}

.sparkline-tooltip {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: #0c101a;
  border: 1px solid rgba(251, 191, 36, 0.6);
  border-radius: 6px;
  padding: 3px 6px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fef08a;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

.sparkline-wrap:hover .sparkline-scrubber-line,
.sparkline-wrap:hover .sparkline-scrubber-dot,
.sparkline-wrap:hover .sparkline-tooltip {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-panel {
    transform: none !important;
    transition: opacity 0.15s ease !important;
  }
  .hero-dot {
    transition: width 0.15s ease, background-color 0.15s ease !important;
  }
  .fade-up-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .flash-sheen::after,
  .flash-sheen-auto::after,
  .border-beam-container::before,
  .hero-progress-bar.animate,
  .counter-pop-flash,
  .pulse-live-beacon::before,
  .pulse-live-beacon::after,
  .epg-waveform-bar {
    animation: none !important;
  }
  #telemetry-hud, #floating-audio-dock {
    transition: none !important;
  }
  body::before, body::after {
    animation: none !important;
  }
}

/* Sparkline Hover Scrubber & Tooltip */
.sparkline-wrap {
  position: relative;
  cursor: crosshair;
}
.sparkline-scrubber-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(249, 115, 22, 0.75);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}
.sparkline-scrubber-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  margin-top: -3px;
  border-radius: 9999px;
  background: #fbbf24;
  box-shadow: 0 0 8px #f59e0b;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 11;
}
.sparkline-tooltip {
  position: absolute;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  background: #0f1422;
  border: 1px solid rgba(249, 115, 22, 0.5);
  color: #fed7aa;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
  z-index: 12;
}

/* Keep navigation reachable and data tables contained on narrow screens. */
.consumer-nav > * { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 1023px) {
  .site-header, .broadcast-control-bar { position: static; }
}

/* ==========================================================================
   Mobile-Optimized Responsive Experience & Native App Patterns
   ========================================================================== */

/* Mobile Bottom Navigation Bar */
#mobile-bottom-nav {
  padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.75);
}

#mobile-bottom-nav a,
#mobile-bottom-nav button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#mobile-bottom-nav a.active-nav {
  position: relative;
}

#mobile-bottom-nav a.active-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 22%;
  right: 22%;
  height: 2.5px;
  background: #f97316;
  border-radius: 9999px;
  box-shadow: 0 0 10px #f97316;
}

/* Slide-out Navigation Drawer */
#mobile-drawer {
  will-change: transform;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-drawer.open {
  transform: translateX(0);
}

#mobile-drawer-backdrop {
  transition: opacity 0.28s ease;
}

#mobile-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile Media Queries (< 1024px) */
@media (max-width: 1023px) {
  /* Give page content room so nothing is covered by the fixed bottom nav */
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  /* Dock the live radio player right above the bottom nav */
  #floating-audio-dock {
    bottom: calc(54px + env(safe-area-inset-bottom, 0px));
    padding: 8px 12px;
    background: rgba(10, 14, 24, 0.98);
    border-top: 1px solid rgba(249, 115, 22, 0.35);
    border-bottom: 1px solid rgba(249, 115, 22, 0.15);
  }

  .audio-dock-inner {
    gap: 8px;
  }

  .audio-station-logo {
    width: 34px;
    height: 34px;
  }

  .audio-station-name {
    font-size: 13px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .audio-btn-play {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  /* Hero carousel touch optimizations */
  #hero-panel-container {
    touch-action: pan-y pinch-zoom;
    padding: 1.25rem 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-panel h1,
  .hero-panel h2 {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
  }

  /* Touch targets minimum 44px */
  .hero-nav-btn {
    width: 38px;
    height: 38px;
  }

  /* Compact broadcast control bar on mobile */
  .broadcast-control-bar {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  #broadcast-clock-hud {
    font-size: 11px;
  }
}

/* Small mobile screens (<= 480px) */
@media (max-width: 480px) {
  .hero-dot {
    width: 5px;
    height: 5px;
  }
  .hero-dot[aria-current="true"] {
    width: 18px;
  }
  .audio-station-dial {
    display: none;
  }
}
