:root {
  color-scheme: dark;
  --radio-bg: #06090e;
  --radio-panel: #0d131c;
  --radio-panel-bright: #121b27;
  --radio-line: #263140;
  --radio-text: #f6f8fb;
  --radio-muted: #94a1b1;
  --radio-green: #b4ff3f;
  --radio-blue: #51d9ff;
  --radio-red: #ff5964;
  --radio-shadow: rgba(0, 0, 0, .45);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--radio-bg); }

.player-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--radio-text);
  background:
    linear-gradient(rgba(81, 217, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(81, 217, 255, .025) 1px, transparent 1px),
    radial-gradient(circle at 18% 12%, rgba(180, 255, 63, .09), transparent 26rem),
    radial-gradient(circle at 88% 28%, rgba(81, 217, 255, .08), transparent 30rem),
    var(--radio-bg);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  font-size: 1rem;
  line-height: 1.5;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.player-header,
.player-main,
.player-footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.player-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.station-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--radio-text);
  text-decoration: none;
}

.station-brand > span:last-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
  letter-spacing: .08em;
}

.station-brand strong { font-size: 1.05rem; }
.station-brand small { color: var(--radio-green); font-size: .88rem; font-weight: 850; letter-spacing: .16em; }

.station-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(180, 255, 63, .55);
  background: var(--radio-green);
  color: #091006;
  box-shadow: 6px 6px 0 rgba(81, 217, 255, .15);
  font-weight: 950;
  letter-spacing: -.08em;
}

.on-air-badge {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 13px;
  border: 1px solid var(--radio-line);
  background: rgba(13, 19, 28, .8);
  color: var(--radio-muted);
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .13em;
}

.on-air-badge i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--radio-muted);
}

.on-air-badge.online { color: var(--radio-text); border-color: rgba(180, 255, 63, .4); }
.on-air-badge.online i { background: var(--radio-green); box-shadow: 0 0 0 5px rgba(180, 255, 63, .1); }
.on-air-badge.offline i { background: var(--radio-red); }

.player-main { padding: 28px 0 72px; }

.broadcast-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(270px, .78fr) minmax(0, 1.35fr);
  min-height: 470px;
  overflow: hidden;
  border: 1px solid var(--radio-line);
  background: linear-gradient(135deg, rgba(18, 27, 39, .98), rgba(9, 14, 21, .98));
  box-shadow: 0 30px 90px var(--radio-shadow);
}

.broadcast-panel::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 96px;
  height: 5px;
  content: "";
  background: var(--radio-green);
}

.signal-stage {
  position: relative;
  min-height: 470px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid var(--radio-line);
  background:
    linear-gradient(145deg, rgba(180, 255, 63, .17), transparent 42%),
    repeating-linear-gradient(135deg, transparent 0 20px, rgba(81, 217, 255, .05) 20px 21px),
    #0a1018;
}

.stage-label {
  position: relative;
  z-index: 1;
  color: var(--radio-text);
  font-size: clamp(2.4rem, 5vw, 5rem);
  font-weight: 950;
  line-height: .85;
  letter-spacing: -.07em;
  text-shadow: 7px 7px 0 rgba(81, 217, 255, .13);
}

.stage-label::first-line { color: var(--radio-green); }

.equalizer {
  position: absolute;
  right: 30px;
  bottom: 28px;
  left: 30px;
  height: 76px;
  display: flex;
  align-items: end;
  gap: 7px;
  opacity: .75;
}

.equalizer i {
  flex: 1;
  height: 35%;
  background: linear-gradient(to top, var(--radio-green), var(--radio-blue));
  transform-origin: bottom;
  animation: signal 1s ease-in-out infinite alternate;
  animation-play-state: paused;
}

.stream-playing .equalizer i { animation-play-state: running; }
.equalizer i:nth-child(2) { height: 72%; animation-delay: -.35s; }
.equalizer i:nth-child(3) { height: 48%; animation-delay: -.72s; }
.equalizer i:nth-child(4) { height: 92%; animation-delay: -.18s; }
.equalizer i:nth-child(5) { height: 58%; animation-delay: -.54s; }
.equalizer i:nth-child(6) { height: 80%; animation-delay: -.9s; }
.equalizer i:nth-child(7) { height: 42%; animation-delay: -.44s; }

