:root {
  color-scheme: dark;
  --bg: #0a0a0e;
  --bg-soft: #101016;
  --panel: rgba(20, 20, 28, 0.82);
  --panel-solid: #15151d;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #f5f0e6;
  --muted: #a8a39a;
  --muted-dim: #76726c;
  --accent: #f2b56b;
  --accent-bright: #ffd09a;
  --accent-ink: #211407;
  --danger: #ff8a7a;
  --success: #91d5a7;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-lg: 0 32px 90px rgba(0, 0, 0, 0.55);
  --font-sans: "Inter", "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Iowan Old Style", "Songti SC", "Noto Serif SC", "STSong",
    Georgia, serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Menlo,
    Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(242, 181, 107, 0.09), transparent 58%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.23;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 0.55px, transparent 0.55px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: block;
}

.icon-small {
  width: 15px;
  height: 15px;
}

.container {
  width: min(1180px, calc(100% - 64px));
  margin-inline: auto;
}

.container-wide {
  width: min(1420px, calc(100% - 64px));
  margin-inline: auto;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.ambient-orb-a {
  top: -16vw;
  left: 52%;
  width: 46vw;
  height: 46vw;
  background: rgba(197, 113, 38, 0.14);
}

.ambient-orb-b {
  top: 44vh;
  left: -18vw;
  width: 40vw;
  height: 40vw;
  background: rgba(94, 83, 140, 0.12);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 72% 50% at 50% 0%, #000 0%, transparent 78%);
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 94px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(242, 181, 107, 0.55);
  border-radius: 50%;
  background: rgba(242, 181, 107, 0.06);
}

.brand-mark::before {
  width: 0;
  height: 0;
  margin-left: 2px;
  content: "";
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--accent);
}

.brand-mark span {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(242, 181, 107, 0.1);
  border-radius: 50%;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.brand-en {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
}

.topbar-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(145, 213, 167, 0.09);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  transition: color 180ms ease;
}

.text-link:hover {
  color: var(--accent);
}

/* ---------- 首页 ---------- */

.landing {
  position: relative;
  z-index: 2;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.78fr);
  gap: clamp(48px, 7vw, 100px);
  align-items: start;
  padding: clamp(58px, 8vw, 102px) 0 clamp(64px, 8vw, 100px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow > span {
  color: var(--accent);
}

.hero h1 {
  max-width: 760px;
  margin-top: 26px;
  font-family: var(--font-serif);
  font-size: clamp(54px, 6.4vw, 92px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.lede {
  max-width: 560px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.95;
}

.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.feature-chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.feature-chips li span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-art {
  position: relative;
  width: min(100%, 510px);
  margin-top: 54px;
  padding-left: 17px;
}

.film-edge {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 10px;
  border-radius: 4px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.25) 0 2px, transparent 2.5px)
      0 0 / 10px 19px repeat-y;
  opacity: 0.55;
}

.hero-screen {
  position: relative;
  overflow: hidden;
  padding: 22px 24px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background:
    radial-gradient(ellipse at 74% 10%, rgba(242, 181, 107, 0.22), transparent 48%),
    linear-gradient(145deg, #22202a, #121116 58%, #0c0c10);
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.1deg);
}

.hero-screen::after {
  position: absolute;
  top: 46%;
  right: -8%;
  width: 62%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: rotate(-28deg);
}

.screen-top,
.screen-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.13em;
}

.screen-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}

.screen-live i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2s ease-in-out infinite;
}

.screen-title {
  position: relative;
  z-index: 1;
  margin: 34px 0 40px;
  color: rgba(255, 248, 236, 0.92);
  font-family: var(--font-sans);
  font-size: clamp(50px, 5.2vw, 72px);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.78;
}

.screen-title::before {
  position: absolute;
  top: -10px;
  left: 3px;
  width: 34px;
  height: 2px;
  content: "";
  background: var(--accent);
}

.screen-track {
  position: relative;
  z-index: 1;
  height: 3px;
  margin-bottom: 11px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.13);
}

.track-progress {
  position: absolute;
  inset: 0 38% 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(242, 181, 107, 0.5), var(--accent));
}

.track-knob {
  position: absolute;
  top: 50%;
  left: 62%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 14px rgba(242, 181, 107, 0.8);
  transform: translate(-50%, -50%);
}

.hero-art-caption {
  margin: 14px 0 0 6px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.2em;
}

.create-panel {
  position: relative;
  margin-top: 8px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.045), transparent 45%),
    var(--panel);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px);
}

.create-panel::before {
  position: absolute;
  top: -1px;
  right: 44px;
  left: 44px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(242, 181, 107, 0.75), transparent);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
}

