* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; color: #fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; overflow: hidden; }
.hidden { display: none !important; }

/* Gate */
.gate { position: fixed; inset: 0; display: grid; place-items: center; background: #0b0b0b; z-index: 10; }
.gate-box { display: flex; flex-direction: column; gap: 16px; width: min(360px, 80vw); text-align: center; }
.gate-box h1 { font-size: 28px; letter-spacing: 2px; text-transform: uppercase; }
.gate-box input { padding: 14px; font-size: 18px; border-radius: 10px; border: 1px solid #333;
  background: #161616; color: #fff; }
.gate-box button { padding: 14px; font-size: 18px; border: 0; border-radius: 10px;
  background: #2563eb; color: #fff; cursor: pointer; }
.gate-error { color: #f87171; }

/* Stage */
.stage { position: fixed; inset: 0; background: #000; }
#remote { width: 100%; height: 100%; object-fit: cover; background: #000; }
.local { position: absolute; right: 16px; bottom: 16px; width: 220px; max-width: 28vw;
  border-radius: 10px; border: 2px solid rgba(255,255,255,.25); object-fit: cover; background: #111; }

.badge { position: absolute; top: 20px; padding: 10px 18px; border-radius: 999px;
  font-weight: 700; letter-spacing: 1px; font-size: 20px; }
.onair { left: 20px; background: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.3); }
.them  { right: 20px; background: #059669; box-shadow: 0 0 0 4px rgba(5,150,105,.3); }

.controls { position: absolute; left: 20px; bottom: 20px; display: flex; align-items: center; gap: 14px; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.dot-green { background: #22c55e; } .dot-amber { background: #f59e0b; } .dot-red { background: #ef4444; }
.chime { background: rgba(0,0,0,.5); color: #fff; border: 1px solid #444; border-radius: 8px;
  padding: 8px 12px; cursor: pointer; font-size: 14px; }

.hint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  opacity: .6; font-size: 14px; }
kbd { background: #222; border: 1px solid #444; border-radius: 6px; padding: 2px 8px; }

/* Waiting-for-peer overlay: shown while the remote feed is empty so the dark
   screen doesn't read as "broken". Hidden once the other end connects. */
.waiting { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; text-align: center;
  color: #9aa0a6; pointer-events: none; }
.waiting p { font-size: 22px; font-weight: 600; color: #cfd3d7; }
.waiting small { font-size: 14px; opacity: .7; }
.waiting-dot { width: 14px; height: 14px; border-radius: 50%; background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245,158,11,.6); animation: waitPulse 1.6s ease-out infinite; }
@keyframes waitPulse {
  0%   { box-shadow: 0 0 0 0 rgba(245,158,11,.6); }
  70%  { box-shadow: 0 0 0 16px rgba(245,158,11,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
}
