/* ===================================================================
   theater.css —— 沉浸放映
   只做"看史料"这件事：画面铺满、字幕压在下三分之一、进度在上沿。
   =================================================================== */

#screen-theater{
  background:#05070c;
  display:none;
}
#screen-theater.is-active{display:block}

.theater-stage{position:absolute;inset:0;overflow:hidden;background:#05070c}

/* 画框：素材铺满，超出部分裁掉，避免出现黑边 */
.pano{
  position:absolute;inset:0;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
}
.pano.is-video{padding:0}
.pano video{width:100%;height:100%;object-fit:cover;display:block}
.stage-img{
  width:100%;height:100%;object-fit:cover;
  will-change:transform;transform-origin:center;
}

/* 压暗 + 暗角，让字幕能读 */
.pano-vignette{
  position:absolute;inset:0;pointer-events:none;
  background:
    linear-gradient(180deg,rgba(0,0,0,.55) 0%,transparent 22%,transparent 52%,rgba(0,0,0,.78) 100%),
    radial-gradient(120% 90% at 50% 45%,transparent 42%,rgba(0,0,0,.55) 100%);
}

/* 没有素材时的明确占位（不伪造画面） */
.stage-placeholder{
  position:absolute;inset:0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  background:
    repeating-linear-gradient(0deg,rgba(255,255,255,.035) 0 1px,transparent 1px 40px),
    repeating-linear-gradient(90deg,rgba(255,255,255,.035) 0 1px,transparent 1px 40px),
    linear-gradient(180deg,#15130f,#080706);
  text-align:center;padding:24px;
}
.stage-placeholder b{
  font-size:clamp(44px,14vw,72px);line-height:1;letter-spacing:.06em;
  color:rgba(216,178,106,.34);font-weight:700;
}
.stage-placeholder span{
  font-size:13px;letter-spacing:.18em;color:rgba(234,228,216,.55);
  font-family:-apple-system,"PingFang SC",sans-serif;
}
.stage-placeholder i{
  font-size:11px;font-style:normal;letter-spacing:.03em;
  color:rgba(234,228,216,.3);
  font-family:ui-monospace,Consolas,monospace;
  border:1px dashed rgba(255,255,255,.16);border-radius:6px;
  padding:6px 12px;
}

/* 字幕 */
.subtitle{
  position:absolute;left:0;right:0;
  bottom:calc(150px + env(safe-area-inset-bottom,0px));
  padding:0 28px;
  font-size:clamp(16px,4.6vw,21px);
  line-height:1.85;text-align:center;
  color:#fff8e8;
  text-shadow:0 2px 14px rgba(0,0,0,.95),0 0 2px rgba(0,0,0,.9);
  letter-spacing:.02em;
  transition:opacity .5s ease,transform .5s ease;
  pointer-events:none;
}
.subtitle.is-out{opacity:0;transform:translateY(6px)}

/* 开映闪白 */
.theater-flash{
  position:absolute;inset:0;pointer-events:none;
  background:#fff8e8;opacity:0;z-index:4;
}
.theater-flash.is-clear{opacity:0 !important}

/* UI 层 */
.theater-ui{
  position:absolute;left:0;right:0;bottom:0;z-index:5;
  padding:0 18px calc(16px + env(safe-area-inset-bottom,0px));
  font-family:-apple-system,"PingFang SC",sans-serif;
}

.progress{
  height:2px;border-radius:2px;overflow:hidden;
  background:rgba(255,255,255,.16);
  margin-bottom:14px;
}
.progress span{
  display:block;height:100%;width:0;
  background:linear-gradient(90deg,rgba(216,178,106,.7),#f0d9a8);
  transition:width .12s linear;
}

.theater-meta{
  display:flex;align-items:center;gap:10px;margin-bottom:14px;
}
.chip{
  font-size:12px;letter-spacing:.04em;color:#f0d9a8;
  padding:5px 11px;border-radius:999px;
  background:rgba(216,178,106,.16);
  border:1px solid rgba(216,178,106,.3);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:70vw;
}
.chapter{
  font-size:11px;letter-spacing:.06em;color:rgba(234,228,216,.6);
  white-space:nowrap;
}

.theater-actions{display:flex;align-items:center;gap:10px}
.theater-actions .btn-pill{flex:1}
.theater-actions .hud-btn{
  width:52px;height:52px;flex:none;
  font-size:18px;
  background:rgba(10,13,20,.62);
  border:1px solid rgba(255,255,255,.14);
  color:var(--text);
}
.theater-actions .hud-btn.is-off{opacity:.55}