/* ==========================================================================
   UP Roadways - Deluxe Highway Music Experience
   Aesthetic Glassmorphism & Immersive Audio Player Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Yatra+One&family=Rozha+One&family=Tiro+Devanagari+Hindi:wght@400;700&display=swap');

:root {
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-hindi: 'Yatra One', 'Tiro Devanagari Hindi', cursive;

  /* Color Palette - Warm Highway Amber, Luxe Bronze & Deep Charcoal */
  --bg-dark: #0a0807;
  --glass-bg: rgba(26, 18, 14, 0.62);
  --glass-bg-hover: rgba(38, 26, 20, 0.75);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-border-highlight: rgba(255, 255, 255, 0.35);
  --glass-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  
  --accent-amber: #f59e0b;
  --accent-amber-light: #fbbf24;
  --accent-gold: #eab308;
  --accent-red: #dc2626;
  --accent-green: #10b981;

  --text-pure: #ffffff;
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-muted: rgba(255, 255, 255, 0.48);

  --radius-full: 9999px;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --------------------------------------------------------------------------
   Reset & Base Styles (No Scrolling, Fullscreen Viewport)
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: fixed;
  background-color: var(--bg-dark);
  font-family: var(--font-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
/* Accessible & SEO Semantic Utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Viewport Root Container */
.viewport-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}

.hero-background-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  background-image: url('assets/up_roadways_desktop.svg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: translateZ(0);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
}

/* Atmospheric overlays for visual depth and player legibility */
.atmosphere-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.4) 100%),
              linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 25%, transparent 55%, rgba(0, 0, 0, 0.7) 100%);
  z-index: 2;
}

.atmosphere-heat-haze {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.6;
  z-index: 3;
}

/* --------------------------------------------------------------------------
   Top Navigation HUD
   -------------------------------------------------------------------------- */
.top-hud {
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
  pointer-events: none;
}

.top-hud > * {
  pointer-events: auto;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.825rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.hud-pill:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-highlight);
  color: var(--text-pure);
  transform: translateY(-1px);
}

.hud-pill:active {
  transform: translateY(0) scale(0.97);
}

/* Left Status Badge */
.route-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
}

.route-tag {
  background: rgba(220, 38, 38, 0.3);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: #fca5a5;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.route-text {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.time-clock {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding-left: 0.4rem;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* Center Live Passenger Beacon */
.live-beacon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: default;
}

.beacon-pulse {
  position: relative;
  width: 9px;
  height: 9px;
}

.beacon-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pingBeacon 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.beacon-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

@keyframes pingBeacon {
  75%, 100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.passenger-count {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #86efac;
}

/* Right HUD Action Pills */
.hud-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hud-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
}

.hud-btn-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* --------------------------------------------------------------------------
   Grand Responsive Hindi Header Title (Top Center, Auto-scaling)
   -------------------------------------------------------------------------- */
.grand-hindi-banner {
  position: absolute;
  top: 4.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  text-align: center;
  pointer-events: none;
  width: 92%;
  max-width: 950px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hindi-main-title {
  font-family: 'Yatra One', 'Tiro Devanagari Hindi', 'Rozha One', cursive, sans-serif;
  font-size: clamp(2.4rem, 8vw, 5.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: #ffffff;
  text-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.4),
    0 8px 24px rgba(0, 0, 0, 0.75),
    0 16px 48px rgba(0, 0, 0, 0.9),
    0 0 50px rgba(245, 158, 11, 0.35);
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.6));
  white-space: nowrap;
}

@media (max-width: 768px) {
  .grand-hindi-banner {
    top: 4.4rem;
  }
  .hindi-main-title {
    font-size: clamp(2rem, 9.5vw, 4rem);
  }
}

@media (max-width: 480px) {
  .grand-hindi-banner {
    top: 4rem;
  }
  .hindi-main-title {
    font-size: clamp(1.75rem, 10.5vw, 2.8rem);
  }
}

/* --------------------------------------------------------------------------
   Floating Audio Player Bar (Core Glassmorphism Component)
   -------------------------------------------------------------------------- */
