/* ==========================================================================
   SOFTECH RADIO - DESIGN SYSTEM & STYLESHEET
   Sleek Obsidian & Ruby Red Audiophile Dark Theme
   ========================================================================== */

:root {
  /* Color Palette - Softech Radio Theme */
  --bg-primary: #07080a;
  --bg-secondary: #0d0f14;
  --bg-surface: rgba(18, 20, 28, 0.72);
  --bg-surface-elevated: rgba(26, 28, 40, 0.88);
  --bg-glass-card: rgba(16, 18, 26, 0.75);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(229, 9, 20, 0.45);
  --border-focus: rgba(255, 42, 75, 0.65);

  /* Softech Signature Ruby Red Accents */
  --softech-red: #e50914;
  --softech-red-bright: #ff2a4b;
  --softech-red-dark: #b80016;
  --softech-red-glow: rgba(229, 9, 20, 0.45);
  --softech-gradient: linear-gradient(135deg, #ff2a4b 0%, #e50914 55%, #b80016 100%);
  --softech-gradient-subtle: linear-gradient(135deg, rgba(255, 42, 75, 0.16) 0%, rgba(229, 9, 20, 0.06) 100%);

  /* Neon / Dynamic Accents */
  --neon-cyan: #ff2a4b;
  --neon-cyan-glow: rgba(255, 42, 75, 0.4);
  --neon-violet: #e50914;
  --neon-violet-glow: rgba(229, 9, 20, 0.45);
  --neon-pink: #ff4757;
  --neon-pink-glow: rgba(255, 71, 87, 0.45);
  --neon-amber: #f59e0b;
  --neon-emerald: #10b981;
  --neon-rose: #ef4444;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-highlight: #ff4757;

  /* Layout & Sizing */
  --max-width: 1400px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --header-height: 76px;

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--softech-red);
}

/* Ambient Cyber Lighting Blobs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  animation: floatAmbient 18s ease-in-out infinite alternate;
}
.glow-1 {
  top: -100px;
  left: -100px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.42), transparent 70%);
}
.glow-2 {
  top: 30%;
  right: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 42, 75, 0.3), transparent 70%);
  animation-duration: 22s;
  animation-delay: -5s;
}
.glow-3 {
  bottom: 5%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(184, 0, 22, 0.28), transparent 70%);
  animation-duration: 26s;
  animation-delay: -10s;
}

@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, -20px) scale(0.95); }
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: rgba(8, 9, 13, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand */
.brand-container {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  cursor: pointer;
}
.brand-logo-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 2px;
  background: var(--softech-gradient);
  box-shadow: 0 0 16px var(--softech-red-glow);
}
.brand-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #0d0f14;
}
.live-beacon {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--neon-emerald);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 8px var(--neon-emerald);
  animation: pulseBeacon 2s infinite;
}

@keyframes pulseBeacon {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-main);
  line-height: 1.1;
}
.brand-accent {
  background: var(--softech-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 3px;
}
.brand-tagline {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: #ff4757;
  display: block;
}

/* Search Input */
.header-search-wrap {
  flex: 1;
  max-width: 520px;
}
.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0 16px;
  transition: var(--transition-fast);
}
.search-input-box:focus-within {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 18px var(--neon-cyan-glow);
}
.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 10px;
}
.search-input-box input {
  width: 100%;
  height: 42px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}
.search-input-box input::placeholder {
  color: var(--text-dim);
}
.clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}
.clear-btn:hover {
  color: var(--text-main);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cyber-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  outline: none;
  transition: var(--transition-fast);
}
.cyber-select:hover, .cyber-select:focus {
  border-color: var(--neon-violet);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 12px var(--neon-violet-glow);
}
.cyber-select option {
  background: var(--bg-secondary);
  color: var(--text-main);
}
.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: var(--border-hover);
}

/* ==========================================================================
   MAIN CONTAINER
   ========================================================================== */
.main-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 10;
  padding-bottom: 120px;
}

/* ==========================================================================
   HERO "NOW PLAYING" DECK
   ========================================================================== */
