:root {
  --bg: #0f1115;
  --panel: #181b22;
  --ink: #e8eaf0;
  --muted: #8b93a7;
  --accent: #3b82f6;
  --danger: #dc2626;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
h1 { font-size: 18px; margin: 0; }
.room { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.room code { color: var(--ink); background: var(--panel); padding: 2px 6px; border-radius: 4px; }
main { padding: 0 16px 16px; max-width: 1100px; margin: 0 auto; }
.videos { position: relative; background: var(--panel); border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.tile { position: absolute; inset: 0; }
.tile video { width: 100%; height: 100%; object-fit: cover; background: #000; display: block; }
.tile .label { position: absolute; left: 8px; bottom: 8px; font-size: 12px; color: #fff; background: rgba(0,0,0,.5); padding: 2px 6px; border-radius: 4px; }
.tile.local { inset: auto 12px 12px auto; width: 28%; min-width: 140px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.5); }
.tile.local video { transform: scaleX(-1); }
.status { color: var(--muted); text-align: center; margin: 12px 0; min-height: 1.4em; }
.controls { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
button { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid #2a2f3a; border-radius: 8px; padding: 10px 16px; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--muted); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); }
button.danger { background: var(--danger); border-color: var(--danger); }
button.active { background: #f59e0b; border-color: #f59e0b; color: #000; }

/* landing */
.landing { max-width: 720px; }
.landing p { color: var(--muted); }
.linkbox { margin: 12px 0; }
.linkbox label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid #2a2f3a; border-radius: 8px; padding: 10px 12px; min-width: 0; }
h2 { font-size: 15px; margin: 0 0 8px; color: var(--muted); font-weight: 600; }

/* call pages */
.group { margin-top: 20px; }
.badge { position: absolute; top: 8px; right: 8px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.badge.rec { background: var(--danger); color: #fff; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { to { opacity: .35; } }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 6px 0; border-bottom: 1px solid #22262f; display: flex; justify-content: space-between; gap: 8px; }
.list a { color: var(--accent); text-decoration: none; }
.muted { color: var(--muted); }
button.small { padding: 4px 10px; font-size: 12px; margin-left: 8px; }
.in-call #join { display: none; }
