:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  color: #f5f3ec;
  background: #080a0f;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #f5f3ec;
  --muted: #9499a7;
  --line: rgb(255 255 255 / 0.11);
  --panel: rgb(17 20 28 / 0.86);
  --acid: #d9ff57;
  --acid-ink: #11150a;
  --coral: #ff7657;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: #080a0f; }
body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% -10%, rgb(94 91 130 / 0.24), transparent 35%),
    linear-gradient(145deg, #0b0d13 0%, #07080c 58%, #0b0d12 100%);
}

button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.42; }
button:focus-visible, input:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 36rem;
  height: 36rem;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.12;
}
.ambient-one { top: -18rem; right: -12rem; background: var(--acid); }
.ambient-two { bottom: -24rem; left: -15rem; background: #665cff; }

.site-header {
  width: min(1180px, calc(100% - 48px));
  height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand > span:last-child { display: grid; gap: 1px; }
.brand small {
  color: var(--acid);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.2em;
}
.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-content: center;
  gap: 4px;
  border: 2px solid var(--acid);
  border-radius: 11px;
  transform: rotate(-4deg);
}
.brand-mark i { width: 15px; height: 3px; border-radius: 4px; background: var(--acid); }

.privacy-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
}
.privacy-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 12px rgb(217 255 87 / 0.7);
}

