/* ==========================================================================
   OtoRadyo - Authentic In-Car Radio Receiver System
   Crafted with: anthropic-frontend-design principles
   Aesthetic: Classic Automotive Blaupunkt/Becker Head-Unit + Modern Cockpit
   Palette: Graphite Obsidian, Brushed Slate, Optical Amber Phosphor VFD
   ========================================================================== */

:root {
  /* Cabin Chassis Palette */
  --cabin-bg: #090c13;
  --chassis-surface: #131722;
  --chassis-elevated: #1a202c;
  --chassis-border: rgba(255, 255, 255, 0.08);
  --chassis-highlight: rgba(255, 255, 255, 0.12);
  
  /* Optical VFD Screen */
  --vfd-glass: #06090f;
  --vfd-amber: #f59e0b;
  --vfd-amber-glow: rgba(245, 158, 11, 0.35);
  --vfd-amber-dim: #78350f;
  --vfd-emerald: #10b981;
  --vfd-emerald-glow: rgba(16, 185, 129, 0.4);
  --vfd-cyan: #38bdf8;
  
  /* Text & Contrast */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Fonts */
  --font-brand: 'Syne', sans-serif;
  --font-ui: 'Plus Jakarta Sans', sans-serif;
  --font-tuner: 'Space Grotesk', sans-serif;
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  /* Safe Insets */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--cabin-bg);
  color: var(--text-primary);
  font-family: var(--font-ui);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(26, 36, 56, 0.4) 0%, transparent 60%),
    radial-gradient(circle at 10% 90%, rgba(245, 158, 11, 0.03) 0%, transparent 40%);
}

button, input, select {
  font-family: inherit;
  cursor: pointer;
}

button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--vfd-amber);
  outline-offset: 2px;
}

.deck-frame {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 940px;
  margin: 0 auto;
  position: relative;
  padding-bottom: calc(105px + var(--safe-bottom));
}

/* ==========================================================================
   Deck Topbar
   ========================================================================== */
.deck-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + var(--safe-top)) 20px 14px 20px;
  border-bottom: 1px solid var(--chassis-border);
  background: rgba(13, 17, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.deck-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tuner-pilot-lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--vfd-emerald);
  box-shadow: 0 0 10px var(--vfd-emerald-glow);
  position: relative;
  animation: pilot-pulse 2.2s infinite ease-in-out;
}

@keyframes pilot-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 14px var(--vfd-emerald); }
}

.brand-title {
  font-family: var(--font-brand);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #fff;
  line-height: 1;
}

.brand-subtitle {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  margin-top: 2px;
}

.deck-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-tuner-action {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #1e2533;
  border: 1px solid var(--chassis-border);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  min-height: 42px;
  transition: all 0.16s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.drive-mode-cta {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.25));
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--vfd-amber);
}

.drive-mode-cta:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: var(--vfd-amber);
}

.drive-mode-cta:active {
  transform: scale(0.96);
  background: var(--vfd-amber);
  color: #000;
}

.drive-mode-cta svg {
  width: 17px;
  height: 17px;
}

.btn-tuner-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: #171c26;
  border: 1px solid var(--chassis-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.16s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-tuner-icon:hover {
  background: #202736;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-tuner-icon:active {
  transform: scale(0.95);
}

.btn-tuner-icon svg {
  width: 19px;
  height: 19px;
}

.lamp-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.2s;
}

.btn-tuner-icon.active .lamp-dot {
  background: var(--vfd-amber);
  box-shadow: 0 0 6px var(--vfd-amber);
}

.timer-pill {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--vfd-amber);
  color: #000;
  font-family: var(--font-tuner);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   THE IN-CAR HEAD UNIT (OTO TEYP KONSOLU)
   ========================================================================== */
.headunit-console {
  margin: 16px 20px 8px 20px;
  background: var(--chassis-surface);
  border: 1px solid var(--chassis-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 28px rgba(0, 0, 0, 0.5);
  position: relative;
}

/* Optical VFD Screen */
.vfd-screen {
  background: var(--vfd-glass);
  border: 2px solid #1c2434;
  border-radius: var(--radius-md);
  padding: 16px 18px 14px 18px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.85);
  position: relative;
  overflow: hidden;
}

/* Screen scanline texture */
.vfd-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(18, 24, 38, 0) 50%, 
    rgba(0, 0, 0, 0.2) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
  opacity: 0.6;
}

