:root {
  --bg: #140b08;
  --ink: #f7ead7;
  --muted: #c9b59c;
  --gold: #e8b04b;
  --radius: 22px;
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 20% 0%, #3a160c 0, transparent 45%),
    radial-gradient(circle at 90% 100%, #1d1433 0, transparent 40%),
    var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.25rem 2rem;
}

.brand-row { display: flex; align-items: baseline; gap: .5rem; }
.motto { margin: .1rem 0 0; font-size: .85rem; font-style: italic; color: var(--muted); }
.brand-name { font-family: "Playfair Display", serif; font-weight: 800; font-size: 2rem; color: var(--gold); }
.brand-sub { letter-spacing: .35em; text-transform: uppercase; font-size: .8rem; color: var(--muted); }
.tagline { margin: 0; color: var(--muted); flex: 1 1 260px; }

.visitor {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .9rem;
  border: 1px dashed var(--gold);
  border-radius: 10px;
  background: rgba(232, 176, 75, .08);
}
.visitor-label { font-size: .8rem; color: var(--muted); }
.visitor-number { font-family: "Playfair Display", serif; font-size: 1.35rem; color: var(--gold); font-variant-numeric: tabular-nums; }

.stations {
  flex: 1;
  display: flex;
  gap: 1rem;
  padding: 0 2rem 1rem;
  min-height: 70vh;
}

.station {
  --c1: #b6461b;
  --c2: #5a1a0c;
  flex: 1;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  outline: none;
  background: linear-gradient(165deg, var(--c1), var(--c2));
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
  transition: flex .6s ease, opacity .5s ease, filter .5s ease, transform .5s ease;
}
.station[data-key="bollywood"] { --c1: #c2185b; --c2: #4a0a2a; }
.station[data-key="jazz"] { --c1: #1f4e8c; --c2: #0c1430; }

.station::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 14px);
  pointer-events: none;
}

.station:focus-visible { box-shadow: 0 0 0 3px var(--gold), 0 20px 50px rgba(0, 0, 0, .45); }

.stations.has-active .station { opacity: .3; filter: grayscale(.7) blur(.5px); transform: scale(.97); }
.stations.has-active .station.active { flex: 1.8; opacity: 1; filter: none; transform: none; }
.stations.has-active .station:not(.active):hover { opacity: .6; }

.station-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  gap: .6rem;
}

.title { margin: 0; font-family: "Playfair Display", serif; font-size: 1.6rem; }
.blurb { margin: 0; max-width: 26ch; color: rgba(255, 255, 255, .75); font-weight: 300; }

.disc {
  width: 150px;
  aspect-ratio: 1;
  margin: 1rem 0 .5rem;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--gold) 0 14%, #111 14.5% 16%, transparent 16.5%),
    repeating-radial-gradient(circle, #151515 0 2px, #222 2px 4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), inset 0 0 0 6px #0b0b0b;
  display: grid;
  place-items: center;
}
.disc span { width: 8px; height: 8px; border-radius: 50%; background: #111; }
.station.playing .disc { animation: spin 3.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.now {
  margin: 0;
  min-height: 2.6em;
  max-width: 34ch;
  font-size: .95rem;
  color: rgba(255, 255, 255, .85);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.seek, .times, .controls { visibility: hidden; }
.station.active .seek, .station.active .times, .station.active .controls { visibility: visible; }

.seek {
  --p: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: min(320px, 90%);
  height: 18px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--gold) var(--p), rgba(255, 255, 255, .2) var(--p));
}
.seek::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .2); }
.seek::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--gold); }
.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px var(--gold);
}
.seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--gold); }
.times { width: min(320px, 90%); display: flex; justify-content: space-between; font-size: .75rem; color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; }

.controls { display: flex; align-items: center; gap: 1rem; margin-top: .25rem; }
.ctl {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.ctl:hover { background: rgba(255, 255, 255, .25); }
.ctl:active { transform: scale(.94); }
.ctl svg { width: 22px; height: 22px; fill: currentColor; }
.ctl.play { width: 64px; height: 64px; background: var(--gold); color: #2a1406; }
.ctl.play svg { width: 28px; height: 28px; }
.ctl .i-pause, .station.playing .ctl .i-play { display: none; }
.station.playing .ctl .i-pause { display: block; }

.slot { display: none; width: 200px; height: 200px; margin: 1rem 0 .5rem; flex: none; }
.station.active .slot { display: block; }
.station.active .disc { display: none; }

/* YouTube's terms require the embedded player to stay visible and at least 200x200.
   app.js positions it over the .slot of the active station. */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .6), 0 0 0 2px rgba(232, 176, 75, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
}
.screen.show { opacity: 1; pointer-events: auto; }
.screen iframe { width: 100%; height: 100%; }
.probe { position: fixed; left: -10000px; top: 0; width: 200px; height: 200px; pointer-events: none; }

.foot { padding: 1rem 2rem 1.5rem; font-size: .75rem; color: var(--muted); opacity: .7; }

@media (max-width: 820px) {
  .topbar { padding: 1rem; }
  .stations { flex-direction: column; padding: 0 1rem 1rem; }
  .station-inner { padding: 1.25rem 1rem; }
  .stations.has-active .station:not(.active) .disc,
  .stations.has-active .station:not(.active) .blurb { display: none; }
  .disc { width: 110px; }
}
