/* Frenzy Radio · neon surfaces, bounded paint and a proper turntable. */
:root { color-scheme: dark; --pink: #ff40d6; --cyan: #60f5e6; --muted: #aaa2bc; }
body {
  min-height: 100dvh;
  background: radial-gradient(ellipse at 50% 4%, #261032 0, transparent 54%),
    radial-gradient(ellipse at 95% 75%, #0d2430 0, transparent 48%), #080913;
}
body::before, body::after { display: none; }
/* Stars move only on air; the ambient light is a static painted texture. */
#ambientStars {
  position: fixed; inset: -48px; z-index: 0; pointer-events: none; opacity: .19;
  background-image:
    radial-gradient(circle at 18px 24px, #c9e4ffbd 0 1px, transparent 1.8px),
    radial-gradient(circle at 92px 76px, #ffb3ed99 0 1.3px, transparent 2px),
    radial-gradient(circle at 148px 132px, #73ffe082 0 1px, transparent 1.8px),
    radial-gradient(circle at 44px 156px, #d4c6ff80 0 1px, transparent 2px);
  background-size: 197px 213px, 311px 293px, 379px 337px, 457px 421px;
  animation: sky-drift 32s linear infinite alternate paused;
  transition: opacity .9s;
}
@keyframes sky-drift { from { transform: translate3d(-22px, 28px, 0); } to { transform: translate3d(28px, -35px, 0); } }
body.stream-online #ambientStars { opacity: .65; animation-play-state: running; will-change: transform; }
html.performance-lite #ambientStars { animation-duration: 65s; }
#beatOverlay.live-aura {
  display: block; position: fixed; top: 45%; left: 50%; width: min(92vw, 1000px);
  height: min(84vh, 700px); z-index: 0; pointer-events: none;
  transform: translate(-50%, -50%); opacity: 0;
  background: radial-gradient(ellipse closest-side at 36% 46%, #ff00c48c, #b619cf38 40%, transparent 100%),
    radial-gradient(ellipse closest-side at 68% 60%, #21e9e675, #1e82df28 40%, transparent 100%);
}
body.stream-online #beatOverlay.live-aura { opacity: .46; }
html.performance-lite #beatOverlay.live-aura { display: block; width: min(92vw, 760px); height: min(78vh, 580px); }
body.visuals-sleeping #ambientStars { animation-play-state: paused; }
body.visuals-sleeping #beatOverlay.live-aura { opacity: 0 !important; }
.container { width: 100%; max-width: 1540px; padding: 32px 28px 40px; }
.station-header { text-align: center; margin-bottom: 28px; }
.station-header h1 {
  display: flex; justify-content: center; align-items: center; gap: clamp(12px, 2vw, 24px);
  font-size: clamp(1.5rem, 4.6vw, 3.8rem); line-height: 1.2;
  letter-spacing: .06em; margin: 0 0 12px; animation: none; text-shadow: none;
}
.station-icon { width: clamp(42px, 5.4vw, 72px); height: auto; flex: 0 0 auto; }
.station-wordmark { display: inline-block; white-space: nowrap; font-style: italic; }
.word-frenzy {
  display: inline-block; padding-inline-end: .14em; margin-inline-end: -.14em;
  color: #ffe6fa; background: linear-gradient(170deg, #fff9ff 20%, #ffb0e7 100%);
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.word-radio { color: #92e9e5; font-weight: 700; }
body.stream-online .station-wordmark { text-shadow: 0 0 25px #ff32d44a; }
body.stream-online .word-radio { text-shadow: 0 0 22px #61fff64a; }
.station-caption { color: #d0b8db; font: 10px/1.5 'Orbitron', sans-serif; letter-spacing: .24em; }
.station-caption::before, .station-caption::after { content: ' // '; color: var(--pink); }
.grid-container { gap: 20px; align-items: start; }
.chat-column, .main-column, .history-column {
  background: linear-gradient(155deg, #1b1024f2, #0c101df5 52%, #100c1bf5);
  backdrop-filter: none; padding: 20px; border-radius: 18px;
  border: 1px solid #e55adc30;
  box-shadow: 0 12px 32px #03030a66, 0 0 24px #ff00cc0b;
}
.main-column { border-color: #ff40d661; padding: 24px 22px 16px; position: relative; }
body.stream-online .main-column { border-color: #ff59dba6; box-shadow: 0 0 36px #ff18ca24, 0 14px 36px #03030a66; }
body.stream-online .chat-column, body.stream-online .history-column { border-color: #c961e750; box-shadow: 0 0 28px #b02ce915, 0 12px 32px #03030a66; }
.main-column::before {
  content: ''; position: absolute; left: 22%; right: 22%; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #ff61df, transparent);
}
.deck-heading { align-self: stretch; display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.deck-heading .status { margin: 0; font-size: 12px; color: var(--muted); font-weight: 400; }
.onair { text-shadow: 0 0 10px #ff00cc60; }
.listeners { font-size: 12px; align-self: flex-start; color: var(--muted); margin-top: -14px; }
.nowplaying { background: #08091280; backdrop-filter: none; border: 1px solid #c195ff1c; border-radius: 12px; margin: 20px 0 10px; padding: 16px 14px; }
.nowplaying strong { color: #baafc9; font-size: 10px; text-transform: uppercase; letter-spacing: .17em; font-weight: 400; }
#currentTrack { color: #ffd2f5; font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; text-wrap: pretty; }
.play-button { font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 14px; letter-spacing: .06em; padding: 17px 20px; border-radius: 12px; transition: transform .18s, background .18s; }
.play-button.play { background: linear-gradient(110deg, #40f9be, #12d89d); color: #06231d; box-shadow: 0 0 22px #21ffc329; }
.play-button.stop { background: linear-gradient(110deg, #ff53c8, #e8318e); color: #230a21; }
.play-button.playing { animation: none; box-shadow: 0 0 22px #ff40d62b; }
.play-button:hover { transform: translateY(-2px); }
.play-button:active { transform: translateY(1px); }
.play-button.offline { background: #252234; color: #c0b8ce; opacity: 1; font-family: Arial, sans-serif; letter-spacing: 0; }
.volume-wrapper { background: transparent; border-color: transparent; padding: 9px 4px; gap: 12px; }
.volume-value { font-variant-numeric: tabular-nums; color: #b6abc6; }
.volume-slider { min-width: 0; }
.turntable { width: 100%; max-width: 520px; position: relative; aspect-ratio: 1.36; contain: layout paint; margin: 4px 0 0; }
#visualizer { position: absolute; inset: 0; transform: none; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.telegram-buttons { margin: 12px 0 2px; padding-top: 16px; border-top: 1px solid #b49acd20; gap: 8px; }
.tg-row { width: 100%; gap: 8px; }
.tg-btn, .tg-btn-peeper { border-radius: 9px; background: #ffffff04; font-size: 11px; padding: 11px 8px; min-height: 38px; transition: border-color .18s, background .18s; }
.tg-btn { flex: 1; border-color: #c6a0da35; }
.tg-btn-peeper { border-color: #50c86440; color: #bbdfc0; }
.tg-btn:hover, .tg-btn-peeper:hover { transform: none; box-shadow: none; background: #ffffff09; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-heading h2 { font-size: 16px; margin: 0; color: #ffacec; }
.panel-heading span { color: #a99ab8; font: 9px/1.4 'Orbitron', sans-serif; letter-spacing: .08em; }
.history-column .history { min-height: 0; }
#historyList { display: block; flex: initial; max-height: 660px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #904279 transparent; }
.history-list .history-day { padding: 0 0 14px; border: 0; }
.history-day h3 { position: sticky; top: 0; z-index: 1; margin: 0; padding: 11px 0 9px; background: #151020; color: var(--cyan); font-size: 10px; font-weight: 700; letter-spacing: .07em; border-bottom: 1px solid #60f5e625; }
.history-day ul { list-style: none; padding: 0; margin: 0; }
.history-track { display: grid; grid-template-columns: 39px minmax(0, 1fr); align-items: baseline; gap: 9px; padding: 11px 0; border-bottom: 1px solid #c6a0da13; font-size: 12px; line-height: 1.5; color: #e0d5e9; }
.history-track time { color: #a69bb8; font: 10px/1.5 ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
.history-track span { overflow-wrap: anywhere; }
.history-track:first-child { color: #ffe0f8; }
.history-empty { color: var(--muted); font-size: 13px; padding: 16px 0; }
.history-toggle { display: none; }
.chat-header h3 { color: #ffacec; font-size: 16px; }
.chat-messages { scrollbar-width: thin; scrollbar-color: #904279 transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
/* Off air is deliberately quiet: dark surfaces, no neon spill or glowing edges. */
body:not(.stream-online) { background: #020309; }
body:not(.stream-online) #ambientStars { opacity: .045; }
body:not(.stream-online) #beatOverlay.live-aura { display: none; opacity: 0; }
body:not(.stream-online) .chat-column,
body:not(.stream-online) .main-column,
body:not(.stream-online) .history-column { background: #090b14; border-color: #252533; }
body:not(.stream-online) .container,
body:not(.stream-online) .container * { box-shadow: none !important; text-shadow: none !important; }
body:not(.stream-online) .main-column::before { opacity: 0; }
body:not(.stream-online) .station-header { opacity: .68; }
body:not(.stream-online) .turntable { opacity: .42; }
body:not(.stream-online) .history-day h3 { background: #090b14; border-color: #252533; }
body:not(.stream-online) .volume-slider::-webkit-slider-thumb { box-shadow: none; }
body:not(.stream-online) .volume-slider::-moz-range-thumb { box-shadow: none; }
@media (min-width: 1100px) { .grid-container { grid-template-columns: minmax(0, 1fr) minmax(0, 1.24fr) minmax(0, .84fr); } }
@media (min-width: 900px) and (max-width: 1099px) {
  .container { padding: 28px 16px; }
  .grid-container { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, .85fr); gap: 12px; }
  .chat-column, .main-column, .history-column { padding: 14px; }
  .tg-row { flex-direction: column; }
}
@media (max-width: 899px) {
  .container { max-width: 600px; padding: 24px 16px 32px; }
  .station-header { margin-bottom: 22px; }
  .station-header h1 { font-size: clamp(1.1rem, 5.1vw, 2.3rem); letter-spacing: .03em; white-space: nowrap; gap: 12px; }
  .station-icon { width: clamp(34px, 9vw, 48px); }
  .station-caption { font-size: 8px; letter-spacing: .16em; }
  .main-column { padding: 20px 18px 16px; }
  .turntable { max-width: 380px; aspect-ratio: 1.45; }
  .tg-row { flex-direction: row; }
  .history-heading { display: none; }
  .history-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; margin: 0; padding: 0; min-height: 32px; border: 0; border-radius: 0; background: transparent; color: #ffacec; font: 700 16px Arial, sans-serif; }
  .history-toggle::after { content: '+'; color: var(--cyan); font-size: 24px; font-weight: 400; }
  .history-toggle[aria-expanded="true"]::after { content: '−'; }
  #historyList { max-height: 0; overflow: hidden; transition: none; }
  #historyList.open { max-height: 520px; overflow-y: auto; margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .play-button, .tg-btn, .tg-btn-peeper { transition: none; }
  #ambientStars { animation: none; transition: none; }
  #beatOverlay.live-aura { transition: none; }
  body.stream-online #beatOverlay.live-aura { opacity: .46 !important; }
  body.visuals-sleeping #beatOverlay.live-aura { opacity: 0 !important; }
}