.panel-kicker {
  margin-bottom: 7px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.panel-head h2 {
  font-family: var(--font-serif);
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.panel-step {
  padding-top: 4px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.field {
  min-width: 0;
  margin-bottom: 18px;
}

.field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
}

.field label span {
  color: var(--muted-dim);
  font-size: 10px;
  font-weight: 400;
}

.input-wrap {
  position: relative;
}

.field input {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-size: 13.5px;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.field input::placeholder {
  color: #6d6963;
}

.field input:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.field input:focus {
  border-color: rgba(242, 181, 107, 0.72);
  background: rgba(0, 0, 0, 0.34);
  box-shadow: 0 0 0 3px rgba(242, 181, 107, 0.1);
}

.input-wrap input {
  padding-right: 62px;
}

.input-mark {
  position: absolute;
  top: 50%;
  right: 13px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  transform: translateY(-50%);
}

.field-hint {
  margin-top: 7px;
  color: var(--muted-dim);
  font-size: 10.5px;
  line-height: 1.5;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-error {
  margin: 2px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 138, 122, 0.28);
  border-radius: 9px;
  background: rgba(255, 138, 122, 0.07);
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 28px rgba(242, 181, 107, 0.16);
}

.btn-primary:hover {
  background: var(--accent-bright);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(242, 181, 107, 0.4);
  background: rgba(242, 181, 107, 0.07);
}

.btn-wide {
  width: 100%;
  min-height: 50px;
}

.btn .icon {
  width: 17px;
  height: 17px;
  transition: transform 160ms ease;
}

.btn:hover .icon {
  transform: translateX(2px);
}

.panel-foot {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--muted-dim);
  font-size: 10.5px;
  line-height: 1.6;
}

.panel-foot .icon {
  margin-top: 2px;
}

.how {
  padding: 64px 0 80px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 38px;
}

.section-heading h2 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.5vw, 46px);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--line);
}

.how-card {
  position: relative;
  min-height: 210px;
  padding: 28px 26px;
  background: rgba(15, 15, 21, 0.94);
  transition: background 200ms ease;
}

.how-card:hover {
  background: rgba(24, 23, 29, 0.98);
}

.how-index {
  display: block;
  margin-bottom: 44px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.how-card h3 {
  margin-bottom: 9px;
  font-size: 16px;
  font-weight: 600;
}

.how-card p {
  max-width: 280px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

/* ---------- 加入页 ---------- */

#join-view {
  min-height: 100vh;
}

.join-main {
  display: grid;
  min-height: calc(100vh - 170px);
  padding: 54px 0 70px;
  place-items: center;
}

.join-card {
  position: relative;
  width: min(100%, 660px);
  padding: clamp(28px, 5vw, 52px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 100% 0, rgba(242, 181, 107, 0.12), transparent 38%),
    var(--panel);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
}

.join-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  content: "";
  background: repeating-linear-gradient(
    180deg,
    rgba(242, 181, 107, 0.7) 0 3px,
    transparent 3px 13px
  );
  opacity: 0.7;
}

.join-kicker {
  margin-top: 38px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.join-card h1 {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: clamp(36px, 5.4vw, 54px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.join-byline {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.join-details {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 1px;
  margin: 32px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.join-details > div {
  min-width: 0;
  padding: 13px 15px;
  background: rgba(12, 12, 17, 0.82);
}

.join-details span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.join-details b {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.join-card .field {
  margin-bottom: 16px;
}

.join-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-dim);
  font-size: 10.5px;
}

.join-missing {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.join-missing p {
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 房间 ---------- */

.room-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  border-bottom: 1px solid var(--line);
}

.brand-compact .brand-mark {
  width: 32px;
  height: 32px;
}

.brand-compact .brand-name {
  font-size: 20px;
}

.room-bar-mid {
  display: flex;
  align-items: center;
  gap: 10px;
}

.code-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  transition:
    border-color 180ms ease,
    color 180ms ease;
}

.code-button:hover {
  border-color: rgba(242, 181, 107, 0.4);
  color: var(--accent);
}

.code-button > span {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.code-button b {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
}

.connection-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-dim);
}

.connection-pill[data-state="online"] i {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(145, 213, 167, 0.1);
}

.connection-pill[data-state="connecting"] i {
  background: var(--accent);
  animation: blink 1.2s ease-in-out infinite;
}

.connection-pill[data-state="offline"] {
  color: var(--danger);
}

.connection-pill[data-state="offline"] i {
  background: var(--danger);
}

.room-bar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.presence-inline {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 10.5px;
}

.avatar-stack {
  display: flex;
  flex-direction: row-reverse;
  padding-left: 7px;
}

.avatar {
  display: grid;
  width: 25px;
  height: 25px;
  margin-left: -7px;
  place-items: center;
  border: 2px solid var(--bg);
  border-radius: 50%;
  color: rgba(12, 9, 4, 0.84);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.avatar-more {
  background: #2a2a33 !important;
  color: var(--muted) !important;
}

.leave-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-dim);
  font-size: 10.5px;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.leave-button:hover {
  background: rgba(255, 138, 122, 0.08);
  color: var(--danger);
}

.room-main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
  padding: 28px 0 56px;
}

.stage {
  min-width: 0;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  background: #030304;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  isolation: isolate;
}

.player-shell video {
  display: block;
  width: 100%;
  height: 100%;
  background: #030304;
  object-fit: contain;
}

.player-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 22%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 28%);
}

