:root {
  --bg: #000;
  --surface-1: #141414;
  --surface-2: #1c1c1c;
  --surface-3: #262626;
  --label: #f5f5f5;
  --label-2: #a3a3a3;
  --label-3: #8e8e8e;
  --accent: #b3e90f;
  --accent-text: #d4f56a;
  --accent-fill: rgba(179, 233, 15, 0.16);
  --danger: #ff6961;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--label); }
body {
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.backdrop { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.backdrop img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0;
  filter: blur(60px) saturate(1.3) brightness(0.45); transform: scale(1.3);
  transition: opacity 1.2s ease;
}
.backdrop img.on { opacity: 1; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.85)); }

.player {
  position: relative; z-index: 1;
  max-width: 460px; margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 22px; min-height: 100dvh;
}
.top { display: flex; align-items: center; justify-content: space-between; }
/* The RadioOS sidebar wordmark (admin/src/App.css .sidebar__wordmark). */
.wordmark {
  margin: 0; display: flex; align-items: stretch; gap: 0.08em;
  font-family: "Arial Black", "SF Pro Display", Impact, sans-serif;
  font-size: 1.6rem; font-weight: 900; line-height: 0.8; letter-spacing: -0.035em; text-transform: uppercase;
}
.wordmark__words { display: flex; flex-direction: column; color: var(--accent); }
/* COAST spaced to the width of SOUTH so the words form a block. */
.wordmark__words > span:last-child { letter-spacing: 0.001em; margin-right: -0.036em; }
.wordmark__num { position: relative; width: 0.78em; color: #fff; }
.wordmark__num span {
  position: absolute; left: 50%; top: 50%; font-size: 0.86em; white-space: nowrap;
  transform: translate(-50%, -50%) rotate(90deg); letter-spacing: -0.05em; line-height: 1;
}
.wordmark--big { font-size: clamp(2.6rem, 13vw, 4rem); }
.badge {
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--surface-3); color: var(--label-2);
}
.badge.live { background: var(--accent-fill); color: var(--accent-text); }
.badge.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; animation: pulse 1.6s ease-in-out infinite; }
.badge.warn { background: rgba(255,105,97,.16); color: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }

.now { text-align: center; }
.cover {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  background: var(--surface-1); box-shadow: 0 20px 50px rgba(0,0,0,.55);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .cover__fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.cover .cover__fallback[hidden] { display: none; }
.show { margin: 18px 0 2px; font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-text); min-height: 19px; }
.song { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.artist { margin: 4px 0 0; font-size: 17px; color: var(--label-2); overflow-wrap: anywhere; }

.controls { display: flex; align-items: center; justify-content: center; gap: 22px; }
.play {
  position: relative; width: 76px; height: 76px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #000; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(179,233,15,.25); transition: transform .12s ease;
}
.play:active { transform: scale(.95); }
.play:focus-visible { outline: 3px solid var(--label); outline-offset: 3px; }
.play svg { width: 34px; height: 34px; fill: currentColor; }
.play .i-stop, .play .spinner { display: none; }
.play.playing .i-play { display: none; }
.play.playing .i-stop { display: block; }
.play.loading .i-play, .play.loading .i-stop { display: none; }
.play.loading .spinner {
  display: block; width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(0,0,0,.25); border-top-color: #000; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.volume { display: flex; align-items: center; gap: 8px; color: var(--label-2); }
.volume svg { width: 22px; height: 22px; fill: currentColor; }
.volume input { width: 120px; accent-color: var(--accent); }
.volume.hide { display: none; }

.next {
  display: flex; gap: 10px; align-items: baseline; padding: 12px 14px; border-radius: 12px;
  background: rgba(28,28,28,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--label-3); white-space: nowrap; }
#next { color: var(--label); overflow-wrap: anywhere; }

.recent h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--label-3); margin: 0 0 8px; }
.recent ol { list-style: none; margin: 0; padding: 0; border-radius: 12px; overflow: hidden; background: rgba(20,20,20,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.recent li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.06); }
.recent li:first-child { border-top: 0; }
.recent img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: var(--surface-2); flex: none; }
.recent .t { min-width: 0; flex: 1; }
.recent .t b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent .t span { display: block; color: var(--label-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent time { color: var(--label-3); font-size: 12px; font-variant-numeric: tabular-nums; }

.foot { margin-top: auto; display: flex; justify-content: space-between; color: var(--label-3); font-size: 12px; }
@media (min-width: 900px) { .player { padding-top: 40px; } }