.player-container {
  position: fixed;
  bottom: 2.4rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  z-index: 40;
  transition: transform var(--transition-spring), opacity var(--transition-normal);
}

.player-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 104px;
  padding: 0.95rem 1.6rem 0.95rem 1.15rem;
  background: linear-gradient(90deg, rgba(68, 38, 30, 0.84) 0%, rgba(105, 45, 35, 0.86) 45%, rgba(58, 32, 25, 0.84) 100%);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--radius-full);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  transition: all var(--transition-normal);
  overflow: hidden;
}

.player-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 60%, rgba(255, 255, 255, 0.08) 100%);
  pointer-events: none;
}

.player-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-highlight);
  box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

/* Spinning Vinyl Album Art Disc */
.vinyl-disc-wrapper {
  position: relative;
  width: 82px;
  height: 82px;
  flex-shrink: 0;
  cursor: pointer;
}

.vinyl-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2);
  animation: spinRecord 10s linear infinite;
  animation-play-state: paused;
  transition: transform var(--transition-spring);
}

.vinyl-disc.is-playing {
  animation-play-state: running;
}

.vinyl-disc:hover {
  transform: scale(1.05);
}

.vinyl-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Vinyl concentric groove texture overlay */
.vinyl-grooves {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at center,
    transparent 0,
    transparent 4px,
    rgba(0, 0, 0, 0.15) 5px,
    rgba(255, 255, 255, 0.08) 6px
  );
  pointer-events: none;
}

/* Center Spindle Hole */
.vinyl-center-spindle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #18110e;
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.8), inset 0 0 2px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  z-index: 2;
}

@keyframes spinRecord {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Middle Track Info & Seek Scrubber */
.track-info-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.track-text-header {
  display: flex;
  flex-direction: column;
}

.track-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-pure);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.track-artist {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
  margin-top: 2px;
}

/* Scrubber / Seek Bar */
.scrubber-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.seek-bar-track {
  position: relative;
  width: 100%;
  height: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.seek-rail {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  transition: height var(--transition-fast);
}

.seek-bar-track:hover .seek-rail {
  height: 7px;
}

.seek-buffer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.seek-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  transition: width 0.05s linear;
}

.seek-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5), 0 0 6px rgba(255, 255, 255, 0.8);
  pointer-events: none;
  transition: transform var(--transition-fast), left 0.05s linear;
}

.seek-bar-track:hover .seek-thumb,
.seek-bar-track.is-dragging .seek-thumb {
  transform: translate(-50%, -50%) scale(1);
}

.time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.time-display {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.time-current {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Playback Control Buttons */
.playback-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.ctrl-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.ctrl-btn svg {
  fill: currentColor;
  transition: transform var(--transition-fast);
}

.ctrl-btn-secondary {
  width: 40px;
  height: 40px;
}

.ctrl-btn-secondary svg {
  width: 18px;
  height: 18px;
}

.ctrl-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-pure);
  transform: scale(1.08);
}

.ctrl-btn-secondary:active {
  transform: scale(0.92);
}

.ctrl-btn-secondary.is-active {
  color: var(--accent-amber-light);
  background: rgba(245, 158, 11, 0.2);
}

/* Main Play / Pause Button */
.ctrl-btn-play {
  width: 52px;
  height: 52px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.25);
  margin: 0 0.2rem;
}

.ctrl-btn-play:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5), 0 0 28px rgba(255, 255, 255, 0.45);
  background: #ffffff;
  color: #000000;
}

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

.ctrl-btn-play svg {
  width: 22px;
  height: 22px;
}

.ctrl-btn-play.is-playing svg {
  transform: scale(0.95);
}

/* --------------------------------------------------------------------------
   Extra Audio Controls & Flyouts (Volume, Playlist, Ambient)
   -------------------------------------------------------------------------- */
.extra-controls {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 0.4rem;
  margin-left: 0.2rem;
}

/* Volume Slider Flyout */
.volume-wrapper {
  position: relative;
}

.volume-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  padding: 0.8rem 0.6rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
  z-index: 50;
}

.volume-wrapper:hover .volume-popover,
.volume-popover.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.vertical-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  outline: none;
  transform: rotate(-90deg);
  margin: 40px -35px;
  cursor: pointer;
}

