:root {
  --bg: #0b0e13;
  --panel: #141922;
  --panel-2: #1a202b;
  --line: #222a36;
  --ink: #eef1f5;
  --muted: #8a93a6;
  --live: #ff5a4c;
  --focus: #9fb2ff;

  --radius: 14px;
  --max: 1040px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: "Golos Text", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── каркас ───────────────────────────────────────────── */

.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.brand {
  font-family: "Unbounded", system-ui, sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.brand:hover { color: var(--focus); }

.top-note {
  color: var(--muted);
  font-size: 13px;
}

.view {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ── список эфиров ────────────────────────────────────── */

.head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 40px;
}

.head h1 {
  margin: 0;
  font-family: "Unbounded", system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.count {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.roster {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 22px 18px;
  border-radius: var(--radius);
  transition: background 140ms ease;
}

.row:hover { background: var(--panel); }

.who {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.name {
  font-family: "Unbounded", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.where {
  color: var(--muted);
  font-size: 14px;
}

.watchers {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.watchers .go {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}

.row:hover .go { border-color: var(--muted); }

/* индикатор сигнала — единственный «громкий» элемент страницы */
.meter {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 30px;
}

.meter i {
  display: block;
  width: 3px;
  height: 100%;
  background: var(--live);
  border-radius: 2px;
  transform-origin: bottom;
  animation: level 1.1s ease-in-out infinite;
  opacity: 0.9;
}

.meter i:nth-child(1) { animation-delay: -0.10s; }
.meter i:nth-child(2) { animation-delay: -0.55s; }
.meter i:nth-child(3) { animation-delay: -0.25s; }
.meter i:nth-child(4) { animation-delay: -0.80s; }
.meter i:nth-child(5) { animation-delay: -0.40s; }
.meter i:nth-child(6) { animation-delay: -0.65s; }
.meter i:nth-child(7) { animation-delay: -0.15s; }

@keyframes level {
  0%, 100% { transform: scaleY(0.25); }
  35%      { transform: scaleY(0.95); }
  60%      { transform: scaleY(0.5); }
}

/* ── пустое состояние ─────────────────────────────────── */

.empty[hidden] { display: none; }

.empty {
  margin: 0;
  padding: 34px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty strong {
  font-family: "Unbounded", system-ui, sans-serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.empty span { color: var(--muted); }

/* ── просмотр ─────────────────────────────────────────── */

.back {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 26px;
}

.back:hover { color: var(--ink); }

.watch-head { margin-bottom: 22px; }

.watch-head h1 {
  margin: 0 0 6px;
  font-family: "Unbounded", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.watch-meta {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.player {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
  padding: 24px;
}

.overlay[hidden] { display: none; }

.bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent);
  opacity: 0;
  transition: opacity 160ms ease;
}

.player:hover .bar,
.player:focus-within .bar { opacity: 1; }

.bar button {
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
}

.bar button:hover { background: rgba(255, 255, 255, 0.2); }

.bar input[type="range"] {
  width: 110px;
  accent-color: var(--focus);
  cursor: pointer;
}

.spacer { flex: 1; }

/* ── ссылка ───────────────────────────────────────────── */

.share {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.share input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
}

.share button {
  font: inherit;
  font-size: 14px;
  color: var(--bg);
  background: var(--ink);
  border: 0;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  white-space: nowrap;
}

.share button:hover { background: #fff; }

/* ── появление строк ──────────────────────────────────── */

.row {
  animation: rise 340ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .row, .meter i { animation: none; }
  .bar { transition: none; }
}

/* ── мобильный ────────────────────────────────────────── */

@media (max-width: 620px) {
  .view { padding-top: 38px; }
  .row {
    grid-template-columns: 30px 1fr;
    gap: 16px;
    padding: 18px 12px;
  }
  .watchers {
    grid-column: 2;
    font-size: 13px;
  }
  .meter { height: 24px; }
  .share { flex-direction: column; }
  .share button { width: 100%; }
}
