/* Radio.Sh — стили. Цвета, шрифты и пропорции взяты из макета Claude Design. */
:root {
  --bg: oklch(0.14 0.008 60);
  --panel: oklch(0.17 0.01 60 / 0.94);
  --fg: oklch(0.96 0.008 85);
  --fg-2: oklch(0.88 0.008 85);
  --muted: oklch(0.86 0.008 85);
  --muted-2: oklch(0.8 0.008 85);
  --dim: oklch(0.78 0.008 85);
  --chip: oklch(0.96 0.008 85 / 0.08);
  --chip-hover: oklch(0.96 0.008 85 / 0.18);
  --line: oklch(0.96 0.008 85 / 0.12);
  --accent: oklch(0.86 0.09 190);
  --accent-hover: oklch(0.95 0.05 190);
  --live: oklch(0.7 0.17 25);
  --sans: Archivo, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body { color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@keyframes sh-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
@keyframes sh-spin { to { transform: rotate(360deg); } }

.app { position: relative; min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.viz { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.vignette {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 60% at 50% 45%, oklch(0.14 0.008 60 / 0.88) 0%, oklch(0.14 0.008 60 / 0.55) 45%, oklch(0.14 0.008 60 / 0) 75%);
}
.shell { position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding: clamp(16px, 3vw, 28px); }

/* шапка */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.menu { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 48px; height: 48px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--chip); cursor: pointer; }
.menu:hover { background: var(--chip-hover); }
.menu span { display: block; height: 2px; background: var(--fg); }
.status { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: sh-pulse 2.2s ease-in-out infinite; }
.dot.idle { background: oklch(0.6 0.01 85); animation: none; }

/* сцена */
.stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(14px, 2.4vw, 22px); padding: clamp(24px, 5vw, 48px) 0; text-align: center; }
.cover { width: clamp(150px, 22vw, 240px); height: clamp(150px, 22vw, 240px); border-radius: 50%; padding: 10px; background: oklch(0.96 0.008 85 / 0.07); box-shadow: 0 24px 80px oklch(0.1 0 0 / 0.55); }
.cover-inner {
  position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, oklch(0.3 0.02 60) 0 6px, oklch(0.24 0.02 60) 6px 12px);
}
.cover-inner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-ph { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: oklch(0.72 0.01 85); }
.cover.spinning .cover-inner { animation: sh-spin 30s linear infinite; }

.meta { margin: 0; min-height: 1.2em; font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted-2); }
.brand { margin: 0; font-weight: 900; font-size: clamp(34px, 7vw, 84px); line-height: 0.94; letter-spacing: -0.04em; }
.tagline { margin: 0; font-weight: 500; font-size: clamp(15px, 2vw, 22px); letter-spacing: -0.01em; color: var(--fg-2); }

/* сейчас играет */
.now { display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(560px, 100%); margin-top: clamp(4px, 1vw, 10px); }
.now-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); }
.now-title { max-width: 100%; font-weight: 700; font-size: clamp(17px, 2.2vw, 24px); line-height: 1.2; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-artist { max-width: 100%; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-artist:empty { display: none; }
.progress { width: min(320px, 80%); height: 3px; margin-top: 4px; border-radius: 2px; overflow: hidden; background: var(--line); }
.progress-bar { width: 100%; height: 100%; background: var(--fg); opacity: 0.7; transform: scaleX(0); transform-origin: left center; }

/* громкость */
.volume { display: flex; align-items: center; gap: 14px; width: min(760px, 100%); margin-top: clamp(10px, 2vw, 18px); }
.round-btn { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--chip); font-size: 16px; cursor: pointer; }
.round-btn:hover { background: var(--chip-hover); }
.vol-label { flex: 0 0 auto; min-width: 56px; text-align: right; font-family: var(--mono); font-size: 14px; font-weight: 500; }
input[type=range] { flex: 1; height: 24px; cursor: pointer; -webkit-appearance: none; appearance: none; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: oklch(0.4 0.01 60); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: oklch(0.97 0.008 85); box-shadow: 0 2px 10px oklch(0.1 0 0 / 0.5); cursor: pointer; }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: oklch(0.4 0.01 60); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: oklch(0.97 0.008 85); cursor: pointer; }

/* кнопки управления */
.controls { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 4vw, 44px); margin-top: clamp(12px, 2.4vw, 22px); }
.side-btn { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 88px; padding: 8px 0; border: 0; background: transparent; color: oklch(0.9 0.008 85); cursor: pointer; }
.side-btn:hover { color: oklch(1 0 0); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.bars i { display: block; width: 4px; border-radius: 2px; background: currentColor; }
.swatch { display: block; width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(oklch(0.7 0.15 190), oklch(0.65 0.17 330), oklch(0.75 0.14 100), oklch(0.7 0.15 150), oklch(0.7 0.15 190)); }
.side-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.play {
  display: flex; align-items: center; justify-content: center;
  width: clamp(84px, 13vw, 120px); height: clamp(84px, 13vw, 120px);
  border: 0; border-radius: 50%; background: var(--fg); color: var(--bg);
  font-size: clamp(26px, 4vw, 36px); line-height: 1; cursor: pointer;
  box-shadow: 0 16px 50px oklch(0.1 0 0 / 0.5); transition: transform 0.16s;
}
.play:hover { transform: scale(1.05); }
.play:active { transform: scale(0.97); }

.foot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }

/* панель «О станции» */
.about {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 10;
  width: min(440px, 92vw); padding: clamp(20px, 3vw, 34px); overflow-y: auto;
  background: var(--panel); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-left: 1px solid var(--line); box-shadow: -30px 0 80px oklch(0.1 0 0 / 0.5);
  transform: translateX(104%); transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.about.open { transform: translateX(0); }
.about-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.kicker { margin: 0; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); }
.kicker.section { margin: 34px 0 14px; }
.about-lead { margin: 0 0 20px; font-weight: 700; font-size: clamp(22px, 3vw, 30px); line-height: 1.25; letter-spacing: -0.03em; text-wrap: pretty; }
.about-text { margin: 0 0 18px; font-size: 15px; line-height: 1.7; color: oklch(0.85 0.008 85); text-wrap: pretty; }
.about-text.small { margin-bottom: 10px; font-size: 13px; }

.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.history li { display: flex; align-items: center; gap: 12px; min-width: 0; }
.history img, .history .h-ph {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 8px; object-fit: cover;
  background: repeating-linear-gradient(135deg, oklch(0.3 0.02 60) 0 4px, oklch(0.24 0.02 60) 4px 8px);
}
.h-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.h-title { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-sub { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-empty { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }

.stream-row { display: flex; align-items: stretch; gap: 8px; }
.stream-url { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; background: oklch(0.96 0.008 85 / 0.06); font-family: var(--mono); font-size: 11.5px; color: var(--muted); overflow-x: auto; white-space: nowrap; }
.copy-btn { flex: 0 0 auto; padding: 0 12px; border: 0; border-radius: 10px; background: var(--chip); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
.copy-btn:hover { background: var(--chip-hover); }

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
  .cover.spinning .cover-inner { animation: none; }
  .about, .play { transition: none; }
}