.hero-deck {
  background: linear-gradient(135deg, rgba(20, 24, 38, 0.75) 0%, rgba(13, 16, 26, 0.9) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.hero-deck::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff2a4b, #e50914, transparent);
}

.hero-deck-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}

/* Left: Vinyl & Art */
.deck-art-col {
  position: relative;
}
.vinyl-disc-wrap {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, #251418 20%, #141118 60%, #090a0e 100%);
  border: 4px solid #24141a;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(229, 9, 20, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform var(--transition-slow);
}
.vinyl-disc-wrap.spinning {
  animation: spinVinyl 12s linear infinite;
}
@keyframes spinVinyl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.vinyl-grooves {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.02),
              inset 0 0 0 22px rgba(255, 255, 255, 0.02),
              inset 0 0 0 34px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}
.hero-art-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  z-index: 2;
}
.vinyl-center-spindle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #090a0e;
  border: 2px solid rgba(255, 255, 255, 0.4);
  z-index: 3;
}

/* Center: Station Info & Visualizer */
.deck-info-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.deck-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.live {
  background: var(--neon-emerald);
  box-shadow: 0 0 10px var(--neon-emerald);
  animation: pulseBeacon 1.5s infinite;
}
.status-dot.buffering {
  background: var(--neon-amber);
  box-shadow: 0 0 10px var(--neon-amber);
  animation: pulseBeacon 0.8s infinite;
}
.status-dot.paused {
  background: var(--text-dim);
}
.status-dot.error {
  background: var(--neon-rose);
  box-shadow: 0 0 10px var(--neon-rose);
}

.deck-frequency-badge {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  background: rgba(229, 9, 20, 0.12);
  color: #ff4757;
  border: 1px solid rgba(229, 9, 20, 0.35);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.5px;
}

.hero-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.meta-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}
.meta-tag.highlight {
  color: var(--text-highlight);
  font-family: var(--font-mono);
  border-color: rgba(56, 189, 248, 0.3);
}

/* Audio Visualizer Canvas Container */
.visualizer-container {
  position: relative;
  background: rgba(10, 12, 18, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  height: 120px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}
#visualizer-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.visualizer-modes {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.viz-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.viz-mode-btn:hover {
  color: var(--text-main);
}
.viz-mode-btn.active {
  background: var(--softech-gradient);
  color: #fff;
  box-shadow: 0 0 10px var(--softech-red-glow);
}

/* Right: Playback Controls Column */
.deck-controls-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 280px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.playback-btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.ctrl-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.icon-btn {
  width: 44px;
  height: 44px;
}
.primary-play-btn {
  width: 64px;
  height: 64px;
  background: var(--softech-gradient);
  border: none;
  box-shadow: 0 8px 24px var(--softech-red-glow), 0 0 15px rgba(255, 42, 75, 0.35);
}
.primary-play-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 30px var(--softech-red-glow), 0 0 25px rgba(255, 42, 75, 0.5);
}

.deck-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cyber-tool-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.cyber-tool-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: var(--border-hover);
}
.cyber-tool-btn.active {
  color: var(--neon-pink);
  border-color: var(--neon-pink);
  box-shadow: 0 0 12px var(--neon-pink-glow);
}

/* Volume Slider */
.deck-volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vol-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}
.vol-icon-btn:hover {
  color: var(--text-main);
}
.cyber-slider {
  flex: 1;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}
.cyber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan-glow);
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.cyber-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}
.vol-val-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  width: 32px;
  text-align: right;
}

/* Utilities Row */
.deck-utilities-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}
.util-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}
.util-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--border-hover);
}
.util-btn.recording {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--neon-rose);
  color: var(--neon-rose);
  animation: pulseBeacon 1s infinite;
}
.util-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  background: var(--neon-violet);
  color: #fff;
  padding: 1px 4px;
  border-radius: 4px;
}
.record-badge {
  background: var(--neon-rose);
}

/* ==========================================================================
   NAVIGATION TABS
   ========================================================================== */
