:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --bg: #111214;
  --surface: #1a1b1f;
  --inset: #131417;
  --line: #303237;
  --ink: #f9f6ef;
  --secondary: #b5b3bb;
  --accent: #ffd166;
  --accent-ink: #251a06;
  --good: #9bd7ac;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; background: var(--bg); color: var(--ink); font-size: 16px; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
a { color: var(--accent); }
.top { border-bottom: 1px solid #25262a; }
.top-inner { max-width: 1250px; margin: auto; padding: 19px 28px; display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; }
.brand-mark { width: 32px; height: 29px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); }
.brand-mark i, .screen-play i, .empty-icon i, .play-button i { display: block; width: 0; height: 0; border-block: 6px solid transparent; border-left: 9px solid currentColor; margin-left: 2px; }
.top-note { font-size: .875rem; color: var(--secondary); }
main { max-width: 1250px; margin: auto; padding: 0 28px 48px; }
.lobby { display: grid; grid-template-columns: 1.2fr minmax(320px, .8fr); gap: clamp(32px, 8vw, 112px); align-items: center; min-height: 660px; padding: 59px 0; }
.kicker { color: #eee3c7; font-size: .875rem; letter-spacing: .14em; display: flex; align-items: center; gap: 10px; margin-bottom: 19px; }
.kicker span { width: 17px; height: 2px; background: var(--accent); }
h1, h2, p { margin: 0; }
.lobby h1 { font-size: clamp(3.1rem, 6.2vw, 6rem); font-weight: 850; line-height: 1.12; letter-spacing: -.065em; }
.lobby h1 span { color: var(--accent); }
.lede { color: var(--secondary); line-height: 1.8; margin-top: 22px; max-width: 450px; }
.cinema { width: min(100%, 540px); height: clamp(123px, 18vw, 200px); position: relative; isolation: isolate; margin-top: 30px; display: grid; place-items: center; overflow: hidden; border-radius: 16px; border: 1px solid #393024; background: radial-gradient(ellipse at 49% 17%, #593329 0%, #2c1c24 52%, #171418 93%); }
.cinema::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(0deg, transparent 0 4px, #110c141f 4px 5px); }
.cinema-screen { position: absolute; top: 13%; width: 62%; height: 61%; display: grid; place-items: center; overflow: hidden; border: 1px solid #cd8e5c; border-radius: 4px 4px 10px 10px; box-shadow: 0 0 38px #ffb35540; background: radial-gradient(ellipse at 52% 69%, #ffd17d, #9d5239 56%, #382332 100%); }
.screen-orbit { position: absolute; width: 115%; aspect-ratio: 2.35; transform: rotate(-18deg); border: 1px solid #ffe4a56a; border-radius: 50%; box-shadow: 0 0 0 17px #ffcf8533, 0 0 0 37px #e9ab6624; }
.screen-play { width: 44px; aspect-ratio: 1; color: #211421; background: #ffdc93; border-radius: 50%; display: grid; place-items: center; position: relative; box-shadow: 0 0 24px #2d152364; }
.cinema-seats { position: absolute; bottom: -12%; display: flex; gap: 9px; width: 73%; height: 31%; }
.cinema-seats i { flex: 1; background: linear-gradient(#3d2734, #201520 60%); border: 1px solid #6d4044; border-radius: 13px 13px 0 0; box-shadow: 0 -5px 14px #140c1478; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.entry { padding: clamp(20px, 3.2vw, 36px); box-shadow: 0 18px 55px #09090a70; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--inset); border: 1px solid #292b30; border-radius: 11px; padding: 4px; gap: 4px; margin-bottom: 30px; }
.tabs button { border: 0; color: var(--secondary); border-radius: 7px; background: transparent; padding: 10px 4px; font-weight: 650; }
.tabs button[aria-pressed=true] { color: var(--ink); background: #2e2f35; box-shadow: 0 1px 4px #08080a9b; }
.entry h2 { font-size: clamp(1.45rem, 2.2vw, 1.8rem); line-height: 1.3; margin-bottom: 26px; }
label { display: block; margin-bottom: 8px; font-weight: 650; font-size: .875rem; }
label span { color: var(--secondary); font-weight: 400; margin-left: 6px; }
input:not([type=range]) { width: 100%; min-height: 47px; color: var(--ink); background: var(--inset); border: 1px solid #42434b; border-radius: 9px; padding: 10px 12px; outline-offset: 1px; }
input::placeholder { color: #a29fa8; }
.field-note { margin-top: 11px; color: var(--secondary); font-size: .875rem; line-height: 1.65; }
.primary, .secondary, .small-button, .text-button, .play-button {
  border-radius: 9px; border: 1px solid transparent; font-weight: 700; padding: 10px 15px; min-height: 44px; line-height: 1.2; text-align: center;
}
.primary { background: var(--accent); color: var(--accent-ink); }
.primary:hover:not(:disabled) { background: #ffdf8d; }
.secondary { color: var(--ink); background: #28292e; border-color: #42434b; font-size: .875rem; }
.secondary:hover:not(:disabled), .small-button:hover:not(:disabled) { background: #35363d; }
.wide { width: 100%; }
.entry .primary { margin-top: 24px; min-height: 50px; }
.text-button { background: transparent; color: var(--accent); font-size: .875rem; }
.text-button:hover:not(:disabled) { text-decoration: underline; }
.entry .text-button { display: block; margin: 8px auto 0; }
.error { margin-top: 14px; color: #ffc5be; line-height: 1.6; font-size: .9rem; padding: 10px 12px; border-radius: 9px; background: #382224; border: 1px solid #5f383a; }
.room { padding-top: 25px; }
.room-header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 23px; gap: 16px; }
.back { margin: 0 0 3px -10px; padding-inline: 9px; }
.room h1 { font-size: clamp(1.65rem, 3.5vw, 2.55rem); }
.room h1 span { color: var(--secondary); font-family: ui-monospace, monospace; font-size: .54em; letter-spacing: .07em; display: inline-block; margin-left: .4em; }
.room-actions { display: flex; align-items: center; gap: 14px; }
.connection { color: var(--secondary); white-space: nowrap; font-size: .875rem; }
.connection[data-connected=true] { color: var(--good); }
.connection::before { content: ""; background: currentColor; width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: 1px; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 300px); align-items: start; gap: 20px; }
.watch { min-width: 0; overflow: hidden; }
.stage { aspect-ratio: 16 / 9; overflow: hidden; position: relative; background: #080809; display: grid; place-items: center; }
.stage video, .stage iframe, #embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage video { object-fit: contain; }
.stage:fullscreen { width: 100%; height: 100%; aspect-ratio: auto; }
.empty { display: grid; place-items: center; gap: 12px; text-align: center; padding: 20px; color: var(--secondary); }
.empty strong { color: var(--ink); font-size: 1.2rem; }
.empty-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; color: var(--accent); background: #302717; }
.empty-icon i { border-block-width: 8px; border-left-width: 12px; }
.activation { position: absolute; inset: 0; display: grid; place-items: center; background: #08080988; }
.player-bar { padding: 10px 14px 12px; }
.progress-wrap { display: flex; align-items: center; min-height: 24px; }
#progress { width: 100%; margin: 0; height: 22px; accent-color: var(--accent); cursor: pointer; }
#progress:disabled { opacity: .46; cursor: default; }
.transport, .transport-left, .transport-right { display: flex; align-items: center; gap: 8px; }
.transport { justify-content: space-between; }
.play-button { background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; min-width: 46px; }
.play-button[data-playing=true] i { width: 13px; height: 14px; border: solid currentColor; border-width: 0 4px; margin: 0; }
.small-button { white-space: nowrap; color: var(--ink); background: transparent; font-size: .875rem; padding-inline: 9px; }
.time { color: var(--secondary); font-family: ui-monospace, monospace; font-size: .875rem; white-space: nowrap; }
.bili-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.bili-controls form { display: flex; gap: 8px; align-items: center; }
.bili-controls input { max-width: 110px; }
.bili-controls label { margin: 0; white-space: nowrap; }
.bili-controls a { font-size: .875rem; }
.media-status { padding: 10px 14px; border-top: 1px solid var(--line); font-size: .875rem; line-height: 1.6; color: var(--secondary); }
.details { display: grid; gap: 14px; }
.info { padding: 18px; }
.info h2 { font-size: 1.1rem; margin-bottom: 15px; }
.info-top { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; }
.viewers { color: var(--good); font-size: .875rem; white-space: nowrap; }
.code-box { background: var(--inset); border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.code-box span { color: var(--secondary); display: block; font-size: .875rem; margin-bottom: 4px; }
.code-box strong { font-family: ui-monospace, monospace; letter-spacing: .095em; font-size: 1.18rem; }
.code-box .secondary { padding-inline: 11px; }
.source-current { color: var(--secondary); font-size: .875rem; margin-bottom: 12px; overflow-wrap: anywhere; }
.info .wide { margin-top: 9px; }
.info .text-button { padding-inline: 0; margin-bottom: -4px; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 24px; transform: translateX(-50%); background: #322a19; border: 1px solid #725a2e; color: #ffdf93; border-radius: 10px; padding: 12px 18px; max-width: 90%; width: max-content; box-shadow: 0 10px 32px #0008; }
@media (max-width: 850px) {
  .lobby { gap: 30px; }
  .room-grid { grid-template-columns: minmax(0, 1fr); }
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  main, .top-inner { padding-inline: 16px; }
  .top-inner { padding-block: 14px; }
  .lobby { grid-template-columns: 1fr; min-height: auto; padding-block: 34px 0; gap: 22px; }
  .lobby h1 { font-size: clamp(2.85rem, 10.5vw, 4rem); }
  .lede { margin-top: 14px; }
  .cinema { margin-top: 20px; }
  .entry { padding: 20px; }
  .room-header { align-items: start; flex-direction: column; margin-bottom: 15px; gap: 12px; }
  .room-actions { width: 100%; justify-content: space-between; }
  .room { padding-top: 12px; }
  .details { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  .player-bar { padding-inline: 8px; }
  .transport { flex-wrap: wrap; }
  .transport, .transport-left, .transport-right { gap: 4px; }
  .small-button { padding-inline: 6px; }
}


.top-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; justify-content: flex-end; }
.top-tools a { font-size: .875rem; text-underline-offset: 3px; }
.guide { padding-top: clamp(41px, 7vw, 82px); max-width: 1030px; }
.guide-intro h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.1; letter-spacing: -.055em; }
.guide-intro .lede { max-width: 580px; }
.download { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.guide-intro .download { margin-top: 22px; padding-inline: 21px; }
.guide-grid { margin-top: clamp(30px, 5vw, 55px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.guide-grid .info { padding: 24px; }
.guide-grid ol { margin: 0; padding-left: 1.35em; color: var(--secondary); line-height: 1.7; }
.guide-grid li + li { margin-top: 10px; }
.guide-grid code { color: var(--ink); font-family: ui-monospace, monospace; font-size: .9em; }
.guide-note { margin-top: 20px; }
.native-stage .native-guide { font-size: .875rem; text-underline-offset: 3px; }
.native-stage .download { margin-top: 4px; }
.stage:has(.native-stage:not([hidden])) { aspect-ratio: auto; min-height: clamp(250px, 38vw, 410px); }
@media (max-width: 650px) {
  .guide-grid { grid-template-columns: 1fr; }
  .top-tools .top-note { display: none; }
}
