/* ============ Tokens — true dark mode ============ */
:root {
  --bg-app: #050507;
  --bg-surface: #0a0a0d;
  --bg-surface-2: #101014;
  --bg-surface-3: #16161b;
  --bg-surface-4: #1f1f25;
  --border: rgba(255, 255, 255, 0.05);
  --border-strong: rgba(255, 255, 255, 0.10);
  --fg: #f5f5f7;
  --fg-dim: rgba(245, 245, 247, 0.50);
  --fg-soft: rgba(245, 245, 247, 0.78);
  --accent: #f5a623;
  --accent-hover: #ffb840;
  --accent-bg: rgba(245, 166, 35, 0.12);
  --accent-text: #1a0e00;
  --success: #22c55e;
  --danger: #ef4444;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --pad: 14px;
  --gap: 12px;
  --radius: 12px;
  --radius-btn: 8px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
html { background: var(--bg-app); color: var(--fg); }
body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--fg); }

/* ============ Icons ============ */
.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}
.icon--play {
  width: 32px;
  height: 32px;
}

/* ============ App shell ============ */
.app {
  width: 100%;
  height: 100vh;
  background: var(--bg-app);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--pad);
  gap: var(--pad);
  position: relative;
  overflow: hidden;
}

/* ============ Top bar ============ */
.topbar {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar__left, .topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-surface-3);
  display: grid; place-items: center;
}
.topbar__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }

.topbar__meeting {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar__title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.badge--live::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  margin-right: 6px;
  box-shadow: 0 0 8px var(--success);
  animation: pulse-dot 1.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

.topbar__participants {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-dim);
  font-size: 12px;
  padding: 6px 10px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--green { background: var(--success); box-shadow: 0 0 6px var(--success); }

.topbar__timer {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
  padding: 6px 12px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  min-width: 76px;
  text-align: center;
}

/* ============ Main ============ */
.main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--pad);
  min-height: 0;
  min-width: 0;
}

/* ============ Stage ============ */
.stage {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stage__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-height: 100%;
  height: auto;
  background: #0d0f1a;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 30px 80px -20px rgba(0, 0, 0, 0.6);
}

.stage__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

/* Click-to-play overlay button — also serves as the poster */
.stage__playarea {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.45) 100%),
    #000 url("assets/poster.jpg") center / contain no-repeat;
  transition: background-color 200ms var(--ease);
}
.stage__playarea[hidden] { display: none; }
.stage__playarea:hover {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.35) 100%),
    #000 url("assets/poster.jpg") center / contain no-repeat;
}

.stage__bigplay {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(245, 166, 35, 0.18);
  border: 1px solid rgba(245, 166, 35, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  font-size: 28px;
  color: var(--accent);
  padding-left: 6px;
  box-shadow: 0 0 40px rgba(245, 166, 35, 0.45);
  animation: pulse-glow 2.4s ease-in-out infinite;
  transition: transform 200ms var(--ease), background-color 200ms var(--ease);
}
.stage__playarea:hover .stage__bigplay {
  transform: scale(1.06);
  background: rgba(245, 166, 35, 0.28);
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 30px rgba(245, 166, 35, 0.40); }
  50%      { box-shadow: 0 0 60px rgba(245, 166, 35, 0.65); }
}

/* Nameplate */
.nameplate {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
}

.nameplate__name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: var(--radius-btn);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: rgba(239, 68, 68, 0.18);
  color: #ffb4b4;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.live-pill__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

/* Caption ticker */
.caption {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: var(--radius-btn);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-soft);
  max-width: 60%;
}
.caption__text {
  display: inline-block;
  transition: opacity 360ms var(--ease);
}
.caption__text.is-fading { opacity: 0; }

/* Custom video controls */
.vctrl {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 60px; /* above the nameplate area */
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: rgba(15, 17, 28, 0.7);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 200ms var(--ease);
  z-index: 3;
}
.stage__frame:hover .vctrl,
.vctrl:focus-within { opacity: 1; }
.vctrl[hidden] { display: none; }

.vctrl__btn {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: border-color 160ms linear, color 160ms linear, background-color 160ms linear;
}
.vctrl__btn:hover, .vctrl__btn:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(245, 166, 35, 0.12);
  outline: none;
}

.vctrl__progress {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  cursor: pointer;
  overflow: hidden;
}
.vctrl__progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(245, 166, 35, 0.6);
  transition: width 100ms linear;
}