.explorer-tabs-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  overflow-x: auto;
}
.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}
.nav-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}
.nav-tab-btn.active {
  color: var(--text-main);
  background: rgba(229, 9, 20, 0.16);
  border: 1px solid rgba(229, 9, 20, 0.45);
  box-shadow: 0 0 16px var(--softech-red-glow);
}
.tab-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--softech-gradient);
  color: #fff;
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   GENRE FILTER PILLS
   ========================================================================== */
.genre-pill-wrapper {
  margin-bottom: 28px;
  overflow: hidden;
}
.genre-pill-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.genre-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}
.genre-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.18);
}
.genre-pill.active {
  background: var(--softech-gradient);
  border-color: #ff2a4b;
  color: var(--text-main);
  box-shadow: 0 0 14px var(--softech-red-glow);
}

/* ==========================================================================
   STATIONS GRID & CARDS
   ========================================================================== */
.stations-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.stations-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}
.count-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.view-switch-btns {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.view-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 5px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.view-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

/* Grid Layout */
.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

/* Station Card */
.station-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}
.station-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 20px var(--softech-red-glow);
}
.station-card.playing {
  border-color: var(--softech-red);
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.1) 0%, rgba(255, 42, 75, 0.04) 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 22px var(--softech-red-glow);
}
.station-card.playing::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--softech-gradient);
}

/* Card Artwork Wrap */
.card-art-wrap {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #111420;
}
.station-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}
.station-card:hover .station-card-img {
  transform: scale(1.06);
}
.card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 13, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.station-card:hover .card-play-overlay,
.station-card.playing .card-play-overlay {
  opacity: 1;
}
.card-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--softech-gradient);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 15px var(--softech-red-glow);
  transition: transform var(--transition-fast);
}
.card-play-btn:hover {
  transform: scale(1.1);
}
.card-freq-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  color: #ff4757;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(229, 9, 20, 0.35);
}

/* Card Body */
.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-fav-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px;
  transition: color var(--transition-fast);
}
.card-fav-btn:hover {
  color: #ff2a4b;
}
.card-fav-btn.active {
  color: #ff2a4b;
  filter: drop-shadow(0 0 6px var(--softech-red-glow));
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
.card-country {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-codec-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-highlight);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tag-chip {
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ==========================================================================
   LIST VIEW MODE
   ========================================================================== */
.stations-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stations-grid.list-view .station-card {
  flex-direction: row;
  align-items: center;
  padding: 12px 16px;
}
.stations-grid.list-view .card-art-wrap {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}
.stations-grid.list-view .card-freq-tag {
  display: none;
}
.stations-grid.list-view .card-body {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.stations-grid.list-view .card-header {
  flex: 2;
}
.stations-grid.list-view .card-title {
  -webkit-line-clamp: 1;
}
.stations-grid.list-view .card-meta {
  flex: 1;
}

/* ==========================================================================
   EMPTY & LOADING STATES
   ========================================================================== */
.loading-state, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.cyber-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--softech-red);
  border-radius: 50%;
  animation: spinVinyl 0.8s linear infinite;
  margin-bottom: 16px;
  box-shadow: 0 0 15px var(--softech-red-glow);
}
.loading-state p {
  color: var(--text-muted);
  font-size: 14px;
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--text-main);
  margin-bottom: 6px;
}
.empty-state p {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 380px;
}

/* ==========================================================================
   STICKY BOTTOM MINI PLAYER
   ========================================================================== */
.mini-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 74px;
  background: rgba(10, 12, 18, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-subtle);
  z-index: 99;
  transform: translateY(100%);
  transition: transform var(--transition-normal);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7);
}
.mini-player.visible {
  transform: translateY(0);
}
.mini-player-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.mini-station-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}
.mini-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}
.mini-text {
  display: flex;
  flex-direction: column;
}
.mini-name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mini-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}
.mini-icon-btn:hover {
  color: var(--text-main);
}
.mini-play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--softech-gradient);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--softech-red-glow);
}

