:root {
  --bg: #1e1f22;
  --bg-elev: #2b2d31;
  --bg-elev-2: #313338;
  --text: #f2f3f5;
  --text-dim: #949ba4;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --danger: #da373c;
  --ok: #23a55a;
  --border: #1a1b1e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "gg sans", "Noto Sans", Arial, sans-serif;
  min-height: 100vh;
}

.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card {
  background: var(--bg-elev);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

.card h1 {
  margin: 0 0 8px;
  font-size: 22px;
}

.card p.sub {
  color: var(--text-dim);
  margin: 0 0 24px;
  font-size: 14px;
}

input[type="text"] {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 12px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 16px;
}

.btn-primary { background: var(--accent); color: white; width: 100%; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-elev-2); color: var(--text); width: 100%; margin-top: 8px; }
.btn-secondary:hover { background: #3a3c42; }
.btn-danger { background: var(--danger); color: white; }
.btn-ok { background: var(--ok); color: white; }

.divider { text-align: center; color: var(--text-dim); font-size: 12px; margin: 16px 0; }

/* Room layout */
.room-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-rows: 1fr auto;
  height: 100vh;
}

.stage-wrapper {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  min-height: 0;
}

.stage-wrapper:fullscreen {
  width: 100%;
  height: 100%;
  background: #000;
}

.stage {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.stage video {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stage-controls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.stage-controls.controls-hidden {
  opacity: 0;
  pointer-events: none;
}

.stage-wrapper:fullscreen:has(.controls-hidden) {
  cursor: none;
}

.stage-controls .volume-control {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text);
}

.stage-controls .volume-control input[type="range"] {
  width: 90px;
  accent-color: var(--accent);
}

.fullscreen-btn {
  background: rgba(0, 0, 0, 0.6);
  color: var(--text);
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}

.fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.stage .placeholder {
  color: var(--text-dim);
  text-align: center;
  font-size: 14px;
}

.sidebar {
  grid-column: 2;
  grid-row: 1 / span 2;
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
}

.sidebar h3 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 16px 0 8px;
}

.participant {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
}

.participant .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0;
}

.quality-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quality-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elev-2);
  border-radius: 6px;
  padding: 8px;
  font-size: 13px;
  cursor: pointer;
}

.quality-grid label.active {
  outline: 2px solid var(--accent);
}

select, .check-row {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar {
  grid-column: 1;
  grid-row: 2;
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  flex-wrap: wrap;
}

.pill {
  background: var(--bg-elev-2);
  border-radius: 20px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text-dim);
}


.link-box {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.link-box input {
  margin-bottom: 0;
  flex: 1;
  font-size: 12px;
}

.toggle-active {
  background: var(--danger) !important;
  color: white !important;
}

@media (max-width: 800px) {
  .room-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
