:root {
  --bg: #0b0b14; --panel: #151526; --panel-2: #1d1d33; --line: #2a2a45;
  --text: #f3f3fb; --muted: #a3a3bf;
  --kids: #ffcc33; --teen: #33d6c2; --adult: #ff5c7a; --brand: #8a7bff;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--brand); }
img { max-width: 100%; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

header.top { position: sticky; top: 0; z-index: 10; background: rgba(11,11,20,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: .02em; color: var(--text); text-decoration: none; }
.logo span { color: var(--brand); }
nav.links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn { display: inline-block; border: 0; border-radius: 999px; padding: 10px 20px; font: inherit; font-weight: 700;
  background: var(--brand); color: #0b0b14; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.small { padding: 6px 14px; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: default; }

.hero { padding: 72px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; margin: 0 0 16px; }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 620px; margin: 0 auto 28px; }

.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; padding: 24px 0 64px; }
.channel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  border-top: 5px solid var(--c, var(--brand)); }
.channel h2 { margin: 0 0 6px; }
.channel .tag { color: var(--muted); margin: 0 0 14px; }
.channel .onair { font-size: .92rem; color: var(--muted); }
.channel .onair b { color: var(--text); }
.channel.kids { --c: var(--kids); } .channel.teen { --c: var(--teen); } .channel.adult { --c: var(--adult); }
.channel.locked { opacity: .45; }
.channel button { margin-top: 14px; background: var(--c); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; max-width: 440px; margin: 48px auto; }
.card h1 { margin: 0 0 6px; font-size: 1.6rem; }
.card .sub { color: var(--muted); margin: 0 0 22px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input, select { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; }
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); }
.check input { width: auto; margin-top: 4px; }
.form-actions { margin-top: 22px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.msg { min-height: 1.5em; margin: 14px 0 0; }
.msg.error { color: #ff8b9e; } .msg.ok { color: #7ee2a8; }
.fine { color: var(--muted); font-size: .9rem; }

.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; margin: 28px 0; }
.profile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  text-align: center; cursor: pointer; color: var(--text); font: inherit; }
.profile:hover, .profile:focus-visible { border-color: var(--brand); }
.avatar { width: 84px; height: 84px; border-radius: 22px; margin: 0 auto 10px; display: grid; place-items: center;
  font-size: 2.2rem; font-weight: 800; color: #0b0b14; background: var(--c, var(--brand)); }
.profile.kids { --c: var(--kids); } .profile.teen { --c: var(--teen); } .profile.adult { --c: var(--adult); }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--panel-2); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.player { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.live { position: absolute; top: 14px; left: 14px; background: #e5243b; color: #fff; font-weight: 800;
  font-size: .8rem; padding: 4px 10px; border-radius: 6px; letter-spacing: .08em; }
.now-playing { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 0; }
.now-playing h2 { margin: 0; } .now-playing p { margin: 4px 0 0; color: var(--muted); }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.6); text-align: center; padding: 20px; }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; width: min(420px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.6); }

footer { border-top: 1px solid var(--line); color: var(--muted); padding: 28px 0; font-size: .9rem; }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
.hidden { display: none !important; }
.accent { color: var(--brand); }
#doc { max-width: 760px; }
