:root {
  --bg: #0b0e14;
  --panel: #131824;
  --panel-2: #1a2131;
  --line: #262f44;
  --text: #e6ebf5;
  --muted: #8a96ad;
  --accent: #39ff9c;
  --accent-ink: #04130b;
  --accent-2: #7c5cff;
  --danger: #ff5c7a;
  --warn: #ffc857;
  --radius: 12px;
  color-scheme: dark;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { line-height: 1.5; }
a { color: var(--accent); }
code { background: var(--panel-2); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 20px; padding-bottom: 24px; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: 13px; }
.grow { flex: 1; min-width: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 12px; color: var(--accent); margin: 0 0 6px; font-weight: 700; }

.topbar { border-bottom: 1px solid var(--line); background: var(--panel); }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 18px; color: var(--text); }
.topbar nav { display: flex; gap: 6px 18px; font-size: 14px; align-items: center; }
.topbar nav a { color: var(--muted); text-decoration: none; }
.topbar nav a:hover { color: var(--text); }
.who { font-size: 14px; }
.foot { padding-bottom: 24px; font-size: 13px; }
.foot a { color: var(--muted); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card h1 { font-size: 24px; margin: 0 0 6px; }
.card h2 { font-size: 18px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.card h2 .push { margin-left: auto; font-size: 13px; font-weight: 500; }
.narrow-card, .join { max-width: 560px; }
.join { margin-left: auto; margin-right: auto; border-color: rgba(57, 255, 156, .4); }

input { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; min-width: 0; width: 100%; }
input:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.btn { font: inherit; font-weight: 600; font-size: 15px; line-height: 1; padding: 12px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); border-color: rgba(255, 92, 122, .4); background: transparent; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.big { padding: 16px 28px; font-size: 18px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.now { color: var(--accent); border-color: rgba(57, 255, 156, .4); }
.errors { background: rgba(255, 92, 122, .1); border: 1px solid rgba(255, 92, 122, .4); color: #ffc0cc; border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; }
.note { background: rgba(57, 255, 156, .08); border: 1px solid rgba(57, 255, 156, .3); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* the watch page */
.watch-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .watch-layout { grid-template-columns: minmax(0, 1fr); } }
.watch-player { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.watch-player iframe, .watch-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.watch-player video { object-fit: contain; background: #000; }
.watch-idle { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 16px;
  background: radial-gradient(600px 300px at 20% 10%, rgba(124, 92, 255, .3), transparent 60%), radial-gradient(500px 260px at 85% 90%, rgba(57, 255, 156, .15), transparent 60%), #0b0f17; }
.watch-idle p { margin: 0; }
.watch-idle p:first-child { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.watch-sound { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }
.watch-now { display: flex; gap: 16px; align-items: center; padding: 14px 4px 0; }
.watch-now h1 { font-size: 22px; margin: 2px 0 4px; overflow-wrap: anywhere; }
.watch-now .eyebrow, .watch-now p { margin: 0; }
@media (max-width: 560px) { .watch-now { flex-wrap: wrap; gap: 10px; } .watch-now .grow { flex-basis: 100%; } .watch-now h1 { font-size: 19px; } }
.watch-side { margin-bottom: 0; }
.watch-add { display: flex; gap: 8px; margin-bottom: 12px; }
.watch-queue { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.watch-item { display: flex; gap: 10px; align-items: center; padding: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.watch-item.mine { border-color: rgba(57, 255, 156, .4); }
.watch-item img { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; flex: none; background: #000; }
.watch-item strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.watch-item .muted { font-size: 12px; }
.watch-item .grow { overflow-wrap: anywhere; }
.watch-item-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.watch-item p { margin: 0; }
@media (max-width: 420px) { .watch-item img { width: 72px; height: 40px; } }

/* moving the video (verified people, and the host) */
.seek { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.seek input[type=range] { flex: 1; min-width: 0; padding: 0; border: 0; background: none; accent-color: var(--accent); }
.seek-time { white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; }
.seek-note { margin: 6px 0 0; }
@media (max-width: 480px) { .seek { flex-wrap: wrap; } .seek input[type=range] { flex-basis: 100%; order: -1; } .seek-time { margin-left: auto; } }

/* the host page */
select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; max-width: 100%; }
.badge.warn { color: var(--warn); border-color: rgba(255, 200, 87, .4); }
.people .badge { margin-left: 8px; }
.block { display: block; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.dot.on { background: var(--accent); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } }
.now-item { background: transparent; border: 0; padding: 0; }
.settings { display: grid; gap: 12px; }
.settings label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.settings input[type=number] { max-width: 120px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 360px; overflow: auto; }
.people li { display: flex; gap: 10px; align-items: center; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border-bottom: 0; }
.status { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0 0 12px; font-size: 14px; }
.status dt { color: var(--muted); }
.status dd { margin: 0; overflow-wrap: anywhere; }
.status .good { color: var(--accent); }
.status .warn { color: var(--warn); }
.status .bad { color: var(--danger); }
@media (max-width: 480px) { .status { grid-template-columns: minmax(0, 1fr); } .status dd { margin-bottom: 6px; } }
