:root {
  --bg: #0f1222;
  --panel: #171b31;
  --panel-2: #1e2340;
  --line: #2a3054;
  --text: #e8eaf6;
  --muted: #9aa0c3;
  --accent: #f5c451;
  --ok: #3ccf91;
  --warn: #f0a63a;
  --bad: #ef5d6c;
  --brand: #4b55d6;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, select, input { font: inherit; color: inherit; }
button { background: var(--brand); border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
button:hover { filter: brightness(1.1); }
button.small { padding: 2px 8px; font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); }
select, input[type=file] { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #1b2050, #121633); flex-wrap: wrap; }
.brand { font-weight: 700; display: flex; align-items: center; gap: 10px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #f5c45133; }
.tag { font-size: 11px; font-weight: 600; color: var(--bg); background: var(--accent); padding: 1px 7px; border-radius: 999px; }
.who { display: flex; align-items: center; gap: 8px; color: var(--muted); }

.layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; padding: 24px; max-width: 1280px; margin: 0 auto; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; padding: 16px; } }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
h3 { font-size: 14px; margin: 20px 0 8px; }

.lessons { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lessons button { width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); padding: 12px; border-radius: 10px; display: grid; gap: 6px; }
.lessons button[aria-current=true] { border-color: var(--accent); }
.lessons .t { font-weight: 600; }
.badge { justify-self: start; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.badge.ok { background: #3ccf9122; color: var(--ok); }
.badge.no { background: #ef5d6c22; color: var(--bad); }
.hint, .muted { color: var(--muted); font-size: 13px; }

.stage { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; user-select: none; -webkit-user-select: none; }
.stage video { width: 100%; height: 100%; display: block; background: #000; }
.stage:fullscreen { border-radius: 0; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; background: #000c; }
.overlay[hidden] { display: none; }
.overlay p { max-width: 460px; margin: 0; }
.overlay .code { display: block; font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); margin-top: 6px; }
.fs { position: absolute; top: 10px; right: 10px; background: #0008; padding: 4px 9px; font-size: 16px; }

.wm { position: absolute; left: 10%; top: 10%; pointer-events: none; z-index: 5; font: 600 14px/1.3 ui-monospace, monospace; color: #fff; text-shadow: 0 0 2px #000, 0 0 6px #000; white-space: pre; opacity: .28; transition: left 1.6s ease, top 1.6s ease, opacity 1s ease, transform 1s ease; transform-origin: center; }
.wm.big { font-size: 26px; opacity: .45; }

.status { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
@media (max-width: 860px) { .status { grid-template-columns: repeat(2, 1fr); } }
.status > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: grid; }
.status .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.status .v { font-family: ui-monospace, monospace; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.log { list-style: none; margin: 0; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; max-height: 220px; overflow: auto; font-family: ui-monospace, monospace; font-size: 12.5px; }
.log li { padding: 2px 0; }
.log li.ok { color: var(--ok); }
.log li.warn { color: var(--warn); }
.log li.bad { color: var(--bad); }

.admin { margin-top: 28px; border-top: 1px dashed var(--line); padding-top: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px 14px; margin-bottom: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.events { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.events th, .events td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.events td.high { color: var(--bad); } .events td.warn { color: var(--warn); }

/* Recording deterrents */
.stage video { transition: filter .15s ease; }
.stage.guarded video { filter: blur(28px) brightness(.35); }
.guard { position: absolute; inset: 0; z-index: 7; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; background: #000a; }
.guard[hidden] { display: none; }
.guard-msg { margin: 0; max-width: 460px; font-weight: 600; }
.guard-btn[hidden] { display: none; }