.vfd-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.vfd-indicators {
  display: flex;
  gap: 6px;
}

.vfd-chip {
  font-family: var(--font-tuner);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.vfd-screen.playing #vfd-stereo {
  color: var(--vfd-emerald);
  background: rgba(16, 185, 129, 0.12);
  text-shadow: 0 0 8px var(--vfd-emerald);
}

.vfd-screen.playing #vfd-rds {
  color: var(--vfd-amber);
  background: rgba(245, 158, 11, 0.12);
  text-shadow: 0 0 8px var(--vfd-amber);
}

.vfd-clock {
  font-family: var(--font-tuner);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.vfd-main-display {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.vfd-freq-big {
  font-family: var(--font-tuner);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--vfd-amber);
  text-shadow: 0 0 18px var(--vfd-amber-glow);
  line-height: 1;
  letter-spacing: -0.5px;
}

.vfd-mhz {
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.7;
}

.vfd-station-details {
  text-align: right;
  min-width: 0;
  flex: 1;
}

.vfd-station-name {
  font-family: var(--font-brand);
  font-size: 1.28rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.vfd-station-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}

/* Analog Frequency Scale Dial */
.fm-dial-container {
  height: 38px;
  background: #090e16;
  border: 1px solid #1a2233;
  border-radius: var(--radius-sm);
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.dial-scale-lines {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 100%;
  padding: 0 10px 4px 10px;
}

.scale-mark {
  font-family: var(--font-tuner);
  font-size: 0.65rem;
  color: var(--text-muted);
  position: relative;
  padding-top: 10px;
}

.scale-mark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
}

.tuner-pointer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--vfd-amber);
  box-shadow: 0 0 10px var(--vfd-amber);
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.tuner-pointer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  width: 11px;
  height: 6px;
  background: var(--vfd-amber);
  border-radius: 2px;
}

/* Preset Memory Rack (P1 to P6) */
.preset-memory-rack {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rack-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.preset-buttons-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  flex: 1;
}