/* ============ Chat ============ */
.chat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.chat__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fg-dim);
}
.chat__count {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 11px;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.chat__thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bubble {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: start;
}
.bubble__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-surface-3);
}
.bubble__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.bubble__body {
  background: var(--bg-surface-2);
  padding: 10px 12px;
  border-radius: var(--radius);
  border-top-left-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.bubble__meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.bubble__sender {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.bubble__time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(245, 245, 247, 0.32);
}
.bubble__text {
  font-size: 13px;
  color: var(--fg);
  word-wrap: break-word;
  line-height: 1.5;
}
.bubble__text--ru {
  font-size: 12.5px;
  color: var(--fg-soft);
}
.bubble__text::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  color: var(--accent);
  animation: blink 1s steps(2, end) infinite;
}
.bubble__text.is-done::after { display: none; }

@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.chat__hint {
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  color: var(--fg-dim);
  text-transform: uppercase;
  padding-left: 4px;
}

.chat__links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msglink {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: var(--radius-btn);
  transition: background-color 160ms var(--ease),
              border-color 160ms var(--ease),
              transform 160ms var(--ease);
}
.msglink:hover, .msglink:focus-visible {
  background: var(--bg-surface-3);
  border-color: rgba(245, 166, 35, 0.45);
  transform: translateY(-1px);
  outline: none;
}
.msglink__arrow {
  color: var(--accent);
  width: 14px;
  height: 14px;
  transition: transform 160ms var(--ease);
}
.msglink:hover .msglink__arrow { transform: translateX(2px); }
.msglink__label {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.msglink__handle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 14ch;
}

/* Yellow CTA variant — primary action (Download) */
.msglink--primary {
  background: var(--accent);
  border-color: rgba(245, 166, 35, 0.6);
  color: var(--accent-text);
  margin-top: 4px;
  box-shadow: 0 8px 20px -8px rgba(245, 166, 35, 0.55);
}
.msglink--primary:hover,
.msglink--primary:focus-visible {
  background: var(--accent-hover);
  border-color: rgba(245, 166, 35, 0.9);
  box-shadow: 0 12px 28px -8px rgba(245, 166, 35, 0.7);
}
.msglink--primary .msglink__arrow {
  color: var(--accent-text);
  width: 16px;
  height: 16px;
}
.msglink--primary .msglink__label {
  color: var(--accent-text);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 12px;
}
.msglink--primary .msglink__handle {
  color: rgba(26, 14, 0, 0.55);
  font-weight: 600;
}

.chat__input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}
.chat__inputbox {
  flex: 1;
  font-size: 12px;
  color: var(--fg-dim);
  padding: 8px 12px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}
.chat__send {
  width: 32px; height: 32px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.chat__send .icon { width: 14px; height: 14px; }

/* ============ Bottom controls ============ */
.controls {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.controls__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.controls__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-surface-3);
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
}
.controls__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }

