* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: #101418;
  color: #e8edf2;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
body { padding: 16px; max-width: 720px; margin: 0 auto; }
h1 { font-size: 1.3rem; margin: 0 0 4px; }
.sub { color: #8b98a5; font-size: 0.9rem; margin: 0 0 16px; }
.card {
  background: #1a2027;
  border: 1px solid #2a333d;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.room-code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 3rem;
  letter-spacing: 0.35em;
  text-align: center;
  padding: 8px 0 8px 0.35em;
  user-select: all;
}
.status-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pill {
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.82rem;
  background: #2a333d;
  color: #aab7c4;
}
.pill.ok { background: #14532d; color: #86efac; }
.pill.warn { background: #713f12; color: #fde047; }
.pill.err { background: #7f1d1d; color: #fca5a5; }
button {
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.95rem;
  cursor: pointer;
}
button.secondary { background: #2a333d; color: #cbd5e1; }
button:disabled { opacity: 0.45; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
video.preview {
  width: 100%;
  border-radius: 10px;
  background: #000;
  aspect-ratio: 16/9;
}
select {
  background: #2a333d;
  border: 0;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 0.95rem;
  padding: 10px 12px;
  flex: 1;
  min-width: 0;
}
.zoom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.zoom-row input[type="range"] { flex: 1; accent-color: #2563eb; }
input[type="text"] {
  background: #101418;
  border: 1px solid #2a333d;
  border-radius: 8px;
  color: #e8edf2;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.4rem;
  letter-spacing: 0.25em;
  padding: 10px 12px;
  text-transform: uppercase;
  width: 100%;
  text-align: center;
}
#log {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.75rem;
  color: #8b98a5;
  white-space: pre-wrap;
  max-height: 130px;
  overflow-y: auto;
}
/* Theater view: just the live video, for Quest multi-window "window mode"
   next to a YouTube/Instagram browser window. */
body.theater { padding: 0; max-width: none; }
body.theater > *:not(#videoCard):not(#exitTheaterBtn) { display: none !important; }
body.theater #videoCard { background: transparent; border: 0; padding: 0; margin: 0; }
body.theater #videoCard .sub { display: none; }
body.theater #videoCard video.preview {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  border-radius: 0;
  aspect-ratio: auto;
}
#exitTheaterBtn {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 10;
  opacity: 0.75;
}
.banner-error {
  display: none;
  background: #7f1d1d;
  color: #fecaca;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}
.banner-error.show { display: block; }
a { color: #60a5fa; }