@keyframes signal {
  from { transform: scaleY(.35); opacity: .55; }
  to { transform: scaleY(1); opacity: 1; }
}

.broadcast-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 6vw, 76px);
}

.broadcast-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--radio-muted);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .13em;
}

.broadcast-meta > span:first-child { color: var(--radio-green); }
.broadcast-meta strong { color: var(--radio-text); font-size: 1rem; }

.broadcast-copy h1 {
  max-width: 760px;
  margin: 28px 0 10px;
  overflow-wrap: anywhere;
  font-size: clamp(2rem, 4.4vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.station-name { margin: 0; color: var(--radio-muted); font-size: 1rem; }

.player-controls {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
}

.play-toggle {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--radio-green);
  border-radius: 0;
  padding: 13px 24px;
  cursor: pointer;
  background: var(--radio-green);
  color: #081006;
  box-shadow: 7px 7px 0 rgba(81, 217, 255, .16);
  font-weight: 900;
  transition: transform .15s ease, box-shadow .15s ease;
}

.play-toggle:hover { transform: translate(-2px, -2px); box-shadow: 9px 9px 0 rgba(81, 217, 255, .2); }
.play-toggle:active { transform: translate(2px, 2px); box-shadow: 3px 3px 0 rgba(81, 217, 255, .14); }
.play-icon { width: 18px; }

.volume-control {
  min-width: 180px;
  display: grid;
  gap: 7px;
  color: var(--radio-muted);
  font-size: .82rem;
  font-weight: 750;
  letter-spacing: .08em;
}

.volume-control input { width: 100%; accent-color: var(--radio-green); cursor: pointer; }

.playback-status { min-height: 24px; margin: 18px 0 0; color: var(--radio-muted); font-size: .88rem; }

.history-panel {
  margin-top: 22px;
  border: 1px solid var(--radio-line);
  background: rgba(9, 14, 21, .9);
}

.history-heading {
  min-height: 112px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 30px;
  border-bottom: 1px solid var(--radio-line);
}

.section-kicker { color: var(--radio-blue); font-size: .78rem; font-weight: 850; letter-spacing: .16em; }
.history-heading h2 { margin: 5px 0 0; font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -.03em; }
.history-heading > span { color: var(--radio-muted); font-size: .88rem; }

.history-list { margin: 0; padding: 0; list-style: none; }

.history-item {
  min-height: 82px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--radio-line);
}

.history-item:last-child { border-bottom: 0; }
.history-item:hover { background: rgba(180, 255, 63, .025); }

.history-number {
  align-self: stretch;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--radio-line);
  color: #657285;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.history-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 16px 24px;
}

.history-copy strong { overflow-wrap: anywhere; font-size: 1rem; }
.history-copy time { flex: 0 0 auto; color: var(--radio-muted); font-size: .88rem; }

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 48px 24px;
  text-align: center;
  color: var(--radio-muted);
}

.history-empty strong { color: var(--radio-text); font-size: 1.1rem; }

.player-footer {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--radio-line);
  color: var(--radio-muted);
  font-size: .88rem;
}

.player-footer span { color: var(--radio-text); font-weight: 850; letter-spacing: .12em; }
.player-footer a { color: var(--radio-green); font-weight: 750; text-underline-offset: 4px; }

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(81, 217, 255, .65);
  outline-offset: 3px;
}

@media (max-width: 780px) {
  .player-header, .player-main, .player-footer { width: min(100% - 28px, 680px); }
  .player-header { min-height: 76px; }
  .station-brand > span:last-child { align-items: start; flex-direction: column; gap: 0; line-height: 1.1; }
  .broadcast-panel { grid-template-columns: 1fr; }
  .signal-stage { min-height: 260px; border-right: 0; border-bottom: 1px solid var(--radio-line); }
  .broadcast-copy { padding: 30px 22px 34px; }
  .broadcast-copy h1 { margin-top: 22px; }
  .player-controls { align-items: stretch; flex-direction: column; }
  .play-toggle { width: 100%; }
  .volume-control { min-width: 0; }
  .history-heading { min-height: 96px; align-items: start; flex-direction: column; gap: 7px; padding: 22px; }
  .history-copy { align-items: start; flex-direction: column; gap: 5px; padding: 15px 18px; }
  .player-footer { align-items: start; flex-direction: column; justify-content: center; gap: 5px; padding-block: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
