/* ─────────────────────────────────────────────────────────── */
/* VoloPilot - Neo-Athletic Dark Mode CSS                      */
/* ─────────────────────────────────────────────────────────── */

html {
  height: 100%;
  overflow: hidden;
}

body {
  position: relative;
  background: #030712;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      circle at top left,
      rgba(98, 0, 238, 0.16),
      transparent 30%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(0, 230, 118, 0.1),
      transparent 28%
    );
  pointer-events: none;
  z-index: 0;
}
body > * {
  position: relative;
  z-index: 1;
}

/* SVG Path Animation – Hardware Accelerated */
@keyframes dashOffset {
  to {
    stroke-dashoffset: -20;
  }
}
.stroke-dash-animation {
  stroke-dasharray: 8, 4;
  animation: dashOffset 1s linear infinite;
  will-change: stroke-dashoffset;
  filter: drop-shadow(0 0 8px #00e676);
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
}
.stroke-dash-blue {
  stroke-dasharray: 5, 4;
  animation: dashOffset 1.5s linear infinite;
  will-change: stroke-dashoffset;
  filter: drop-shadow(0 0 5px #00b0ff);
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
}

/* Node pulse animation */
@keyframes nodePulse {
  0%,
  100% {
    opacity: 1;
    r: 8;
  }
  50% {
    opacity: 0.6;
    r: 11;
  }
}
.node-pulse {
  animation: nodePulse 2s ease-in-out infinite;
}

/* Waveform bars */
@keyframes waveAnim {
  0%,
  100% {
    transform: scaleY(0.25);
  }
  50% {
    transform: scaleY(1);
  }
}
.wave-bar {
  height: 24px;
  transform-origin: bottom;
  animation: waveAnim 0.9s ease-in-out infinite;
}

/* ────────── HEADER ────────── */
.header-glass {
  background: linear-gradient(
    135deg,
    rgba(9, 13, 22, 0.96),
    rgba(13, 19, 31, 0.86)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 10px 35px rgba(2, 6, 23, 0.28);
}

/* Logo orb */
.logo-orb {
  background: linear-gradient(135deg, #6200ee 0%, #00e676 100%);
  box-shadow: 0 0 18px rgba(98, 0, 238, 0.5);
}

/* Live badge */
.live-badge {
  background: rgba(255, 23, 68, 0.15);
  color: #ff1744;
  border: 1px solid rgba(255, 23, 68, 0.3);
  animation: liveFlicker 2s ease-in-out infinite;
}
@keyframes liveFlicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Stadium selector pill */
.select-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.select-pill select option {
  background: #0f172a;
  color: #f3f4f6;
}
.select-pill select optgroup {
  background: #0f172a;
  color: #a78bfa;
  font-weight: 600;
  font-style: normal;
}

/* Status dot pulse */
.status-dot-pulse {
  background: #00e676;
  box-shadow: 0 0 8px #00e676;
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,
  100% {
    box-shadow: 0 0 4px #00e676;
  }
  50% {
    box-shadow:
      0 0 12px #00e676,
      0 0 20px #00e676;
  }
}
.status-dot-pulse.offline {
  background: #ff1744;
  box-shadow: 0 0 8px #ff1744;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}
.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.hero-stat-pill,
.status-pill {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.input-surface {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.input-surface:focus {
  border-color: rgba(98, 0, 238, 0.45);
  box-shadow:
    0 0 0 1px rgba(98, 0, 238, 0.2),
    0 0 24px rgba(98, 0, 238, 0.14);
}

/* ────────── MAP PANEL ────────── */
.map-pill-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(9, 13, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d1d5db;
  padding: 0.45rem 0.75rem;
  border-radius: 20px;
  font-size: 11px;
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: all 0.2s ease;
}
.map-pill-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
.map-pill-btn select option {
  background: #0f172a;
}

.route-alert-pill {
  background: rgba(9, 13, 22, 0.92);
  border: 1px solid rgba(0, 230, 118, 0.25);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  display: flex;
  box-shadow: 0 8px 30px rgba(0, 230, 118, 0.12);
}
.route-icon-box {
  background: rgba(0, 230, 118, 0.1);
}

.map-legend-box {
  background: rgba(9, 13, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  backdrop-filter: blur(12px);
}
.glow-green-line {
  box-shadow: 0 0 6px #00e676;
}

/* ────────── RIGHT PANEL ────────── */
.volunteer-avatar {
  background: linear-gradient(135deg, #6200ee, #00b0ff);
  box-shadow: 0 0 12px rgba(98, 0, 238, 0.4);
}

.mic-process-btn {
  background: linear-gradient(135deg, #6200ee 0%, #00b0ff 100%);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(98, 0, 238, 0.28);
  transition: all 0.25s ease;
}
.mic-process-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(98, 0, 238, 0.42);
}
.mic-process-btn:active {
  transform: scale(0.98);
}
.btn-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: shimmer 2.5s infinite;
}
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

/* Translation Cards */
.translation-card-fan {
  background: linear-gradient(
    135deg,
    rgba(11, 15, 25, 0.92),
    rgba(11, 15, 25, 0.78)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.translation-card-ai {
  background: linear-gradient(
    135deg,
    rgba(98, 0, 238, 0.13),
    rgba(0, 176, 255, 0.08)
  );
  border: 1px solid rgba(98, 0, 238, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.ai-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at top right,
    rgba(0, 230, 118, 0.07),
    transparent 60%
  );
  pointer-events: none;
}

/* Language badge */
.lang-detection-badge {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

/* Audio play button */
.audio-play-btn {
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.2);
  color: #00e676;
  transition: 0.2s;
}
.audio-play-btn:hover {
  background: rgba(0, 230, 118, 0.2);
}

/* Action Steps */
.action-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(
    135deg,
    rgba(11, 15, 25, 0.9),
    rgba(11, 15, 25, 0.72)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.action-step-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}
.action-step-item.done {
  opacity: 0.5;
  border-color: rgba(0, 230, 118, 0.2);
}
.step-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: all 0.2s;
}
.step-checkbox.checked {
  background: #00e676;
  border-color: #00e676;
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.4);
}

/* ────────── JURY MODAL ────────── */
.jury-modal {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.jury-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Toggle Switches */
.toggle-switch {
  position: relative;
}
.toggle-track {
  width: 38px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}
.toggle-thumb {
  position: absolute;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
input:checked ~ .toggle-track {
  background: #6200ee;
}
input:checked ~ .toggle-track .toggle-thumb {
  transform: translateX(18px);
  box-shadow: 0 0 8px rgba(98, 0, 238, 0.5);
}

/* ────────── SCROLLBAR ────────── */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* ──────────────────────────────────────────────────────────── */
/* CHAMPIONSHIP NEO-ATHLETIC DESIGN SYSTEM                      */
/* ──────────────────────────────────────────────────────────── */

/* Sport-Discipline Dynamic Badge */
#sport-badge {
  transition:
    opacity 0.25s ease,
    border-color 0.4s ease,
    background 0.4s ease;
}
#sport-badge #sport-label {
  transition: color 0.4s ease;
}

/* Holographic doodle layer — hardware-accelerated fade */
#doodle-layer {
  pointer-events: none;
  transition: opacity 0.7s ease;
  will-change: opacity;
}

/* Kinetic corner doodle — subtle hover amplification */
#corner-doodle {
  transition: opacity 0.5s ease;
}
#corner-doodle:hover {
  opacity: 0.32 !important;
}

/* Playbook tactical SVG divider — pulsing gold glow */
@keyframes playbookGlow {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 0.55; }
}
.playbook-divider path {
  animation: playbookGlow 3s ease-in-out infinite;
}

/* Championship Gold glow-line utility (for legend swatch) */
.glow-gold-line {
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
}

/* Chalk Cyan glow filter for SVG elements */
.glow-chalk {
  filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.6));
}

svg text {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  fill: #f8fafc;
  filter: drop-shadow(0 1px 3px #020617) drop-shadow(0 1px 1px #020617);
  pointer-events: none;
}

circle:focus,
button:focus,
textarea:focus,
select:focus {
  outline: 2px solid #00e676;
  outline-offset: 2px;
}

/* The toggle switches use a visually-hidden (sr-only) checkbox paired with
   a styled sibling for the visible switch graphic. Focusing the checkbox
   alone produces no visible indicator, so keyboard users get no feedback
   at all. Redirect the outline onto the visible track instead. */
.toggle-switch input:focus-visible + .toggle-track {
  outline: 2px solid #00e676;
  outline-offset: 2px;
}

/* Torch-Orange sprint motion trail */
@keyframes torchTrail {
  0%   { stroke-dashoffset: 0; opacity: 0.8; }
  100% { stroke-dashoffset: -24; opacity: 0.3; }
}
.torch-trail {
  stroke-dasharray: 4 4;
  animation: torchTrail 1.2s linear infinite;
}

/* Enhanced scanline shimmer for the map panel backdrop */
@keyframes scanlineScroll {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100px; }
}
/* Safety floor: guarantees the SVG stadium map always has real screen
   space to render into, even if a future layout change or an
   unusually narrow viewport would otherwise squeeze its flex container
   toward 0. Without this, the viewBox stays "0 0 500 480" but the box
   it's painted into can shrink to nothing, which is what produced the
   "unexpected zoom" bug when generating a route on narrow screens. */
#map-container {
  min-width: 220px;
  min-height: 220px;
}

#map-container::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 245, 255, 0.012) 3px,
    rgba(0, 245, 255, 0.012) 4px
  );
  animation: scanlineScroll 8s linear infinite;
  z-index: 2;
}