.btn-preset-key {
  height: 38px;
  background: #19202c;
  border: 1px solid var(--chassis-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  transition: all 0.14s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.preset-num {
  font-family: var(--font-tuner);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--vfd-amber);
}

.preset-tag {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

.btn-preset-key:hover {
  background: #232c3d;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-preset-key:active {
  transform: translateY(1.5px);
  background: #141a24;
}

.btn-preset-key.active-preset {
  background: #1a2738;
  border-color: var(--vfd-amber);
  box-shadow: 0 0 12px var(--vfd-amber-glow);
}

/* ==========================================================================
   Filter & Search
   ========================================================================== */
.station-search-section {
  padding: 8px 20px 6px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-input-shell {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-lens {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-shell input {
  width: 100%;
  height: 46px;
  background: #121622;
  border: 1px solid var(--chassis-border);
  border-radius: var(--radius-md);
  padding: 0 40px 0 44px;
  color: #fff;
  font-size: 0.92rem;
  transition: border-color 0.18s;
}

.search-input-shell input:focus {
  outline: none;
  border-color: var(--vfd-amber);
  background: #161b2a;
}

.search-input-shell input::placeholder {
  color: var(--text-muted);
}

.btn-search-clear {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  padding: 2px 6px;
}

/* Category Filter Rail */
.category-scroll-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-scroll-rail::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--chassis-border);
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  min-height: 40px;
  transition: all 0.16s ease;
}

.category-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.category-chip.active {
  background: #fff;
  color: #090c13;
  border-color: #fff;
}

.fav-chip.active {
  background: var(--vfd-amber);
  color: #000;
  border-color: var(--vfd-amber);
  box-shadow: 0 0 14px var(--vfd-amber-glow);
}

.chip-star-icon {
  width: 14px;
  height: 14px;
}

.chip-count {
  font-family: var(--font-tuner);
  font-size: 0.72rem;
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.2);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Stations Mosaic
   ========================================================================== */
.stations-viewport {
  padding: 8px 20px 24px 20px;
  flex: 1;
}

.stations-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.station-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #131722;
  border: 1px solid var(--chassis-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.station-card:hover {
  background: #181e2c;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1.5px);
}

.station-card:active {
  transform: scale(0.985);
}

.station-card.playing {
  border-color: var(--vfd-amber);
  background: #182232;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.card-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.badge-equalizer {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding-bottom: 10px;
  opacity: 0;
}

.station-card.playing .badge-equalizer {
  opacity: 1;
}

.badge-equalizer span {
  width: 3.5px;
  height: 6px;
  background: var(--vfd-amber);
  border-radius: 1px;
  animation: eq-bar 0.7s infinite alternate;
}

.badge-equalizer span:nth-child(2) { animation-delay: 0.25s; height: 18px; }
.badge-equalizer span:nth-child(3) { animation-delay: 0.4s; height: 11px; }

@keyframes eq-bar {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

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

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.card-title {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-card.playing .card-title {
  color: var(--vfd-amber);
}

.card-freq {
  font-family: var(--font-tuner);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--vfd-amber);
  background: rgba(245, 158, 11, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-cat-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
}

.btn-card-fav {
  background: none;
  border: none;
  padding: 8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.btn-card-fav:hover {
  color: #fff;
  transform: scale(1.15);
}

.btn-card-fav.active {
  color: var(--vfd-amber);
}

.btn-card-fav.active svg {
  fill: var(--vfd-amber);
}

/* Empty State */
.empty-state-notice {
  text-align: center;
  padding: 50px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-icon-shield {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.empty-icon-shield svg {
  width: 32px;
  height: 32px;
}

.empty-state-title {
  font-family: var(--font-brand);
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.empty-state-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 320px;
  margin-bottom: 18px;
}

.btn-console-solid {
  background: var(--vfd-amber);
  border: none;
  color: #000;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  min-height: 44px;
}

/* ==========================================================================
   Sticky Dock Mini Player
   ========================================================================== */
.mini-player-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 10px 18px calc(10px + var(--safe-bottom)) 18px;
  background: rgba(14, 18, 27, 0.94);
  border-top: 1px solid var(--chassis-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.6);
  animation: slide-up 0.22s ease-out;
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mini-player-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-info-touch {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.mini-badge-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: #1a2233;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.mini-wave-anim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2.5px;
  padding-bottom: 9px;
}

.mini-wave-anim span {
  width: 3px;
  height: 8px;
  background: var(--vfd-amber);
  border-radius: 1px;
  animation: eq-bar 0.7s infinite alternate;
}

.mini-wave-anim span:nth-child(2) { animation-delay: 0.2s; height: 16px; }
.mini-wave-anim span:nth-child(3) { animation-delay: 0.4s; height: 10px; }

.mini-titles {
  min-width: 0;
  flex: 1;
}

.mini-station-name {
  font-family: var(--font-ui);
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-sub-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.mini-freq-badge {
  font-family: var(--font-tuner);
  color: var(--vfd-amber);
  font-weight: 700;
}

.mini-bullet {
  color: var(--text-muted);
}

.mini-status-text {
  color: var(--text-muted);
}

.mini-transport {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-deck-sub {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #171c26;
  border: 1px solid var(--chassis-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
}

.btn-deck-sub:hover {
  background: #222a3a;
  color: #fff;
}

.btn-deck-sub:active {
  transform: scale(0.94);
}

.btn-deck-sub svg {
  width: 18px;
  height: 18px;
}

.btn-deck-sub.active {
  color: var(--vfd-amber);
}

.btn-deck-sub.active svg {
  fill: var(--vfd-amber);
}

.btn-expand-cta {
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--vfd-amber);
}

.btn-expand-cta:hover {
  background: var(--vfd-amber);
  color: #000;
}

.btn-deck-play {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--vfd-amber);
  border: none;
  color: #090c13;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--vfd-amber-glow);
  transition: all 0.16s ease;
}

.btn-deck-play:hover {
  transform: scale(1.05);
  box-shadow: 0 0 26px var(--vfd-amber);
}

.btn-deck-play:active {
  transform: scale(0.95);
}

.btn-deck-play svg {
  width: 25px;
  height: 25px;
}

.deck-spinner, .hud-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(9, 12, 19, 0.25);
  border-top-color: #090c13;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   SÜRÜŞ KOKPİTİ (FULL HUD CAR MODE)
   ========================================================================== */
.cockpit-hud {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #080b11;
  background-image: radial-gradient(circle at 50% 30%, #151c2a 0%, #06080d 80%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(18px + var(--safe-top)) 24px calc(24px + var(--safe-bottom)) 24px;
  animation: hud-in 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: pan-y;
}

@keyframes hud-in {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hud-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--vfd-amber);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  color: var(--vfd-amber);
  font-size: 0.85rem;
  font-weight: 700;
}

.hud-tag svg {
  width: 17px;
  height: 17px;
}

.hud-clock {
  font-family: var(--font-tuner);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.hud-close-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #171d29;
  border: 1px solid var(--chassis-border);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-close-btn svg {
  width: 24px;
  height: 24px;
}

.hud-center-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 0;
  cursor: pointer;
}

.hud-badge-disc {
  width: 130px;
  height: 130px;
  border-radius: var(--radius-lg);
  background: #161c28;
  border: 2px solid var(--chassis-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
}

.cockpit-hud.playing .hud-badge-disc {
  border-color: var(--vfd-amber);
  box-shadow: 0 0 36px var(--vfd-amber-glow);
}

.hud-badge-letter {
  font-family: var(--font-brand);
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
}

.hud-station-title {
  font-family: var(--font-brand);
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  max-width: 90vw;
}

.hud-frequency {
  font-family: var(--font-tuner);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--vfd-amber);
  margin-bottom: 6px;
}

.hud-status-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hud-equalizer-canvas {
  width: 320px;
  height: 44px;
  margin-bottom: 14px;
}

.hud-gesture-guide {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.guide-sep {
  opacity: 0.4;
}

/* Steering Controls */
.hud-steering-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 22px;
}

.btn-hud-nav {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #171d29;
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

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

.btn-hud-nav svg {
  width: 34px;
  height: 34px;
}

.btn-hud-play {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--vfd-amber);
  border: none;
  color: #090c13;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 36px var(--vfd-amber-glow);
}

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

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

.hud-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(9, 12, 19, 0.3);
  border-top-color: #090c13;
}

.hud-footer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--chassis-border);
}

.btn-hud-aux {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 10px;
  min-height: 44px;
}

.btn-hud-aux.active {
  color: var(--vfd-amber);
}

.btn-hud-aux svg {
  width: 20px;
  height: 20px;
}

#drive-btn-fav.active svg {
  fill: var(--vfd-amber);
}

.hud-volume-track {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 250px;
}

.btn-hud-mute {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.btn-hud-mute svg {
  width: 22px;
  height: 22px;
}

#drive-volume-slider {
  width: 100%;
  accent-color: var(--vfd-amber);
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.deck-modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.deck-modal-card {
  width: 100%;
  max-width: 420px;
  background: #131824;
  border: 1px solid var(--chassis-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.modal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.modal-heading {
  font-family: var(--font-brand);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.btn-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  line-height: 1;
  padding: 4px;
  min-width: 44px;
  min-height: 44px;
}

.modal-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.timer-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-timer-chip {
  background: #1a2233;
  border: 1px solid var(--chassis-border);
  color: #fff;
  padding: 14px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 46px;
}

.btn-timer-chip:active {
  background: var(--vfd-amber);
  color: #000;
}

.btn-timer-abort {
  grid-column: 1 / -1;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  margin-top: 4px;
}

/* Forms */
.form-row-item {
  margin-bottom: 14px;
}

.form-row-item label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-row-item input, .form-row-item select {
  width: 100%;
  height: 44px;
  background: #0d121c;
  border: 1px solid var(--chassis-border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: #fff;
  font-size: 0.92rem;
}

.form-row-item input:focus, .form-row-item select:focus {
  outline: none;
  border-color: var(--vfd-amber);
}

.form-dual-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.btn-modal-cancel {
  background: #1a2233;
  border: 1px solid var(--chassis-border);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  min-height: 44px;
}

/* ==========================================================================
   Toasts
   ========================================================================== */
.toast-stack-tray {
  position: fixed;
  top: calc(18px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 360px;
}

.toast {
  background: #171e2c;
  border: 1px solid var(--vfd-amber);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  animation: toast-drop 0.22s ease-out, toast-fade 0.22s ease-in 2.5s forwards;
}

@keyframes toast-drop {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-fade {
  to { opacity: 0; transform: translateY(-12px); }
}

.hidden {
  display: none !important;
}

@media (max-width: 480px) {
  .vfd-freq-big {
    font-size: 2rem;
  }
  .vfd-station-name {
    font-size: 1.15rem;
  }
  .preset-buttons-row {
    grid-template-columns: repeat(3, 1fr);
  }
}
