* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --bg: #0e1116; --fg: #e6e6e6; --accent: #2f81f7; --danger: #e5484d; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--fg);
  font-family: -apple-system, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.screen { height: 100dvh; width: 100vw; }
.hidden { display: none !important; }

/* Lobby */
#lobby {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 24px;
}
#lobby h1 { font-size: 32px; letter-spacing: 1px; }
.hint { color: #9aa4b2; text-align: center; max-width: 320px; font-size: 14px; }
#key {
  width: 100%; max-width: 320px; padding: 14px 16px; font-size: 16px;
  border-radius: 12px; border: 1px solid #2a313c; background: #161b22; color: var(--fg);
  text-align: center;
}
.row { display: flex; gap: 10px; width: 100%; max-width: 320px; }
button {
  flex: 1; padding: 14px; font-size: 16px; border: none; border-radius: 12px;
  background: var(--accent); color: #fff; cursor: pointer;
}
button.ghost { background: #21262d; }
.status { color: #9aa4b2; font-size: 14px; min-height: 20px; text-align: center; }

/* Call */
.videos { position: relative; height: 100%; width: 100%; background: #000; }
#remoteVideo { height: 100%; width: 100%; object-fit: cover; background: #000; }
#localVideo {
  position: absolute; top: 16px; right: 16px; width: 30vw; max-width: 140px;
  aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; border: 2px solid #2a313c;
  background: #161b22;
}
.overlay-status {
  position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%);
  color: #cdd5df; padding: 0 24px;
}
.controls {
  position: absolute; bottom: calc(24px + env(safe-area-inset-bottom));
  left: 0; right: 0; display: flex; justify-content: center; gap: 14px;
}
.ctl {
  flex: 0 0 auto; width: 60px; height: 60px; border-radius: 50%;
  background: rgba(33, 38, 45, 0.85); color: #fff; font-size: 13px;
}
.ctl.off { background: #3a3f47; color: #8a93a0; }
.ctl.danger { background: var(--danger); }
