:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --panel2: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent2: #0ea5e9;
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 1000px; margin: 0 auto; padding: 20px; }
header.bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; background: var(--panel);
  border-bottom: 1px solid var(--panel2);
}
header.bar .logo { font-size: 22px; }
header.bar h1 { font-size: 17px; margin: 0; font-weight: 600; }
header.bar .spacer { flex: 1; }
header.bar a.navlink { color: var(--muted); text-decoration: none; font-size: 14px; }
header.bar a.navlink:hover { color: var(--text); }

.card {
  background: var(--panel); border: 1px solid var(--panel2);
  border-radius: 14px; padding: 20px; margin-bottom: 18px;
}
h2 { font-size: 18px; margin: 0 0 12px; }
p.lead { color: var(--muted); margin: 0 0 16px; line-height: 1.55; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 10px; cursor: pointer;
  font-size: 15px; font-weight: 600; padding: 12px 20px;
  background: var(--accent2); color: #06263a; transition: filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: var(--panel2); color: var(--text); }
.btn.danger { background: var(--err); color: #fff; }
.btn.big { font-size: 18px; padding: 16px 28px; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .choices { grid-template-columns: 1fr; } }
.choice {
  display: block; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--panel2);
  border-radius: 14px; padding: 24px; transition: border-color .15s, transform .1s;
}
.choice:hover { border-color: var(--accent); transform: translateY(-2px); }
.choice .ic { font-size: 40px; }
.choice h3 { margin: 10px 0 6px; font-size: 18px; }
.choice p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

video {
  width: 100%; background: #000; border-radius: 12px; display: block;
  aspect-ratio: 16 / 9; object-fit: contain;
}
.videowrap { position: relative; }
.overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: rgba(2,6,23,.72); border-radius: 12px; cursor: pointer;
}
.overlay.hidden { display: none; }

.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dot.live { background: var(--ok); box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 1.6s infinite; }
.dot.err { background: var(--err); }
.dot.wait { background: var(--warn); }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,.5);} 70%{box-shadow:0 0 0 8px rgba(34,197,94,0);} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0);} }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mt { margin-top: 14px; }
.hint { background: #0b1220; border: 1px solid var(--panel2); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.hint b { color: var(--text); }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; background: #0b1220; color: var(--text); border: 1px solid var(--panel2); border-radius: 8px; padding: 10px; font-size: 14px; }

.tabs { display: inline-flex; background: var(--panel2); border-radius: 10px; padding: 4px; gap: 4px; }
.tabs button { border: 0; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: 7px; cursor: pointer; font-size: 14px; font-weight: 600; }
.tabs button.active { background: var(--accent2); color: #06263a; }

.chat { opacity: .55; }
.chat .msgs { height: 120px; background: #0b1220; border: 1px dashed var(--panel2); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
