:root{
  --ink:#e8eef3;
  --dim:rgba(232,238,243,.50);
  --faint:rgba(232,238,243,.20);
  --line:rgba(232,238,243,.14);
  --bg:#05080f;
  --bolt:#dfe9ff;
  --sans:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,-apple-system,sans-serif;
  --serif:"Songti SC","Noto Serif SC",Georgia,"Times New Roman",serif;
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
}

*{box-sizing:border-box;margin:0;padding:0}

html,body{
  height:100%;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--sans);
  overflow:hidden;
  -webkit-font-smoothing:antialiased;
  cursor:default;
}

.stage{position:fixed;inset:0}
.stage canvas{display:block;width:100%;height:100%}

.grain{
  position:fixed;
  inset:-40%;
  width:180%;
  height:180%;
  pointer-events:none;
  opacity:.05;
  mix-blend-mode:overlay;
  z-index:6;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  animation:grain 1.1s steps(3) infinite;
}
@keyframes grain{
  0%{transform:translate3d(0,0,0)}
  33%{transform:translate3d(-3%,2%,0)}
  66%{transform:translate3d(2%,-3%,0)}
  100%{transform:translate3d(0,0,0)}
}

.vignette{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:5;
  box-shadow:inset 0 0 10vw 2vw rgba(2,4,6,.55), inset 0 0 34vw 6vw rgba(2,4,6,.28);
}

.draw-layer{
  position:fixed;
  inset:0;
  z-index:9;
  pointer-events:none;
}

.flash{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:7;
  background:#e8f0ff;
  opacity:0;
  will-change:opacity;
}

/* ── 启动层 ───────────────────────────── */
.boot{
  position:fixed;
  inset:0;
  z-index:20;
  display:grid;
  align-content:end;
  padding:0 clamp(24px,6vw,110px) clamp(48px,10vh,130px);
  background:rgba(4,6,10,.74);
  transition:opacity .9s ease, visibility .9s;
}
.boot.gone{opacity:0;visibility:hidden;pointer-events:none}

.boot-body{max-width:640px}

.kicker{
  font-size:11px;
  letter-spacing:.62em;
  color:var(--dim);
  margin-bottom:clamp(18px,3.4vh,30px);
}

.boot h1{
  font-size:clamp(40px,6.4vw,86px);
  font-weight:200;
  letter-spacing:.05em;
  line-height:1;
  margin-bottom:clamp(18px,3vh,28px);
}
.boot h1 em{
  font-family:var(--serif);
  font-style:normal;
  font-weight:400;
  letter-spacing:0;
  color:var(--bolt);
  padding-left:.02em;
}

.lede{
  font-size:14px;
  line-height:2.1;
  color:var(--dim);
  letter-spacing:.06em;
  margin-bottom:clamp(26px,5vh,44px);
}

.boot-actions{display:flex;gap:12px;flex-wrap:wrap}

.btn{
  font-family:inherit;
  font-size:12px;
  letter-spacing:.3em;
  text-indent:.3em;
  color:var(--ink);
  background:transparent;
  border:1px solid var(--line);
  padding:14px 26px;
  cursor:pointer;
  transition:background .35s, border-color .35s, color .35s;
}
.btn:hover{border-color:rgba(232,238,243,.5);background:rgba(232,238,243,.05)}
.btn.solid{background:var(--ink);border-color:var(--ink);color:#06090b;font-weight:500}
.btn.solid:hover{background:#fff;border-color:#fff}
.btn:disabled{opacity:.35;cursor:default}

.boot-status{
  margin-top:18px;
  font-size:12px;
  letter-spacing:.14em;
  color:var(--dim);
  min-height:1.2em;
}

/* ── HUD ──────────────────────────────── */
.hud{
  position:fixed;
  left:clamp(20px,3.2vw,44px);
  bottom:clamp(24px,4vh,44px);
  z-index:10;
  display:flex;
  gap:clamp(22px,3vw,44px);
  opacity:0;
  transition:opacity 1.2s ease;
  pointer-events:none;
}
.hud.on{opacity:1}

.hud-item{display:flex;flex-direction:column;gap:7px}
.hud-lab{
  font-size:9px;
  letter-spacing:.42em;
  color:rgba(232,238,243,.46);
}
.hud-val{
  font-size:12px;
  letter-spacing:.16em;
  color:rgba(232,238,243,.82);
  transition:color .4s;
}
.hud-val.mono{font-family:var(--mono);letter-spacing:.06em;font-size:11px}

/* ── 摄像头小窗 ────────────────────────── */
.cam-panel{
  position:fixed;
  top:clamp(18px,3vw,36px);
  right:clamp(18px,3vw,36px);
  z-index:10;
  width:168px;
  opacity:0;
  transition:opacity 1s ease;
}
.cam-panel.on{opacity:1}

.cam-frame{
  position:relative;
  width:100%;
  aspect-ratio:4/3;
  border:1px solid var(--line);
  overflow:hidden;
  background:#04070a;
}
.cam-frame video{
  width:100%;height:100%;
  object-fit:cover;
  transform:scaleX(-1);
  filter:brightness(.94) contrast(1.08) saturate(1.02);
}
.cam-frame canvas{
  position:absolute;inset:0;
  width:100%;height:100%;
}
.cam-label{
  display:block;
  margin-top:8px;
  font-size:9px;
  letter-spacing:.24em;
  color:rgba(232,238,243,.42);
  text-align:right;
}

/* ── 字幕与倒计时 ──────────────────────── */
.caption{
  position:fixed;
  left:50%;
  bottom:clamp(18px,3vh,30px);
  transform:translate(-50%,8px);
  z-index:10;
  font-size:10px;
  letter-spacing:.42em;
  text-indent:.42em;
  color:rgba(232,238,243,.66);
  text-shadow:0 1px 10px rgba(0,0,0,.9);
  opacity:0;
  transition:opacity .8s ease, transform .8s ease;
  pointer-events:none;
  white-space:nowrap;
}
.caption.on{opacity:1;transform:translate(-50%,0)}

.timer-bar{
  position:fixed;
  left:0;right:0;bottom:0;
  height:1px;
  z-index:10;
  background:rgba(232,238,243,.08);
}
.timer-bar i{
  display:block;
  height:100%;
  width:100%;
  transform-origin:left center;
  background:rgba(215,231,248,.55);
}

.noscript{
  position:fixed;inset:0;
  display:grid;place-content:center;
  font-size:14px;letter-spacing:.2em;
}

@media (max-width:640px){
  .cam-panel{width:110px}
  .hud{gap:20px}
  .lede{font-size:13px;line-height:2}
  .caption{font-size:10px;letter-spacing:.3em}
}