.vertical-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
}

/* --------------------------------------------------------------------------
   Side Playlist Drawer
   -------------------------------------------------------------------------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

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

.playlist-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: rgba(20, 14, 11, 0.88);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border-left: 1px solid var(--glass-border);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
  z-index: 70;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-spring);
}

.drawer-backdrop.is-open .playlist-drawer {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.06);
}

.playlist-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Custom Scrollbar */
.playlist-scroll::-webkit-scrollbar {
  width: 5px;
}
.playlist-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.playlist-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
}

.track-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.track-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.track-item.is-active {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
}

.track-item-num {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--text-muted);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.track-item.is-active .track-item-num {
  color: var(--accent-amber-light);
  font-weight: 700;
}

.track-item-cover {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.track-item-info {
  flex: 1;
  min-width: 0;
}

.track-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-item.is-active .track-item-title {
  color: var(--accent-amber-light);
}

.track-item-artist {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.track-item-duration {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Modal Windows (Custom Playlist & Ambient Mixer)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 500px;
  background: rgba(24, 17, 13, 0.92);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--glass-border-highlight);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8);
  transform: scale(0.94);
  transition: transform var(--transition-spring);
}

.modal-overlay.is-visible .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.input-field-group {
  margin-bottom: 1.25rem;
}

.input-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.url-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.url-input:focus {
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.preset-chips-section {
  margin-top: 1rem;
}

.preset-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.preset-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-pure);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.preset-chip.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--accent-amber);
  color: var(--accent-amber-light);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000000;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.5);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

/* Ambient Sound Mixer Controls */
.mixer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

.mixer-channel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.channel-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 140px;
}

.channel-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
}

.channel-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-amber-light);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.horn-btn {
  background: rgba(220, 38, 38, 0.3);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: #fca5a5;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.horn-btn:hover {
  background: rgba(220, 38, 38, 0.6);
  color: #ffffff;
}

.horn-btn:active {
  transform: scale(0.92);
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 6.8rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 100;
  pointer-events: none;
}

.toast {
  background: rgba(20, 15, 12, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border-highlight);
  color: #ffffff;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Background YouTube Player Iframe Target */
#yt-player-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0.001;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

#yt-player-container iframe {
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Responsive Mobile Adaptations
   -------------------------------------------------------------------------- */
@media (max-width: 768px), (orientation: portrait) {
  .hero-background-canvas {
    background-image: url('assets/up_roadways_mobile_full_bleed_1080x1920.svg');
    background-position: center center;
  }

  .top-hud {
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
  }

  .route-text, .time-clock {
    display: none;
  }

  .live-beacon {
    position: static;
    transform: none;
  }

  .player-container {
    bottom: 1.25rem;
    width: 95%;
    max-width: 600px;
  }

  .player-card {
    gap: 0.95rem;
    padding: 0.75rem 1.15rem 0.75rem 0.85rem;
    min-height: 96px;
  }

  .vinyl-disc-wrapper {
    width: 74px;
    height: 74px;
  }

  .ctrl-btn-play {
    width: 50px;
    height: 50px;
  }

  .extra-controls {
    display: none;
  }

  .playlist-drawer {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .player-container {
    bottom: 1rem;
    width: 96%;
    max-width: calc(100vw - 1rem);
  }

  .player-card {
    gap: 0.75rem;
    padding: 0.65rem 0.95rem 0.65rem 0.75rem;
    min-height: 92px;
  }

  .vinyl-disc-wrapper {
    width: 68px;
    height: 68px;
  }

  .track-title {
    font-size: 0.95rem;
  }

  .track-artist {
    font-size: 0.78rem;
  }

  .ctrl-btn-play {
    width: 48px;
    height: 48px;
  }

  .ctrl-btn-play svg {
    width: 20px;
    height: 20px;
  }

  .ctrl-btn-secondary {
    width: 36px;
    height: 36px;
  }

  .hud-pill span:not(.beacon-pulse, .passenger-count, .route-tag) {
    display: none;
  }
  
  .hud-actions a.hud-pill {
    padding: 0.45rem;
  }
}