.controls__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.controls__name {
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.controls__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.controls__center {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.controls__right {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.ctrlbtn {
  position: relative;
  width: 52px;
  min-width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  color: var(--fg-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px;
  transition: background-color 160ms var(--ease),
              border-color 160ms var(--ease),
              color 160ms var(--ease),
              transform 160ms var(--ease);
}
.ctrlbtn:hover {
  background: var(--bg-surface-3);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  color: var(--fg);
}
.ctrlbtn.is-on {
  background: var(--accent-bg);
  border-color: rgba(245, 166, 35, 0.4);
  color: var(--accent);
}
.ctrlbtn.is-on:hover {
  background: rgba(245, 166, 35, 0.20);
  color: var(--accent-hover);
}
.ctrlbtn__label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.ctrlbtn--ghost {
  background: transparent;
  border-color: var(--border);
}
.ctrlbtn--ghost:hover { background: var(--bg-surface-2); }

/* Topbar signal indicator */
.topbar__signal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-pill);
}
.topbar__signal .icon { width: 13px; height: 13px; }
.topbar__signal-label { font-family: var(--font-mono); }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .main { grid-template-columns: 1fr 280px; }
}

@media (max-width: 768px) {
  body { overflow-y: auto; }
  .app {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .main {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .stage__frame { width: 100%; }
  .chat { height: 360px; }
  .topbar__participants { display: none; }
  .topbar__signal-label { display: none; }
  .controls {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 10px;
  }
  .controls__meta { display: none; }
  .controls__center {
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .controls__center::-webkit-scrollbar { display: none; }
  .ctrlbtn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 10px;
    padding: 4px;
  }
  .ctrlbtn__label { display: none; }
}

@media (max-width: 420px) {
  .topbar__title { font-size: 12px; }
  .badge { padding: 3px 6px; font-size: 9px; }
  .nameplate__name { font-size: 14px; }
  .stage__bigplay { width: 64px; height: 64px; font-size: 22px; }
  .caption { display: none; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  .badge--live::before,
  .live-pill__dot,
  .stage__bigplay { animation: none; }
  .bubble__text::after { animation: none; }
  .caption__text { transition: none; }
}

/* ============ Stage connecting overlay (waiting for video stream) ============ */
.stage__connecting {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(8, 8, 12, 0.85);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: lobby-in 280ms var(--ease) both;
}
.stage__connecting[hidden] { display: none; }
.stage__connecting.is-out {
  animation: connecting-out 500ms var(--ease) forwards;
  pointer-events: none;
}

@keyframes connecting-out {
  to { opacity: 0; }
}

.stage__connecting-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.stage__connecting-ring {
  position: relative;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
}
.stage__connecting-ring::before,
.stage__connecting-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  animation: connecting-spin 1.4s linear infinite;
}
.stage__connecting-ring::after {
  inset: -8px;
  border-top-color: rgba(245, 166, 35, 0.4);
  animation-duration: 2.2s;
  animation-direction: reverse;
}

@keyframes connecting-spin {
  to { transform: rotate(360deg); }
}

.stage__connecting-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-surface-3);
  position: relative;
  z-index: 1;
}
.stage__connecting-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }

.stage__connecting-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.stage__connecting-sub {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ============ Lobby (pre-call screen) ============ */
.lobby {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg-app);
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  animation: lobby-in 600ms var(--ease) both;
}

.lobby[hidden] { display: none; }
.lobby.is-out {
  animation: lobby-out 500ms var(--ease) forwards;
  pointer-events: none;
}

@keyframes lobby-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes lobby-out {
  to { opacity: 0; transform: scale(1.02); }
}

.lobby__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.lobby__glow {
  position: absolute;
  width: 80vmax;
  height: 80vmax;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(245, 166, 35, 0.18) 0%, transparent 60%);
  filter: blur(60px);
  animation: lobby-glow 8s ease-in-out infinite;
}
@keyframes lobby-glow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
  50%      { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.lobby__card {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 36px 36px 28px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 40px 80px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(245, 166, 35, 0.08);
  animation: lobby-card-rise 700ms var(--ease) both;
}

@keyframes lobby-card-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lobby__avatar {
  display: inline-block;
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  background: var(--bg-surface-3);
  box-shadow: 0 0 30px rgba(245, 166, 35, 0.35);
  margin-bottom: 18px;
}
.lobby__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }

.lobby__kicker {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}

.lobby__title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4.5vw, 36px);
  letter-spacing: -0.01em;
  line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lobby__host {
  margin: 0 0 24px;
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.6;
}
.lobby__host strong { color: var(--fg); font-weight: 600; }
.lobby__role {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--fg-dim);
  margin-top: 4px;
  text-transform: uppercase;
}

.lobby__divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 0 0 20px;
}

.lobby__participants {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 8px 14px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--fg-dim);
}

.lobby__join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  padding: 14px 22px;
  border-radius: var(--radius-btn);
  box-shadow: 0 12px 30px -8px rgba(245, 166, 35, 0.55);
  transition: background-color 160ms var(--ease),
              transform 160ms var(--ease),
              box-shadow 160ms var(--ease);
}
.lobby__join:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 16px 36px -8px rgba(245, 166, 35, 0.7);
}
.lobby__join-icon {
  width: 18px;
  height: 18px;
  transition: transform 160ms var(--ease);
}
.lobby__join:hover .lobby__join-icon { transform: translateX(3px); }

.lobby__hint {
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(245, 245, 247, 0.4);
}
.lobby__hint span { color: var(--fg-soft); }

@media (max-width: 480px) {
  .lobby__card { padding: 28px 24px 22px; }
  .lobby__avatar { width: 60px; height: 60px; margin-bottom: 14px; }
  .lobby__title { font-size: 24px; }
}