.player-topline {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 17px;
  pointer-events: none;
}

.status-chip,
.host-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(8, 8, 11, 0.54);
  color: rgba(255, 255, 255, 0.72);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(12px);
}

.status-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-dim);
}

.status-chip[data-tone="playing"] i {
  background: var(--accent);
  box-shadow: 0 0 9px rgba(242, 181, 107, 0.9);
}

.status-chip[data-tone="paused"] i {
  background: #d9b98d;
}

.status-chip[data-tone="waiting"] i {
  background: var(--accent);
  animation: blink 1.2s ease-in-out infinite;
}

.status-chip[data-tone="error"] i {
  background: var(--danger);
}

.host-chip {
  color: var(--muted);
}

.host-chip .icon {
  color: var(--accent);
}

.host-chip[data-online="true"] {
  color: rgba(255, 255, 255, 0.8);
}

.player-curtain {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  padding: 25px;
  place-items: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(38, 30, 20, 0.34), transparent 55%),
    rgba(5, 5, 7, 0.74);
  text-align: center;
  backdrop-filter: blur(3px);
  transition: opacity 260ms ease;
}

.curtain-inner {
  max-width: 470px;
}

.curtain-kicker {
  display: block;
  margin-bottom: 13px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
}

.player-curtain h2 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.player-curtain p {
  max-width: 390px;
  margin: 11px auto 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.player-curtain .btn {
  min-height: 42px;
  padding: 0 20px;
}

.player-curtain .btn[hidden] {
  display: none;
}

.player-spinner {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: rgba(4, 4, 6, 0.68);
  color: var(--muted);
  font-size: 11px;
  backdrop-filter: blur(4px);
}

.spinner {
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.player-error {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 6, 6, 0.91);
  text-align: center;
}

.error-mark {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 13px;
  place-items: center;
  border: 1px solid rgba(255, 138, 122, 0.45);
  border-radius: 50%;
  color: var(--danger);
  font-family: var(--font-serif);
  font-size: 18px;
}

.player-error h3 {
  font-size: 17px;
  font-weight: 600;
}

.player-error p {
  max-width: 480px;
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.player-bottom {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  padding: 46px 17px 12px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42) 55%, transparent);
  transition: opacity 200ms ease;
}

.timeline {
  display: flex;
  align-items: center;
  height: 18px;
}

#seek-range {
  width: 100%;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

#seek-range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    var(--accent) 0 var(--seek-progress, 0%),
    rgba(255, 255, 255, 0.22) var(--seek-progress, 0%) 100%
  );
}

#seek-range::-moz-range-track {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
}

#seek-range::-moz-range-progress {
  height: 3px;
  border-radius: 99px;
  background: var(--accent);
}

#seek-range::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 4px rgba(242, 181, 107, 0.12);
  opacity: 0;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  -webkit-appearance: none;
  appearance: none;
}

#seek-range::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-bright);
  opacity: 0;
}

#seek-range:hover::-webkit-slider-thumb,
#seek-range:focus-visible::-webkit-slider-thumb {
  opacity: 1;
}

#seek-range:hover::-moz-range-thumb,
#seek-range:focus-visible::-moz-range-thumb {
  opacity: 1;
}

#seek-range:disabled {
  cursor: default;
}

#seek-range:disabled::-webkit-slider-thumb {
  opacity: 0;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.78);
}

.control-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  transition:
    background 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.control-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.control-button:disabled {
  opacity: 0.32;
}

.control-button-small {
  width: 30px;
  height: 30px;
}

.control-button .icon {
  width: 19px;
  height: 19px;
}

.icon-pause,
.icon-muted {
  display: none;
}

