:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #0d1b2c;
  --panel-2: #101f33;
  --line: #1f3850;
  --muted: #7f96aa;
  --text: #edf7ff;
  --cyan: #22d3ee;
  --cyan-2: #0ea5e9;
  --purple: #8b5cf6;
  --green: #34d399;
  --danger: #fb7185;
  --sidebar: 274px;
  --topbar: 62px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
.ambient { position: fixed; pointer-events: none; filter: blur(0); opacity: .5; z-index: -1; }
.ambient-a { width: 460px; height: 460px; left: -170px; top: 80px; background: radial-gradient(circle, rgba(34,211,238,.17), transparent 68%); }
.ambient-b { width: 560px; height: 560px; right: -180px; bottom: -180px; background: radial-gradient(circle, rgba(139,92,246,.15), transparent 67%); }
.brandbar { width: min(1180px, calc(100% - 42px)); margin: 0 auto; padding: 28px 0; display: flex; align-items: center; gap: 12px; }
.brand { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; }
.brand b { color: #8be9f7; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: #03121b; background: linear-gradient(135deg, #67e8f9, #38bdf8); font-weight: 1000; box-shadow: 0 0 28px rgba(34,211,238,.2); }
.brand-pill { padding: 4px 8px; border: 1px solid rgba(34,211,238,.25); background: rgba(34,211,238,.07); color: #67e8f9; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.landing-shell { min-height: 100vh; display: flex; flex-direction: column; }
.hero { width: min(1080px, calc(100% - 42px)); margin: auto; padding: 50px 0 90px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 84px; align-items: center; }
.eyebrow, .entry-kicker { color: #67e8f9; font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.hero h1 { margin: 14px 0 18px; font-size: clamp(44px, 5vw, 72px); line-height: .98; letter-spacing: -.055em; }
.hero h1 span { color: #8be9f7; }
.hero-copy > p { max-width: 630px; margin: 0; color: #9db0c0; font-size: 17px; line-height: 1.65; }
.benefits { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 28px; color: #9fb6c9; font-size: 12px; }
.entry-card { padding: 26px; border-radius: 18px; border: 1px solid #1d3b53; background: linear-gradient(180deg, rgba(16,33,52,.95), rgba(8,20,33,.96)); box-shadow: 0 30px 100px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.02); }
.entry-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.entry-head h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.02em; }
.status-dot-label { display: flex; gap: 7px; align-items: center; font-size: 11px; color: #7f96aa; }
.status-dot-label i, .top-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px rgba(52,211,153,.5); }
.field-label { display: block; margin-bottom: 7px; color: #7f96aa; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.input { width: 100%; height: 45px; border: 1px solid #1e4058; border-radius: 10px; background: #071521; color: #ecf8ff; outline: none; padding: 0 13px; transition: .2s; }
.input:focus { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34,211,238,.08); }
.btn { min-height: 42px; border: 1px solid transparent; border-radius: 10px; padding: 0 15px; cursor: pointer; font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: .18s ease; }
.btn:disabled { opacity: .5; cursor: wait; }
.btn-primary { color: #021116; background: linear-gradient(135deg, #22d3ee, #38bdf8); box-shadow: 0 8px 30px rgba(34,211,238,.13); }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-secondary, .btn-ghost { background: #0c1b2a; border-color: #1f4158; color: #cce6f2; }
.btn-secondary:hover, .btn-ghost:hover { border-color: #2c607a; background: #102438; }
.btn-wide { width: 100%; }
.entry-card > .btn-wide { margin-top: 12px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 13px; color: #587086; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.divider:before, .divider:after { content: ''; height: 1px; flex: 1; background: #1a3348; }
.join-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; }
.error-text { min-height: 18px; margin: 9px 0 0; color: #fda4af; font-size: 11px; line-height: 1.45; }
.landing-footer { text-align: center; padding: 0 20px 22px; color: #4f6578; font-size: 10px; }

.room-shell { height: 100vh; min-height: 620px; display: grid; grid-template-columns: var(--sidebar) 1fr; grid-template-rows: var(--topbar) 1fr; overflow: hidden; background: #050e17; }
.room-topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid #173146; background: #0a1825; z-index: 5; }
.brand.compact { font-size: 13px; }
.brand.compact .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
.room-code-chip, .top-chip { min-height: 31px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #1d455c; background: #0a2130; border-radius: 8px; color: #74e8fa; padding: 0 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.room-code-chip { cursor: pointer; }
.room-code-chip small { color: #678195; font-family: inherit; }
.topbar-spacer { flex: 1; }
.top-chip { color: #9db4c5; font-family: inherit; background: #0c1b29; border-color: #1d3649; }
.top-chip.connected { color: #6ee7b7; }
.sidebar { grid-row: 2; display: flex; flex-direction: column; min-width: 0; background: #07131e; border-right: 1px solid #173146; overflow: hidden; }
.invite-card { padding: 17px 14px 13px; border-bottom: 1px solid #173146; }
.side-label { display: block; color: #587086; font-size: 9px; font-weight: 900; letter-spacing: .12em; margin-bottom: 7px; }
.invite-card strong { display: block; margin-bottom: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; font-size: 15px; }
.people-section { padding: 13px 9px 0; }
.people-section-rest { flex: 1; overflow: auto; }
.people-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 5px 8px; color: #587086; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.people-heading b { color: #7e9aae; }
.people-list { display: flex; flex-direction: column; gap: 4px; }
.person { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 9px; min-width: 0; }
.person.sharing { background: #122b39; border: 1px solid #1d485a; }
.avatar { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #22d3ee); color: white; font-size: 10px; font-weight: 900; }
.person-meta { min-width: 0; flex: 1; }
.person-meta strong { display: flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-meta small { display: block; margin-top: 2px; color: #628096; font-size: 9px; }
.badge-you, .badge-host { padding: 2px 4px; border-radius: 4px; font-size: 8px; font-weight: 900; }
.badge-you { color: #67e8f9; background: rgba(34,211,238,.12); }
.badge-host { color: #fcd34d; background: rgba(245,158,11,.1); }
.share-mini { color: #6ee7b7; font-size: 13px; }
.sidebar-self { display: flex; align-items: center; gap: 10px; padding: 13px; border-top: 1px solid #173146; background: #081724; }
.sidebar-self strong { display: block; font-size: 11px; }
.sidebar-self small { color: #587086; font-size: 9px; }
.stage { grid-column: 2; grid-row: 2; position: relative; min-width: 0; min-height: 0; overflow: hidden; background: radial-gradient(circle at 50% 40%, rgba(18,55,75,.20), transparent 43%), #040c14; }
.empty-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding: 30px; }
.empty-icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 18px; border: 1px dashed #265069; color: #7796aa; background: #0b1a27; font-size: 27px; }
.empty-state h2 { margin: 17px 0 7px; font-size: 18px; }
.empty-state p { margin: 0 0 19px; color: #718a9c; font-size: 12px; }
.empty-actions { display: flex; gap: 9px; }
.video-grid { position: absolute; inset: 12px 12px 82px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); grid-auto-rows: minmax(0, 1fr); align-items: stretch; }
.video-tile { position: relative; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid #183b50; border-radius: 12px; background: #020609; cursor: pointer; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.video-tile video { width: 100%; height: 100%; object-fit: contain; background: #010305; }
.video-label { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 5px 8px; border-radius: 7px; background: rgba(3,12,18,.78); border: 1px solid rgba(111,231,255,.13); backdrop-filter: blur(10px); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-tile.focused { position: absolute; inset: 0; z-index: 4; }
.video-grid:has(.video-tile.focused) .video-tile:not(.focused) { display: none; }
.controls { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; padding: 7px; border: 1px solid #1b4056; border-radius: 14px; background: rgba(7,24,35,.9); box-shadow: 0 15px 45px rgba(0,0,0,.26); backdrop-filter: blur(14px); }
.controls .btn { min-height: 38px; }
.control-divider { width: 1px; height: 24px; background: #244255; }
.icon-btn { width: 37px; height: 37px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; color: #8ca6b9; }
.icon-btn:hover { background: #10283a; color: #d9f4ff; }
.overlay { position: fixed; inset: var(--topbar) 0 0 0; z-index: 20; display: grid; place-items: center; background: rgba(2,8,13,.76); backdrop-filter: blur(9px); }
.join-modal { width: min(390px, calc(100% - 34px)); padding: 26px; border-radius: 17px; border: 1px solid #20465d; background: #0c1a28; box-shadow: 0 35px 110px rgba(0,0,0,.45); }
.join-modal h2 { margin: 7px 0 6px; font-size: 21px; }
.join-modal > p:not(.error-text) { margin: 0 0 17px; color: #7f96aa; font-size: 12px; }
.join-modal .btn { margin-top: 11px; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 30; padding: 9px 13px; border-radius: 9px; color: #dff9ff; background: #10283a; border: 1px solid #27516a; box-shadow: 0 12px 40px rgba(0,0,0,.3); font-size: 11px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 38px; width: min(660px, calc(100% - 34px)); padding-top: 20px; }
  .hero h1 { font-size: clamp(42px, 12vw, 64px); }
  .room-shell { --sidebar: 220px; }
}
@media (max-width: 700px) {
  .room-shell { grid-template-columns: 1fr; grid-template-rows: var(--topbar) 1fr; }
  .sidebar { display: none; }
  .stage { grid-column: 1; }
  .brand.compact span:not(.brand-mark) { display: none; }
  .room-code-chip small, .top-chip:first-of-type { display: none; }
  .video-grid { inset: 8px 8px 76px; }
  .controls { width: calc(100% - 22px); justify-content: center; }
  .controls .btn { flex: 1; }
}
