:root {
  --bg: #0b0b0d;
  --panel: #131317;
  --panel-2: #1b1b21;
  --line: #26262e;
  --text: #ececf1;
  --muted: #8b8b98;
  --red: #e5193a;
  --red-dim: #9e1029;
  --kick: #53fc18;
  --radius: 10px;
  --side: 232px;
  --top: 56px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.wordmark {
  font-family: "Rubik Mono One", "Archivo Black", Impact, sans-serif;
  color: var(--red);
  letter-spacing: .02em;
  font-size: 19px;
  text-shadow: 0 0 1px #ff6b81;
}

/* ---- top bar ---- */
.top {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 20;
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.burger { background: none; border: 0; padding: 6px; font-size: 18px; }
.search {
  flex: 1; min-width: 0; max-width: 440px; margin: 0 auto; display: flex; align-items: center; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; height: 36px;
}
.search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; min-width: 0; }
.search kbd { color: var(--muted); font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.btn { border: 0; border-radius: 6px; padding: 8px 14px; font-weight: 700; background: none; }
.btn.red { background: var(--red); }
.btn.red:hover { background: #ff2a4d; }
.btn.ghost:hover { background: var(--panel-2); }
.globe { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; width: 36px; height: 36px; }

/* ---- sidebar ---- */
.side {
  position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side); z-index: 10;
  overflow-y: auto; padding: 10px 8px; background: var(--bg); border-right: 1px solid var(--line);
}
.side a, .side .grp {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; color: #c9c9d3; font-weight: 600;
}
.side a:hover, .side a.on { background: var(--panel-2); color: var(--text); }
.side .sub a { padding-left: 34px; font-weight: 500; }
.side .new { margin-left: auto; background: var(--red); color: #fff; font-size: 9px; font-weight: 800; padding: 2px 5px; border-radius: 4px; }
.side h4 { margin: 18px 10px 8px; font-size: 11px; letter-spacing: .08em; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.rec { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; }
.rec:hover { background: var(--panel-2); }
.rec .who { flex: 1; min-width: 0; }
.rec .who b, .rec .who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec .who span { color: var(--muted); font-size: 12px; }
.rec .n { color: var(--muted); font-size: 12px; }
.avatar {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 12px; color: #fff;
}
main { margin-left: var(--side); padding: calc(var(--top) + 20px) 24px 40px; }

/* ---- hero ---- */
.hero { position: relative; margin: 0 auto 28px; max-width: 860px; aspect-ratio: 16/8; border-radius: 12px; overflow: hidden; background: #000; }
.hero video { width: 100%; height: 100%; object-fit: cover; }
.hero .cap { position: absolute; left: 14px; top: 12px; display: flex; gap: 10px; align-items: center; text-shadow: 0 1px 3px #000; }
.hero .empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px;
  background: radial-gradient(circle at 50% 60%, #2a0b12, #000 70%); }
.hero .empty b { display: block; font-size: 26px; color: var(--text); margin-bottom: 6px; }
.livebadge { background: var(--red); color: #fff; font-weight: 800; font-size: 11px; padding: 3px 7px; border-radius: 4px; letter-spacing: .04em; }
.livebadge::before { content: "● "; }

/* ---- sections / cards ---- */
.sec-h { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; }
.sec-h h2 { margin: 0; font-size: 20px; color: var(--red); }
.sec-h span { color: var(--muted); }
.sec-h .all { margin-left: auto; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card .thumb {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center;
  font-family: "Rubik Mono One", Impact, sans-serif; font-size: 34px; color: #ffffffd0;
}
.card .thumb .livebadge { position: absolute; left: 8px; top: 8px; }
.card .thumb .cnt { position: absolute; left: 8px; bottom: 8px; background: #000b; padding: 2px 7px; border-radius: 4px; font: 600 12px Inter, sans-serif; }
.card .thumb.off { filter: grayscale(.9) brightness(.55); }
.card .meta { display: flex; gap: 10px; margin-top: 10px; }
.card .meta b { display: block; }
.card .meta .t { color: #d4d4dc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.card .meta .c { color: var(--muted); font-size: 12px; }
.chips { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chip { flex: none; width: 150px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); padding: 12px; }
.chip b { display: block; margin-bottom: 6px; }
.chip span { display: inline-block; font-size: 11px; color: var(--muted); background: var(--panel-2); border-radius: 4px; padding: 1px 6px; margin: 0 4px 4px 0; }
.empty-row { color: var(--muted); padding: 18px; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }

footer { margin: 50px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 12px; }

/* ---- channel page ---- */
.chan { display: grid; grid-template-columns: 1fr 340px; height: calc(100vh - var(--top)); margin-left: var(--side); padding-top: var(--top); }
.stage { overflow-y: auto; }
.player { position: relative; background: #000; aspect-ratio: 16/9; max-height: calc(100vh - var(--top) - 120px); width: 100%; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player .off { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted);
  background: radial-gradient(circle at 50% 60%, #2a0b12, #000 70%); }
.player .off b { display: block; color: var(--text); font-size: 24px; margin-bottom: 6px; }
.info { display: flex; gap: 14px; padding: 16px 20px; align-items: flex-start; }
.info .avatar { width: 54px; height: 54px; font-size: 20px; }
.info h1 { margin: 0; font-size: 20px; }
.info .title { color: #d4d4dc; margin: 4px 0; }
.info .cat { color: var(--red); font-weight: 600; }
.info .right { margin-left: auto; text-align: right; color: var(--muted); }
.info .right b { color: var(--text); font-size: 16px; }
.kicktag { display: inline-block; background: var(--kick); color: #000; font-weight: 800; font-size: 10px; padding: 1px 5px; border-radius: 3px; vertical-align: 2px; }

.chat { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--panel); min-height: 0; }
.chat header { padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 800; letter-spacing: .04em; font-size: 12px; display: flex; justify-content: space-between; }
.msgs { flex: 1; overflow-y: auto; padding: 10px 12px; min-height: 0; overflow-wrap: anywhere; }
.msg { padding: 3px 4px; border-radius: 4px; position: relative; }
.msg:hover { background: var(--panel-2); }
.msg b { font-weight: 700; }
.msg .k { display: inline-block; width: 14px; height: 14px; line-height: 14px; text-align: center; background: var(--kick); color: #000; font-size: 10px; font-weight: 900; border-radius: 3px; margin-right: 4px; vertical-align: 1px; }
.msg img.emote { height: 22px; vertical-align: middle; }
.msg .mod { display: none; position: absolute; right: 4px; top: 2px; gap: 4px; }
.msg:hover .mod { display: flex; }
.msg .mod button { background: var(--bg); border: 1px solid var(--line); border-radius: 4px; font-size: 11px; padding: 1px 6px; }
.sys { color: var(--muted); font-style: italic; padding: 3px 4px; }
.compose { border-top: 1px solid var(--line); padding: 10px; display: grid; gap: 8px; }
.compose input { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 9px 10px; font: inherit; outline: 0; }
.compose input:focus { border-color: var(--red); }
.compose .row { display: flex; gap: 8px; align-items: center; }
.compose .row .nm { color: var(--muted); font-size: 12px; flex: 1; }
.compose .row .nm a { color: var(--text); text-decoration: underline; cursor: pointer; }

/* ---- forms (studio/admin) ---- */
.form { max-width: 760px; }
.form .box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.form label { display: block; color: var(--muted); font-size: 12px; margin: 10px 0 4px; }
.form input, .form select { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 9px 10px; font: inherit; }
.form code { background: var(--panel-2); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.form table { width: 100%; border-collapse: collapse; }
.form td, .form th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.form .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.secret { filter: blur(5px); cursor: pointer; }
.secret.shown { filter: none; }

/* ---- splash ---- */
.splash {
  position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center; cursor: pointer;
  font-family: Arial Black, "Archivo Black", Impact, sans-serif; text-align: center; color: #eee;
  text-transform: uppercase;
}
.splash::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(#0000 0 2px, #0006 2px 4px); pointer-events: none; }
.splash .rating { position: absolute; left: 7%; top: 6%; border: 2px solid #ccc; padding: 4px 10px; font-size: 15px; line-height: 1.3; }
.splash .rating small { display: block; border-top: 2px solid #ccc; font-size: 11px; letter-spacing: .4em; }
.splash h1 { font-size: clamp(30px, 6vw, 58px); margin: 0 0 16px; line-height: 1.05; letter-spacing: .02em; }
.splash p { font-size: clamp(13px, 1.9vw, 18px); line-height: 1.55; max-width: 520px; margin: 0 auto; }
.splash .cont { position: absolute; bottom: 5%; left: 0; right: 0; font: 10px Arial, sans-serif; letter-spacing: .3em; color: #666; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; z-index: 50; }

/* ---- pitch blocks (home, lounge, apps) ---- */
.pitch { max-width: 620px; margin: 30px auto 36px; text-align: center; }
.pitch h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.05; margin: 0 0 16px; }
.pitch.home h1 { font-size: clamp(36px, 7vw, 64px); }
.pitch p { color: #c9c9d3; font-size: 16px; line-height: 1.55; margin: 0 auto 20px; max-width: 520px; }
.pitch .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pitch .btn { padding: 11px 20px; }
.pitch .btn.ghost { border: 1px solid var(--line); display: inline-block; }
.pitch small { display: block; color: var(--muted); margin-top: 14px; }
.beta { display: inline-block; border: 1px solid var(--red); color: var(--red); font-weight: 800; font-size: 11px; letter-spacing: .12em; padding: 2px 8px; border-radius: 4px; margin-bottom: 10px; }
.grid.briefs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid.briefs .thumb { aspect-ratio: 9/16; }
.grid.briefs .meta .t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---- browse ---- */
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.catgrid .chip { width: auto; position: relative; }
.chip:hover, .chip.on { border-color: var(--red); }
.chip em { display: block; font-style: normal; color: var(--red); font-size: 12px; font-weight: 700; min-height: 1em; }

/* ---- text pages (credits, legal) ---- */
.back { color: var(--muted); font-weight: 600; }
.back:hover { color: var(--text); }
.page-h { font-size: 30px; margin: 18px 0 8px; }
.lead { font-size: 16px; color: #d4d4dc; max-width: 640px; }
.muted { color: var(--muted); }
.legal { max-width: 680px; }
.legal h2 { font-size: 16px; color: var(--red); margin: 22px 0 4px; }
.legal p { margin: 0; color: #d4d4dc; line-height: 1.6; }
.people { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.person { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; }
.person.on { border-color: var(--red); }
.person span { color: var(--muted); }
.credit { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; max-width: 760px; }
.credit h2 { margin: 0 0 6px; }
.credit p { color: #c9c9d3; margin: 0 0 14px; }
.credit h3 { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.credit h4 { font-size: 11px; letter-spacing: .08em; color: var(--muted); margin: 16px 0 6px; }
.ask { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); }
.ask small { color: var(--muted); white-space: nowrap; }
.kind { font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 3px; background: var(--panel-2); color: #c9c9d3; }
.kind.bug { background: var(--red-dim); color: #fff; }
@media (max-width: 760px) { .ask { grid-template-columns: auto 1fr; } .ask small { grid-column: 2; } }

/* ---- responsive ---- */
@media (max-width: 1000px) {
  .chan { grid-template-columns: 1fr; height: auto; }
  .chat { height: 60vh; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  :root { --side: 0px; }
  .side { display: none; width: 240px; }
  body.menu .side { display: block; }
  main { padding: calc(var(--top) + 14px) 16px 30px; }
  .search kbd, .globe, .btn.ghost { display: none; }
  .search input::placeholder { color: transparent; }
  .btn.red { padding: 8px 10px; }
  .top { gap: 8px; }
  .wordmark { font-size: 15px; }
  .info { flex-wrap: wrap; padding: 12px 16px; }
  .info .right { margin-left: 0; text-align: left; width: 100%; }
}
