:root {
  --bg: #0d0f14;
  --panel: #161a22;
  --panel-2: #1e2430;
  --text: #e8ebf1;
  --muted: #9aa3b2;
  --accent: #f5b942;
  --ok: #3ccf7a;
  --warn: #f5b942;
  --bad: #ff5d5d;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}
[hidden] { display: none !important; }
.screen { height: 100%; width: 100%; }
.card-screen { display: grid; place-items: center; padding: 16px; overflow: auto; }
.card {
  width: min(420px, 100%);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.brand { font-weight: 700; font-size: 1.25rem; letter-spacing: .2px; }
.brand.big { font-size: 2rem; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: .85rem; margin-top: 18px; }
form { display: grid; gap: 14px; margin-top: 14px; }
label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
input[type=text], input:not([type]), input[type=password] {
  font: inherit; color: var(--text); background: var(--panel-2);
  border: 1px solid #2c3443; border-radius: 10px; padding: 12px 14px; outline: none;
}
input:focus { border-color: var(--accent); }
button {
  font: inherit; font-weight: 600; cursor: pointer;
  border: 0; border-radius: 10px; padding: 12px 16px;
  background: var(--accent); color: #1a1400;
}
button:disabled { opacity: .6; cursor: default; }
.error { color: var(--bad); min-height: 1.2em; margin: 0; font-size: .9rem; }
.spinner {
  width: 36px; height: 36px; margin: 18px auto 4px;
  border: 3px solid #2c3443; border-top-color: var(--accent); border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#screen-player { display: grid; grid-template-rows: 1fr auto; position: relative; }
#stage { position: relative; background: #000; min-height: 0; }
#movie { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.lobby {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  background: radial-gradient(circle at 50% 40%, #1d2330 0, #07080b 70%); padding: 16px;
}
.banner {
  position: absolute; left: 50%; top: 16px; transform: translateX(-50%);
  background: rgba(15,17,23,.86); border: 1px solid #333c4d; color: var(--text);
  padding: 10px 16px; border-radius: 999px; font-size: .95rem; max-width: calc(100% - 32px);
  text-align: center;
}
.banner.bad { border-color: var(--bad); }
.stats {
  position: absolute; left: 12px; bottom: 12px; background: rgba(0,0,0,.7);
  font: 12px/1.4 ui-monospace, Consolas, monospace; padding: 8px 10px; border-radius: 8px;
  white-space: pre; pointer-events: none;
}
#controls {
  display: flex; gap: 10px; align-items: center; padding: 10px 14px;
  background: var(--panel); border-top: 1px solid #222936; flex-wrap: wrap;
}
.pill { background: var(--panel-2); color: var(--text); padding: 8px 12px; border-radius: 999px; font-weight: 500; }
.pill.off { background: #3a1f24; color: #ffb3b3; }
.vol { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 1rem; }
.vol input { width: 110px; accent-color: var(--accent); }
.grow { flex: 1; }
.badge { font-size: 1.2rem; }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.bad { color: var(--bad); }
#people {
  position: absolute; right: 12px; bottom: 64px; width: min(320px, calc(100% - 24px));
  max-height: 60%; overflow: auto; background: var(--panel); border-radius: var(--radius);
  padding: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
#people h3 { margin: 0 0 8px; font-size: 1rem; }
#people ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
#people li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.ring { width: 12px; height: 12px; border-radius: 50%; background: #2c3443; }
.ring.speaking { background: var(--ok); box-shadow: 0 0 0 3px rgba(60,207,122,.3); }
.person-tools { display: flex; gap: 6px; align-items: center; }
.person-tools input { width: 70px; }
.person-tools button { padding: 4px 8px; font-size: .8rem; background: var(--panel-2); color: var(--text); }
.setting { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .85rem; margin-top: 6px; }
@media (max-width: 600px) {
  .vol input { width: 70px; }
  #controls { gap: 6px; padding: 8px; }
}
