:root {
  --bg: #0b0d11;
  --panel: #14171d;
  --panel-2: #1a1e26;
  --border: #262b34;
  --text: #e8eaed;
  --muted: #7a828e;
  --accent: #ff5c3a;
  --accent-glow: rgba(255, 92, 58, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Bricolage Grotesque', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.title-font { font-family: 'Bricolage Grotesque', sans-serif; letter-spacing: -0.02em; }
.mono { font-family: 'JetBrains Mono', monospace; }
.accent { color: var(--accent); }

/* atmospheric background glow */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 92, 58, 0.12), transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(58, 120, 255, 0.10), transparent 50%);
}

.logo-badge {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), #ff8a3a);
  color: #150a06;
  border-radius: 14px;
  box-shadow: 0 6px 24px var(--accent-glow);
}

.count-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* search */
.search-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  transition: border-color .2s, box-shadow .2s;
}
.search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 15px; font-family: 'Bricolage Grotesque', sans-serif;
}
.search-input::placeholder { color: var(--muted); }

/* pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 500;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  transition: all .15s;
}
.pill:hover { color: var(--text); border-color: #3a414d; }
.pill-active {
  background: var(--accent); color: #150a06; border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* loader panel */
.loader-panel {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  animation: slideDown .25s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.load-btn {
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); font-weight: 500; font-size: 14px;
  padding: 11px; border-radius: 12px; cursor: pointer;
  transition: all .15s;
}
.load-btn:hover { border-color: var(--accent); color: var(--accent); }
.paste-area {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; color: var(--text);
  font-family: 'JetBrains Mono', monospace; font-size: 12px; resize: vertical;
  outline: none;
}
.paste-area:focus { border-color: var(--accent); }
.hidden { display: none; }

/* station rows */
.station-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid transparent;
  border-radius: 12px; padding: 10px 12px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  animation: rowIn .35s ease both;
}
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.station-row:hover { background: var(--panel-2); border-color: var(--border); }
.station-row:active { transform: scale(0.99); }
.station-active {
  background: linear-gradient(90deg, rgba(255,92,58,0.14), rgba(255,92,58,0.04));
  border-color: var(--accent);
}
.station-icon {
  width: 38px; height: 38px; min-width: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border-radius: 10px; color: var(--muted);
}
.station-active .station-icon { color: var(--accent); background: rgba(255,92,58,0.12); }
.station-name {
  font-size: 15px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.station-group {
  font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono', monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.on-air-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600;
  color: var(--accent); letter-spacing: 0.08em; padding: 2px 6px;
  border: 1px solid var(--accent); border-radius: 6px; white-space: nowrap;
}
.star-btn {
  color: var(--muted); background: none; border: none; cursor: pointer;
  padding: 4px; transition: color .15s, transform .15s;
}
.star-btn:hover { color: var(--text); }
.star-btn.starred { color: #ffc234; animation: pop .3s ease; }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.35) rotate(12deg); } 100% { transform: scale(1); } }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--muted);
  font-size: 15px;
}

/* player bar */
.player-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: rgba(16, 18, 23, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}
.play-fab {
  width: 52px; height: 52px; min-width: 52px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), #ff8a3a);
  color: #150a06; border: none; border-radius: 50%; cursor: pointer;
  box-shadow: 0 6px 20px var(--accent-glow);
  transition: transform .1s;
}
.play-fab:not(:disabled):hover { transform: scale(1.06); }
.play-fab:not(:disabled):active { transform: scale(0.94); }
.now-name {
  font-size: 15px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.now-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.live-dot {
  width: 8px; height: 8px; min-width: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }

.vol-wrap { display: flex; align-items: center; gap: 8px; }
.vol-slider {
  -webkit-appearance: none; appearance: none;
  width: 90px; height: 4px; border-radius: 4px; cursor: pointer;
  background: var(--border);
}
@media (min-width: 640px) { .vol-slider { width: 110px; } }
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow); cursor: pointer;
}
.vol-slider::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  border: none; cursor: pointer;
}

/* equalizer */
.eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.eq span {
  width: 3px; background: var(--accent); border-radius: 2px;
  animation: eqBounce 0.9s ease-in-out infinite;
}
.eq span:nth-child(1) { height: 6px; animation-delay: 0s; }
.eq span:nth-child(2) { height: 14px; animation-delay: 0.2s; }
.eq span:nth-child(3) { height: 9px; animation-delay: 0.4s; }
.eq span:nth-child(4) { height: 13px; animation-delay: 0.1s; }
@keyframes eqBounce { 0%,100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

/* spinners */
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-sm {
  width: 18px; height: 18px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner-sm.light { border-color: rgba(21,10,6,0.3); border-top-color: #150a06; }
@keyframes spin { to { transform: rotate(360deg); } }

/* toast */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); padding: 12px 20px; border-radius: 12px;
  font-size: 14px; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  animation: toastIn .3s ease; max-width: 90vw; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a414d; }