.mini-volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 140px;
}
.mini-vol-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* ==========================================================================
   MODALS & POPUPS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  padding: 20px;
}
.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px var(--neon-violet-glow);
  transform: translateY(20px) scale(0.96);
  transition: transform var(--transition-fast);
}
.modal-backdrop.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-title-row h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--text-main);
}
.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.modal-close-btn:hover {
  color: var(--text-main);
}
.modal-desc {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
}

.modal-options-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sleep-opt-btn, .eq-preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}
.sleep-opt-btn:hover, .eq-preset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}
.sleep-opt-btn.danger {
  color: var(--neon-rose);
  border-color: rgba(239, 68, 68, 0.3);
}
.eq-preset-btn.active {
  background: rgba(229, 9, 20, 0.2);
  border-color: var(--softech-red);
  color: #fff;
  box-shadow: 0 0 12px var(--softech-red-glow);
}

/* Shortcuts Dialog */
.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}
kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  color: var(--neon-cyan);
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: rgba(20, 24, 38, 0.94);
  border: 1px solid var(--neon-cyan);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px var(--neon-cyan-glow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(20px);
  opacity: 0;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  max-width: 360px;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.error {
  border-color: var(--neon-rose);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Autoplay Interaction Prompt Bar */
.autoplay-prompt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.28) 0%, rgba(255, 42, 75, 0.16) 100%);
  border: 1px solid var(--softech-red);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin: 6px 0;
  cursor: pointer;
  box-shadow: 0 0 20px var(--softech-red-glow);
  animation: pulsePrompt 2s infinite alternate;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.autoplay-prompt-bar:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.36) 0%, rgba(255, 42, 75, 0.24) 100%);
}
@keyframes pulsePrompt {
  0% { box-shadow: 0 0 10px rgba(229, 9, 20, 0.25); border-color: rgba(229, 9, 20, 0.7); }
  100% { box-shadow: 0 0 24px rgba(229, 9, 20, 0.65); border-color: #ff2a4b; }
}
.pulse-icon {
  color: #ff2a4b;
  font-size: 14px;
  animation: bounceIcon 1s infinite alternate;
}
@keyframes bounceIcon {
  0% { transform: scale(0.9); }
  100% { transform: scale(1.25); }
}
.prompt-text {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  flex: 1;
  letter-spacing: 0.2px;
}
.prompt-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
  border-radius: 4px;
}
.prompt-close:hover {
  color: #ffffff;
}

/* ==========================================================================
   100% RESPONSIVE MOBILE MEDIA QUERIES
   Seamless fit on small phones, tablets, foldables, and desktop
   ========================================================================== */

/* Tablets & Small Desktops (<= 1080px) */
@media (max-width: 1080px) {
  .hero-deck-inner {
    grid-template-columns: auto 1fr;
    gap: 24px;
  }
  .deck-controls-col {
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
  }
  .playback-btn-row {
    margin: 0;
  }
  .deck-actions-row {
    grid-template-columns: auto auto;
  }
  .deck-volume-row {
    min-width: 200px;
  }
}