.control-button.is-playing .icon-play {
  display: none;
}

.control-button.is-playing .icon-pause {
  display: block;
}

.control-button.is-muted .icon-volume {
  display: none;
}

.control-button.is-muted .icon-muted {
  display: block;
}

.time-display {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 0 5px;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.time-divider {
  color: rgba(255, 255, 255, 0.28);
}

#duration-time {
  color: rgba(255, 255, 255, 0.38);
}

.volume-group {
  display: flex;
  align-items: center;
}

.volume-range {
  width: 64px;
  height: 18px;
  margin: 0 2px 0 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.volume-range::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.26);
}

.volume-range::-moz-range-track {
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.26);
}

.volume-range::-webkit-slider-thumb {
  width: 7px;
  height: 7px;
  margin-top: -2.5px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  -webkit-appearance: none;
}

.volume-range::-moz-range-thumb {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
}

.control-spacer {
  flex: 1;
  min-width: 4px;
}

.sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 9px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.sync-indicator i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.sync-indicator[data-state="synced"] {
  color: rgba(145, 213, 167, 0.82);
}

.sync-indicator[data-state="waiting"] {
  color: rgba(242, 181, 107, 0.8);
}

.sync-indicator[data-state="offline"] {
  color: var(--danger);
}

.speed-button {
  min-width: 36px;
  height: 26px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 9px;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.speed-button:hover:not(:disabled) {
  border-color: rgba(242, 181, 107, 0.5);
  color: var(--accent);
}

.speed-button:disabled {
  opacity: 0.35;
}

.stage-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding: 19px 2px 0;
}