main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.join-view {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  align-items: center;
  gap: clamp(48px, 8vw, 120px);
  padding: 64px 4vw 84px;
}
.join-copy { max-width: 650px; }
.eyebrow, .card-kicker {
  margin: 0;
  color: var(--acid);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
}
.join-copy h1 {
  margin: 18px 0 24px;
  font-size: clamp(52px, 7.1vw, 92px);
  line-height: 0.91;
  letter-spacing: -0.065em;
  font-weight: 720;
}
.join-copy h1 em { color: var(--acid); font-family: Georgia, serif; font-weight: 400; }
.lede {
  max-width: 570px;
  margin: 0;
  color: #a9adba;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.72;
}
.trust-row {
  display: flex;
  gap: clamp(18px, 3vw, 38px);
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.trust-row span { display: grid; gap: 6px; color: #b8bbc5; font-size: 11px; }
.trust-row i { color: #5d6271; font: 700 9px "Cascadia Mono", Consolas, monospace; }

.join-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  justify-self: end;
  padding: clamp(30px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.13);
  border-radius: 22px;
  background:
    linear-gradient(150deg, rgb(31 35 45 / 0.92), rgb(14 16 23 / 0.94)),
    var(--panel);
  box-shadow: 0 36px 100px rgb(0 0 0 / 0.42);
  backdrop-filter: blur(24px);
}
.join-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgb(255 255 255 / 0.05), transparent 32%);
}
.ticket-notch { position: absolute; right: 34px; width: 1px; height: 17px; background: var(--line); }
.ticket-notch-top { top: 0; }
.ticket-notch-bottom { bottom: 0; }
.join-card h2 { margin: 13px 0 8px; font-size: 31px; letter-spacing: -0.045em; }
.card-help { margin: 0 0 29px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.join-card form { position: relative; z-index: 1; }
.join-card label {
  display: block;
  margin-bottom: 9px;
  color: #c7c9d0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
#roomCode {
  width: 100%;
  height: 68px;
  border: 1px solid #383d4b;
  border-radius: 12px;
  padding: 0 18px;
  color: var(--acid);
  background: #090b10;
  caret-color: var(--acid);
  font: 750 29px/1 "Cascadia Mono", Consolas, monospace;
  letter-spacing: 0.23em;
  text-align: center;
  text-transform: uppercase;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
#roomCode::placeholder { color: #383d48; }
#roomCode:focus { border-color: rgb(217 255 87 / 0.65); box-shadow: 0 0 0 4px rgb(217 255 87 / 0.07); outline: 0; }
.form-error { min-height: 18px; margin: 8px 0 6px; color: #ff9b84; font-size: 11px; line-height: 1.45; }
.join-button {
  width: 100%;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 11px;
  padding: 0 17px 0 20px;
  color: var(--acid-ink);
  background: var(--acid);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 16px 38px rgb(217 255 87 / 0.13);
  transition: transform 160ms ease, filter 160ms ease;
}
.join-button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); }
.join-button i { font-size: 20px; font-style: normal; }
.secure-note {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #747987;
  font-size: 9px;
  line-height: 1.55;
}
.lock { width: 11px; height: 9px; flex: 0 0 auto; margin-top: 2px; border: 1px solid #686e7d; border-radius: 2px; }
.lock::before { content: ""; display: block; width: 6px; height: 5px; margin: -6px auto 0; border: 1px solid #686e7d; border-bottom: 0; border-radius: 5px 5px 0 0; }

.player-view { min-height: calc(100vh - 92px); padding: 34px 0 24px; }
.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 158px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #020304;
  box-shadow: 0 32px 100px rgb(0 0 0 / 0.48);
}
.player-shell video { width: 100%; height: 100%; display: block; object-fit: contain; background: #020304; }
.player-shell:fullscreen { width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; }
.player-gradient { position: absolute; inset-inline: 0; height: 150px; pointer-events: none; }
.player-gradient-top { top: 0; background: linear-gradient(#000a, transparent); }
.player-gradient-bottom { bottom: 0; background: linear-gradient(transparent, #000d); }
.player-topbar {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: #d6d8df;
  font-size: 11px;
}
.player-topbar > div:first-child { display: flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #737887; }
.live-dot.online { background: var(--acid); box-shadow: 0 0 12px rgb(217 255 87 / 0.75); }
.room-badge { padding: 7px 10px; border: 1px solid rgb(255 255 255 / 0.14); border-radius: 999px; color: #8f94a1; font-size: 9px; letter-spacing: 0.1em; }
.room-badge strong { color: var(--ink); margin-left: 4px; font-family: "Cascadia Mono", Consolas, monospace; letter-spacing: 0.12em; }
.text-button { border: 0; padding: 8px; color: #bbbfc9; background: transparent; font-size: 11px; }
.waiting-card, .unlock-card {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  min-width: min(340px, calc(100% - 40px));
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 24px 28px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 16px;
  color: var(--ink);
  background: rgb(15 17 23 / 0.88);
  backdrop-filter: blur(18px);
  text-align: center;
}
.waiting-card > span:last-child, .unlock-card small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.waiting-icon { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 3px; padding-left: 2px; border: 1px solid #3d424e; border-radius: 50%; color: var(--acid); font-size: 14px; }
.unlock-card { border-color: rgb(217 255 87 / 0.3); }
.unlock-card > span { color: var(--acid); font-size: 20px; }
.player-controls {
  position: absolute;
  z-index: 5;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 13px 16px 14px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 14px;
  background: rgb(10 12 17 / 0.84);
  backdrop-filter: blur(16px);
}
.timeline-row { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 11px; color: #c5c8d0; font: 9px "Cascadia Mono", Consolas, monospace; }
.timeline-row span:last-child { text-align: right; }
input[type="range"] { accent-color: var(--acid); }
.timeline-row input { width: 100%; height: 18px; margin: 0; }
.control-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.icon-button {
  min-width: 36px;
  height: 34px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 9px;
  padding: 0 8px;
  color: #d8dae0;
  background: rgb(255 255 255 / 0.04);
  font-size: 9px;
  font-weight: 750;
}
.primary-control { width: 38px; border: 0; color: var(--acid-ink); background: var(--acid); font-size: 13px; }
.now-playing { min-width: 0; display: grid; gap: 2px; margin: 0 auto 0 5px; }
.now-playing strong { max-width: 35vw; overflow: hidden; color: #f3f1ec; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.now-playing span { color: #818693; font-size: 9px; }
.volume { width: 70px; }
.keyboard-help { margin: 13px 0 0; color: #5f6471; font-size: 9px; text-align: center; }
.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 24px;
  max-width: min(500px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 11px 15px;
  border: 1px solid rgb(255 118 87 / 0.38);
  border-radius: 10px;
  color: #ffd0c5;
  background: rgb(65 24 20 / 0.92);
  box-shadow: 0 15px 40px rgb(0 0 0 / 0.35);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 850px) {
  .site-header, main { width: min(100% - 30px, 680px); }
  .join-view { grid-template-columns: 1fr; gap: 42px; padding: 52px 0 70px; }
  .join-copy { text-align: center; }
  .lede { margin-inline: auto; }
  .trust-row { justify-content: center; }
  .join-card { justify-self: center; }
  .player-shell { max-height: none; border-radius: 14px; }
  .now-playing { display: none; }
}

@media (max-width: 560px) {
  .site-header { height: 74px; }
  .privacy-pill { display: none; }
  .brand-mark { width: 34px; height: 34px; }
  .join-view { min-height: calc(100vh - 74px); padding-top: 38px; }
  .join-copy h1 { font-size: clamp(48px, 16vw, 72px); }
  .lede { font-size: 14px; }
  .trust-row { gap: 18px; margin-top: 32px; }
  .trust-row span { font-size: 9px; }
  .join-card { padding: 28px 22px; border-radius: 17px; }
  #roomCode { height: 62px; font-size: 25px; }
  .player-view { min-height: calc(100vh - 74px); padding-top: 22px; }
  .player-shell { aspect-ratio: 9 / 14; }
  .player-topbar { padding: 0 14px; }
  .room-badge { display: none; }
  .player-controls { left: 8px; right: 8px; bottom: 8px; padding-inline: 10px; }
  .control-row { gap: 5px; }
  .icon-button { min-width: 33px; padding-inline: 6px; }
  .volume { display: none; }
  .keyboard-help { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