/* Tablets Portrait & Medium Screens (<= 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: auto;
  }

  /* Header mobile reorganization */
  .app-header {
    height: auto;
    padding: 10px 0;
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 16px;
  }
  .brand-container {
    gap: 10px;
  }
  .brand-logo-wrap {
    width: 38px;
    height: 38px;
  }
  .brand-name {
    font-size: 20px;
  }
  .brand-tagline {
    font-size: 8px;
    letter-spacing: 0.8px;
  }

  /* Search bar spans full row on mobile for easy typing */
  .header-search-wrap {
    display: flex;
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 2px;
  }
  .search-input-box {
    width: 100%;
    height: 38px;
  }
  .search-input-box input {
    font-size: 13px;
  }

  .header-actions {
    margin-left: auto;
  }
  .cyber-select {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Main Container */
  .main-container {
    padding: 16px 14px 130px 14px;
  }

  /* Hero Now Playing Deck */
  .hero-deck {
    padding: 20px 16px;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
  }
  .hero-deck-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 18px;
  }

  /* Vinyl Record Deck */
  .deck-art-col {
    display: flex;
    justify-content: center;
  }
  .vinyl-disc-wrap {
    width: 140px;
    height: 140px;
    border-width: 3px;
  }
  .hero-art-img {
    width: 76px;
    height: 76px;
  }

  .deck-status-bar {
    justify-content: center;
  }
  .hero-title {
    font-size: 20px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
  }
  .hero-meta-row {
    justify-content: center;
    gap: 6px;
  }
  .meta-tag {
    font-size: 11px;
    padding: 2px 8px;
  }

  /* Visualizer on mobile */
  .visualizer-container {
    height: 100px;
    padding: 8px;
  }
  .visualizer-modes {
    top: 6px;
    right: 6px;
    gap: 2px;
    padding: 2px;
  }
  .viz-mode-btn {
    font-size: 9px;
    padding: 2px 6px;
  }

  /* Deck controls */
  .deck-controls-col {
    flex-direction: column;
    padding: 14px;
    gap: 14px;
  }
  .playback-btn-row {
    margin: 0 auto;
    gap: 14px;
  }
  .primary-play-btn {
    width: 58px;
    height: 58px;
  }
  .icon-btn {
    width: 40px;
    height: 40px;
  }
  .deck-actions-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .cyber-tool-btn {
    padding: 10px 8px;
    font-size: 11px;
  }
  .deck-volume-row {
    width: 100%;
  }
  .deck-utilities-row {
    width: 100%;
    gap: 6px;
  }
  .util-btn {
    font-size: 10px;
    padding: 8px 4px;
  }

  /* Tabs & Pills touch scroll */
  .explorer-tabs-nav {
    gap: 8px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .explorer-tabs-nav::-webkit-scrollbar {
    display: none;
  }
  .nav-tab-btn {
    font-size: 13px;
    padding: 6px 12px;
  }
  .genre-pill-scroll {
    gap: 6px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .genre-pill-scroll::-webkit-scrollbar {
    display: none;
  }
  .genre-pill {
    font-size: 12px;
    padding: 6px 12px;
  }

  /* Stations Grid on Mobile */
  .stations-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .station-card {
    padding: 14px;
  }
  .card-art-wrap {
    height: 130px;
  }

  /* Sticky Bottom Mini Player Mobile */
  .mini-player {
    height: auto;
    min-height: 64px;
    padding: 8px 14px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .mini-player-inner {
    padding: 0;
    gap: 10px;
  }
  .mini-station-info {
    min-width: 0;
    flex: 1;
    gap: 10px;
  }
  .mini-thumb {
    width: 40px;
    height: 40px;
  }
  .mini-name {
    max-width: 140px;
    font-size: 13px;
  }
  .mini-desc {
    font-size: 10px;
  }
  .mini-controls {
    gap: 8px;
  }
  .mini-play-btn {
    width: 38px;
    height: 38px;
  }
  .mini-icon-btn svg {
    width: 18px;
    height: 18px;
  }
  .mini-volume-wrap {
    display: none;
  }

  /* Modals on Mobile */
  .modal-backdrop {
    padding: 12px;
  }
  .modal-card {
    padding: 18px 16px;
    max-height: 85vh;
    overflow-y: auto;
  }

  /* Toast Notification */
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 74px;
    align-items: center;
  }
  .toast {
    max-width: 100%;
    width: 100%;
    font-size: 12px;
    padding: 10px 14px;
  }
}

/* Compact Smartphones (<= 420px: iPhone SE, Galaxy Mini) */
@media (max-width: 420px) {
  .brand-name {
    font-size: 18px;
  }
  .brand-tagline {
    display: none;
  }
  .vinyl-disc-wrap {
    width: 120px;
    height: 120px;
  }
  .hero-art-img {
    width: 64px;
    height: 64px;
  }
  .hero-title {
    font-size: 18px;
  }
  .primary-play-btn {
    width: 52px;
    height: 52px;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
  }
  .visualizer-container {
    height: 85px;
  }
  .mini-name {
    max-width: 110px;
  }
  .deck-actions-row {
    grid-template-columns: 1fr;
  }
}

