:root {
  --bg: #0d0d10;
  --surface: #1c1c22;
  --surface-2: #25252d;
  --surface-3: #2e2e38;
  --fg: #f4f4f7;
  --muted: #9a9aa8;
  --primary: #6d78f5;
  --primary-fg: #fff;
  --border: #3a3a46;
  --success: #3dcb7a;
  --danger: #e5484d;
  --input: #16161c;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); font-family: Inter, system-ui, sans-serif; }
button:not(:disabled) { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sm { font-size: 12px; }
.center { text-align: center; }
.err { color: var(--danger); font-size: 14px; }

body {
  background: radial-gradient(70% 36% at 50% -8%, rgb(109 120 245 / 0.22), transparent 58%), var(--bg);
}

.lobby {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.card {
  width: 100%;
  max-width: 28rem;
  background: rgb(28 28 34 / 0.9);
  border: 1px solid rgb(58 58 70 / 0.8);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.55);
}
.card-head { display: flex; gap: 12px; margin-bottom: 20px; }
.mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--primary); color: #fff; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgb(109 120 245 / 0.35);
  flex-shrink: 0;
}
h1 { margin: 0; font-size: 18px; }
.back { display: inline-block; margin-top: 6px; font-size: 12px; color: #818cf8; text-decoration: none; }
.lbl { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lbl input, .row input, .chat-form input {
  margin-top: 6px; width: 100%;
  background: var(--input); color: var(--fg);
  border: 1px solid transparent; border-radius: 8px;
  padding: 10px 12px; font: inherit;
  outline: none;
}
.lbl input:focus, .row input:focus, .chat-form input:focus {
  border-color: rgb(109 120 245 / 0.5);
  box-shadow: 0 0 0 2px rgb(109 120 245 / 0.3);
}
.stack { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; }
.row input { margin-top: 0; flex: 1; min-width: 0; }
.btn {
  border: 0; border-radius: 8px; padding: 10px 16px;
  font-size: 14px; font-weight: 600; color: var(--fg);
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: #818cf8; }
.btn.ghost { background: var(--surface-3); }
.btn.ghost:hover { background: var(--border); }
.or { display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.or span { flex: 1; height: 1px; background: var(--border); }
.linkback { align-self: flex-start; background: none; border: 0; color: var(--fg); font-size: 14px; padding: 0; }

.call { height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.call-top {
  height: 48px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; gap: 12px;
}
.call-top > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dot { width: 8px; height: 8px; border-radius: 99px; background: var(--success); flex-shrink: 0; }
.sala { margin: 0; font-size: 14px; font-weight: 600; }
.textbtn { background: none; border: 0; color: var(--muted); font-size: 14px; }
.textbtn:hover { color: var(--fg); }
.call-body { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 0 12px 12px; }
.people, .chat {
  background: var(--surface); border-radius: 16px; display: none; flex-direction: column;
}
.people { width: 14rem; }
.chat { width: 18rem; }
.people .lbl, .chat .lbl { padding: 12px 16px 8px; }
.people ul { list-style: none; margin: 0; padding: 0 8px 12px; overflow: auto; }
.people li, .person {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px;
}
.av {
  width: 32px; height: 32px; border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #0d0d10;
}
.stage {
  flex: 1; min-width: 0; border-radius: 16px; background: rgb(37 37 45 / 0.4);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.stage video { max-width: 100%; max-height: 100%; border-radius: 12px; background: #000; }
.empty {
  width: 100%; max-width: 48rem; background: rgb(13 13 16 / 0.8);
  border-radius: 16px; padding: 96px 24px; text-align: center;
}
.empty h2 { margin: 0; font-size: 22px; }
.empty p { margin: 12px auto 0; max-width: 28rem; color: var(--muted); font-size: 14px; }
.chat-log { flex: 1; overflow: auto; padding: 8px 16px; }
.chat-log .name { font-size: 12px; font-weight: 600; color: #818cf8; }
.chat-form { display: flex; gap: 8px; padding: 12px; }
.chat-form input { margin: 0; background: var(--surface-2); border-radius: 12px; }
.smbtn { border-radius: 12px; }

.dock {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 16px; position: relative;
}
.dock-left, .dock-mid, .dock-right { display: flex; gap: 8px; align-items: center; }
.dock-mid { position: absolute; left: 50%; transform: translateX(-50%); }
.ctl {
  width: 44px; height: 44px; border-radius: 99px; border: 0;
  background: var(--surface-2); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.ctl:hover { background: var(--surface-3); color: var(--fg); }
.ctl.accent { background: var(--success); color: #0d0d10; }
.ctl.danger { background: var(--danger); color: #fff; }
.ctl svg { width: 20px; height: 20px; }
.qbtn {
  background: var(--surface-2); color: var(--muted); border: 0;
  border-radius: 12px; padding: 8px 12px; font-size: 14px;
}
.qbtn b { color: var(--fg); margin-left: 4px; }
.qwrap { position: relative; display: none; }
.qmenu {
  position: absolute; right: 0; bottom: 52px; width: 12rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px; box-shadow: 0 12px 40px rgb(0 0 0 / 0.4);
}
.qmenu button {
  width: 100%; text-align: left; background: none; border: 0; color: var(--fg);
  padding: 8px; border-radius: 8px; font-size: 14px;
}
.qmenu button span { display: block; color: var(--muted); font-size: 12px; }
.qmenu button:hover { background: var(--surface-3); }
.mobile { display: flex; }
.mobile-chat { display: flex; }

@media (min-width: 640px) { .qwrap { display: block; } }
@media (min-width: 768px) {
  .people { display: flex; }
  .mobile { display: none; }
}
@media (min-width: 1024px) {
  .chat { display: flex; }
  .mobile-chat { display: none; }
}