.title-block {
  min-width: 0;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.title-row h1 {
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: clamp(23px, 2.5vw, 31px);
  font-weight: 500;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-badge {
  flex: none;
  padding: 3px 8px;
  border: 1px solid rgba(242, 181, 107, 0.26);
  border-radius: 999px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.role-badge[data-role="host"] {
  background: rgba(242, 181, 107, 0.1);
}

#room-byline {
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted-dim);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-meta > .btn {
  flex: none;
}

.mobile-side {
  display: none;
}

/* ---------- 房间侧栏 ---------- */

.room-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.side-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.025), transparent 50%),
    rgba(16, 16, 22, 0.76);
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.side-head h2 {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.side-code {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

.side-desc {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.75;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

.stat-grid > div {
  padding: 10px 12px;
  background: rgba(8, 8, 11, 0.7);
}

.stat-grid span {
  display: block;
  margin-bottom: 1px;
  color: var(--muted-dim);
  font-size: 8px;
}

.stat-grid b {
  font-size: 13px;
  font-weight: 500;
}

.side-card .btn {
  min-height: 39px;
  font-size: 11.5px;
}

.side-badge {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: rgba(242, 181, 107, 0.1);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
}

.member-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.member {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 7px 6px;
  border-radius: 8px;
}

.member:hover {
  background: rgba(255, 255, 255, 0.025);
}

.member-avatar {
  display: grid;
  width: 27px;
  height: 27px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  color: rgba(10, 8, 5, 0.82);
  font-size: 9px;
  font-weight: 700;
}

.member-info {
  min-width: 0;
  flex: 1;
}

.member-name {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-name .icon {
  width: 11px;
  height: 11px;
  color: var(--accent);
}

.member-role {
  color: var(--muted-dim);
  font-size: 8px;
}

.you-tag {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.side-note {
  background:
    radial-gradient(ellipse at 100% 0, rgba(242, 181, 107, 0.07), transparent 60%),
    rgba(14, 14, 19, 0.76);
}

.note-index {
  display: block;
  margin-bottom: 11px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.side-note p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.side-note ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.side-note li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted-dim);
  font-size: 9px;
  line-height: 1.5;
}

.side-note li i {
  width: 3px;
  height: 3px;
  flex: none;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- 提示 ---------- */

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: min(360px, calc(100vw - 40px));
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(20, 20, 27, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.5;
  opacity: 0;
  animation: toast-in 220ms ease forwards;
  backdrop-filter: blur(14px);
}

.toast[data-tone="error"] {
  border-color: rgba(255, 138, 122, 0.35);
  color: #ffc3ba;
}

.toast.is-leaving {
  animation: toast-out 200ms ease forwards;
}

/* ---------- 全屏 ---------- */

.player-shell:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: #000;
}

.player-shell:fullscreen video {
  height: 100%;
}

.player-shell:fullscreen .player-topline {
  padding: 24px;
}

.player-shell:fullscreen .player-bottom {
  padding: 70px 28px 20px;
}

/* ---------- 动效 ---------- */

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

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

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(5px);
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 52px;
  }

  .room-main {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 20px;
  }

  .room-bar-right {
    gap: 10px;
  }

  .presence-inline > span {
    display: none;
  }
}

@media (max-width: 940px) {
  .container,
  .container-wide {
    width: min(100% - 44px, 760px);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 54px;
  }

  .hero h1 {
    font-size: clamp(50px, 9vw, 76px);
  }

  .hero-art {
    margin-top: 40px;
  }

  .create-panel {
    max-width: 620px;
    margin-top: 0;
  }

  .room-main {
    grid-template-columns: 1fr;
  }

  .room-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .side-note {
    grid-column: 1 / -1;
  }

  .mobile-side {
    display: block;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(16, 16, 22, 0.76);
  }

  .mobile-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
  }

  .mobile-side-head h2 {
    font-size: 12px;
    font-weight: 600;
  }

  .mobile-side-head span {
    color: var(--muted-dim);
    font-size: 9px;
  }

  .mobile-side .member-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .container,
  .container-wide {
    width: calc(100% - 30px);
  }

  .topbar {
    min-height: 76px;
  }

  .brand-en {
    display: none;
  }

  .brand-name {
    font-size: 21px;
  }

  .topbar-note {
    font-size: 9px;
  }

  .hero {
    padding: 42px 0 58px;
  }

  .hero h1 {
    margin-top: 20px;
    font-size: clamp(44px, 12vw, 64px);
  }

  .lede {
    margin-top: 21px;
    font-size: 14px;
    line-height: 1.85;
  }

  .feature-chips {
    margin-top: 20px;
  }

  .hero-art {
    margin-top: 34px;
  }

  .screen-title {
    margin: 26px 0 30px;
    font-size: 46px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .panel-head {
    margin-bottom: 24px;
  }

  .how {
    padding: 44px 0 54px;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  .how-card {
    min-height: 155px;
  }

  .how-index {
    margin-bottom: 28px;
  }

  .section-heading {
    display: block;
    margin-bottom: 26px;
  }

  .section-heading h2 {
    margin-top: 12px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 20px 0;
  }

  .join-main {
    display: block;
    min-height: auto;
    padding: 32px 0 54px;
  }

  .join-card {
    padding: 26px 21px 28px;
    border-radius: 22px;
  }

  .join-details {
    grid-template-columns: 1fr;
  }

  .room-bar {
    flex-wrap: wrap;
    gap: 9px 14px;
    min-height: 0;
    padding: 13px 0;
  }

  .room-bar-mid {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .room-bar-right {
    margin-left: auto;
  }

  .leave-button span {
    display: none;
  }

  .room-main {
    padding: 14px 0 42px;
  }

  .player-shell {
    border-radius: 12px;
  }

  .player-topline {
    padding: 10px;
  }

  .status-chip,
  .host-chip {
    min-height: 24px;
    padding: 0 8px;
    font-size: 8px;
  }

  .host-chip .icon {
    width: 12px;
    height: 12px;
  }

  .player-curtain {
    padding: 18px;
  }

  .player-curtain h2 {
    font-size: 24px;
  }

  .player-curtain p {
    margin: 8px auto 16px;
    font-size: 10.5px;
  }

  .player-bottom {
    padding: 38px 10px 7px;
  }

  .control-row {
    gap: 3px;
  }

  .control-button {
    width: 31px;
    height: 31px;
  }

  .control-button .icon {
    width: 17px;
    height: 17px;
  }

  .volume-range {
    display: none;
  }

  .time-display {
    padding: 0 2px;
    font-size: 9.5px;
  }

  .sync-indicator span {
    display: none;
  }

  .sync-indicator {
    padding: 0 3px;
  }

  .speed-button {
    min-width: 31px;
    height: 24px;
    font-size: 8.5px;
  }

  .stage-meta {
    display: block;
    padding-top: 15px;
  }

  .title-row h1 {
    font-size: 24px;
  }

  .stage-meta > .btn {
    width: 100%;
    margin-top: 14px;
  }

  .room-side {
    grid-template-columns: 1fr;
  }

  .side-note {
    grid-column: auto;
  }

  .mobile-side .member-list {
    grid-template-columns: 1fr;
  }

  .toast-region {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .toast {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .presence-inline {
    display: none;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-art-caption {
    display: none;
  }

  .screen-title {
    font-size: 40px;
  }

  .create-panel {
    padding: 22px 18px;
  }

  .panel-step {
    display: none;
  }

  .topbar-note {
    display: none;
  }

  .join-card {
    padding: 23px 17px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
