/* ================= 播片 + 选项 ================= */
.player {
  position: absolute; inset: 0; background: #000; overflow: hidden;
}
.player video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #000;
}

.pl-topbar {
  position: absolute; top: 0; left: 0; right: 0; height: 74px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .72), transparent);
  pointer-events: none;
  transition: opacity .3s;
}
.pl-chapter {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-title); font-size: 19px; letter-spacing: 3px;
  color: #ffeecb; text-shadow: 0 2px 8px rgba(0, 0, 0, .9);
}
.pl-chapter .seal {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle, #ffd98a, #a9762f);
  box-shadow: 0 0 10px rgba(255, 200, 120, .6);
  display: grid; place-items: center; font-size: 12px; color: #3a2205;
}

.pl-hud { display: flex; gap: 10px; pointer-events: none; }
.hud-chip {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 13px 5px 8px;
  border-radius: 16px;
  background: rgba(12, 8, 4, .62);
  border: 1px solid rgba(232, 195, 122, .35);
  font-size: 13px; color: #ffeecb;
  backdrop-filter: blur(4px);
}
.hud-chip .ic { font-size: 13px; }
.hud-chip .nm { font-size: 11px; color: rgba(255, 236, 200, .65); }
.hud-chip .vl { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 26px; text-align: right; }
.hud-chip .bar {
  position: absolute; left: 8px; right: 8px; bottom: 2px; height: 2px;
  background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden;
}
.hud-chip .bar i { display: block; height: 100%; background: var(--gold); transition: width .5s; }
.hud-chip.flash { animation: chipFlash .8s ease; }
@keyframes chipFlash { 0% { box-shadow: 0 0 0 0 rgba(255, 210, 130, .8) } 100% { box-shadow: 0 0 0 14px rgba(255, 210, 130, 0) } }
.hud-delta {
  position: absolute; right: 8px; top: -18px; font-size: 13px; font-weight: 700;
  animation: deltaUp 1.3s ease forwards;
}
.hud-delta.plus { color: #9be3a6; }
.hud-delta.minus { color: #f19a8a; }
@keyframes deltaUp { 0% { opacity: 0; transform: translateY(6px) } 25% { opacity: 1; transform: translateY(0) } 100% { opacity: 0; transform: translateY(-14px) } }

.pl-tools {
  position: absolute; right: 20px; top: 84px;
  z-index: 30;
  display: flex; flex-direction: column; gap: 10px;
  transition: opacity .3s;
}
.pl-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .1);
}
.pl-progress i { display: block; height: 100%; background: linear-gradient(90deg, #e8c37a, #ffd98a); width: 0; }

/* ---------------- 选项层（仿参考图底部横排牌匾） ---------------- */
.pl-choices {
  position: absolute; left: 0; right: 0; bottom: 0; top: 0;
  padding: 0 4vw;
  z-index: 20;
  pointer-events: none; /* 容器本身穿透，避免遮挡顶部工具按钮 */
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: clamp(22px, 3vh, 44px);
  background: linear-gradient(0deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .5) 45%, rgba(0,0,0,.28) 72%, transparent 100%);
}
.pl-choices.show { display: flex; }
/* 仅实际内容可交互，遮罩空白区域不拦截点击 */
.pl-choices > * { pointer-events: auto; }

.choice-row { display: flex; gap: clamp(22px, 2.6vw, 46px); justify-content: center; align-items: stretch; width: 100%; flex-wrap: wrap; }

.choice-plaque {
  position: relative;
  min-width: clamp(280px, 26vw, 440px); max-width: 480px;
  padding: clamp(20px, 2.4vh, 34px) clamp(28px, 2.2vw, 44px);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: clamp(24px, 2.1vw, 40px); font-weight: 600; letter-spacing: 3px; line-height: 1.35;
  color: #fff3d6;
  background: linear-gradient(180deg, rgba(64, 38, 16, .9), rgba(26, 15, 7, .94));
  border-top: 2px solid rgba(255, 228, 172, .7);
  border-bottom: 2px solid rgba(255, 228, 172, .7);
  border-radius: 6px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .6), inset 0 0 30px rgba(255, 190, 100, .16);
  transition: .2s;
  opacity: 0; transform: translateY(24px);
  animation: plaqueIn .5s ease forwards;
  backdrop-filter: blur(3px);
}
@keyframes plaqueIn { to { opacity: 1; transform: translateY(0) } }
.choice-plaque::before, .choice-plaque::after {
  content: '❁'; position: absolute; top: 50%; transform: translateY(-50%);
  font-size: clamp(18px, 1.3vw, 26px); color: rgba(255, 224, 168, .8);
}
.choice-plaque::before { left: -18px; }
.choice-plaque::after { right: -18px; }
.choice-plaque:hover {
  color: #fff;
  background: linear-gradient(180deg, rgba(158, 96, 30, .95), rgba(70, 40, 12, .96));
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .65), inset 0 0 40px rgba(255, 200, 110, .38), 0 0 0 2px rgba(255, 216, 140, .55);
}
.choice-plaque .cp-eff {
  display: block; font-family: var(--font-body); font-size: clamp(14px, 1.05vw, 19px); font-weight: 400; letter-spacing: .5px;
  color: var(--gold); opacity: .9; margin-top: clamp(8px, 1vh, 14px);
}
.choice-plaque .cp-taken {
  position: absolute; right: -8px; top: -12px; font-size: clamp(12px, .9vw, 16px);
  background: rgba(20, 12, 6, .92); border: 1px solid var(--line); border-radius: 10px;
  padding: 2px 9px; color: var(--text-dim); font-family: var(--font-body); letter-spacing: 0;
}

/* 选项预览图 */
.choice-plaque .cp-text { display: block; }
.choice-plaque .cp-thumb {
  display: block; position: relative;
  width: clamp(150px, 15vw, 240px); aspect-ratio: 1 / 1;
  margin-bottom: clamp(10px, 1.4vh, 18px);
  border-radius: 8px;
}
.choice-plaque .cp-thumb > img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 8px; border: 1px solid rgba(255, 224, 168, .45);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
  display: block;
}
.choice-plaque.has-thumb {
  padding-top: clamp(16px, 2vh, 24px);
  font-size: clamp(20px, 1.7vw, 30px);
}
.choice-plaque.locked {
  cursor: not-allowed; color: rgba(255, 240, 210, .38);
  filter: grayscale(.7);
}
.choice-plaque.locked:hover { transform: none; box-shadow: 0 10px 34px rgba(0, 0, 0, .6), inset 0 0 30px rgba(255, 190, 100, .16); }
.choice-plaque.locked .cp-eff { color: #cf9a8c; }

/* 隐藏选项揭晓：紫金异色 + 更强登场动画 */
.choice-plaque.choice-revealed {
  border-top-color: rgba(200, 170, 255, .8);
  border-bottom-color: rgba(200, 170, 255, .8);
  background: linear-gradient(180deg, rgba(70, 46, 96, .92), rgba(30, 18, 44, .95));
  box-shadow: 0 10px 34px rgba(0, 0, 0, .6), inset 0 0 34px rgba(180, 130, 255, .28), 0 0 0 2px rgba(190, 150, 255, .5);
  animation: choiceReveal .6s cubic-bezier(.2, .9, .3, 1.3) both;
}
.choice-plaque.choice-revealed:hover {
  background: linear-gradient(180deg, rgba(104, 64, 150, .95), rgba(46, 26, 70, .96));
  box-shadow: 0 16px 40px rgba(0, 0, 0, .65), inset 0 0 44px rgba(200, 150, 255, .4), 0 0 0 2px rgba(210, 170, 255, .7);
}
@keyframes choiceReveal {
  0% { opacity: 0; transform: translateY(30px) scale(.7); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.choice-prompt {
  order: -1;
  font-family: var(--font-title);
  font-size: clamp(30px, 3vw, 52px); font-weight: 700; letter-spacing: 6px;
  color: #ffe9a8;
  text-shadow: 0 0 24px rgba(255, 180, 70, .6), 0 4px 14px rgba(0, 0, 0, .92);
}
.choice-timer {
  width: min(680px, 74vw); height: 5px; background: rgba(255, 255, 255, .16); border-radius: 3px; overflow: hidden;
}
.choice-timer i { display: block; height: 100%; background: linear-gradient(90deg, #ffd98a, #d9603a); width: 100%; }

/* ---------------- 后果提示（屏幕中心上方弹窗） ---------------- */
.pl-consequence {
  position: absolute; left: 0; right: 0; top: 12%;
  display: flex; justify-content: center;
  z-index: 45; pointer-events: none;
  opacity: 0; transform: translateY(-16px);
  transition: opacity .3s ease, transform .3s ease;
}
.pl-consequence.show { opacity: 1; transform: translateY(0); }
.plc-card {
  min-width: 260px; max-width: 78vw;
  padding: clamp(16px, 1.8vw, 24px) clamp(22px, 2.4vw, 34px);
  text-align: center;
  background: linear-gradient(180deg, rgba(40, 28, 14, .96), rgba(20, 13, 6, .97));
  border: 1px solid rgba(255, 228, 172, .5);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6), inset 0 0 30px rgba(255, 190, 100, .1);
  backdrop-filter: blur(4px);
}
.plc-title {
  font-family: var(--font-title);
  font-size: clamp(20px, 1.9vw, 30px); font-weight: 700; letter-spacing: 2px;
  color: #ffe9a8; text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
  margin-bottom: 10px;
}
.plc-deltas { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.plc-delta {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: clamp(16px, 1.4vw, 22px); letter-spacing: 1px;
  padding: 4px 16px; border-radius: 20px;
  background: rgba(0, 0, 0, .3);
  animation: plcPop .4s ease both;
}
@keyframes plcPop { from { opacity: 0; transform: scale(.8) } to { opacity: 1; transform: scale(1) } }
.plc-delta .plc-ico { font-size: 1.1em; }
.plc-delta .plc-name { color: var(--text); }
.plc-delta .plc-num { font-family: var(--font-title); font-weight: 700; min-width: 42px; }
.plc-delta.plus .plc-num { color: #9be3a6; }
.plc-delta.minus .plc-num { color: #f19a8a; }
.plc-note { margin-top: 10px; font-size: clamp(13px, 1vw, 16px); color: var(--text-dim); line-height: 1.5; max-width: 460px; }

/* ---------------- 任务提示（画面上方“选项正确，任务已更新”） ---------------- */
.pl-task-toast {
  position: absolute; left: 0; right: 0; top: 7%;
  display: flex; justify-content: center;
  z-index: 46; pointer-events: none;
  opacity: 0; transform: translateY(-22px);
}
.pl-task-toast.show { animation: pltIn .45s cubic-bezier(.2, .9, .3, 1.2) forwards; }
.pl-task-toast.hide { opacity: 1; transform: translateY(0); animation: pltOut .6s ease forwards; }
@keyframes pltIn { to { opacity: 1; transform: translateY(0); } }
@keyframes pltOut { to { opacity: 0; transform: translateY(-14px); } }
.plt-card {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px clamp(20px, 2vw, 30px);
  background: linear-gradient(180deg, rgba(30, 46, 32, .94), rgba(16, 28, 18, .96));
  border: 1px solid rgba(155, 227, 166, .6);
  border-radius: 999px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .55), 0 0 22px rgba(120, 220, 140, .28), inset 0 0 20px rgba(120, 220, 140, .1);
  backdrop-filter: blur(4px);
}
.plt-ico {
  width: 26px; height: 26px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%; font-size: 15px; font-weight: 700;
  color: #10240f; background: linear-gradient(180deg, #b6f0bf, #7fc08a);
  box-shadow: 0 0 12px rgba(150, 240, 170, .7);
}
.plt-text {
  font-family: var(--font-title);
  font-size: clamp(15px, 1.4vw, 21px); font-weight: 700; letter-spacing: 2px;
  color: #d6f5da; text-shadow: 0 2px 8px rgba(0, 0, 0, .7);
}

/* ---------------- 旁白层（无视频纯文本过场） ---------------- */
.pl-narration {
  position: absolute; inset: 0; display: none;
  place-items: center; z-index: 44;
  background: radial-gradient(120% 90% at 50% 45%, rgba(18, 12, 6, .92), rgba(0, 0, 0, .98));
}
.pl-narration.show { display: grid; }
.pl-narration-inner {
  max-width: min(76vw, 900px); padding: 0 6vw; text-align: center;
  opacity: 0; transform: translateY(16px);
  animation: narrIn .9s ease forwards;
}
@keyframes narrIn { to { opacity: 1; transform: translateY(0); } }
.pl-narration-text {
  font-family: var(--font-title);
  font-size: clamp(22px, 2.4vw, 40px); font-weight: 500;
  line-height: 1.9; letter-spacing: 3px;
  color: #f0e2c4; text-shadow: 0 2px 16px rgba(0, 0, 0, .8);
  margin: 0;
}

/* ---------------- 结局层 ---------------- */
.pl-ending {
  position: absolute; inset: 0; display: none;
  place-items: center; text-align: center;
  background: radial-gradient(80% 70% at 50% 45%, rgba(28, 8, 4, .93), rgba(0, 0, 0, .99));
  animation: fadeIn .6s ease;
}
.pl-ending.show { display: grid; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.end-box { width: min(720px, 88vw); }
.end-code { font-size: 12px; letter-spacing: 6px; color: var(--text-dim); }
.end-title {
  font-family: var(--font-title); font-size: clamp(34px, 5vw, 62px); letter-spacing: 12px;
  margin: 14px 0 6px; color: #ffdca8;
  text-shadow: 0 0 30px rgba(255, 120, 60, .5);
}
.end-title.fail { color: #f1a493; text-shadow: 0 0 30px rgba(200, 50, 30, .55); }
.end-name { font-family: var(--font-title); font-size: 20px; letter-spacing: 4px; color: var(--gold-2); margin-bottom: 20px; }
.end-desc { font-size: 15px; line-height: 2; color: #e6d6bd; max-width: 620px; margin: 0 auto 14px; }
.end-tip {
  display: inline-block; font-size: 13px; color: #d9c6a5;
  border: 1px dashed rgba(232, 195, 122, .45); border-radius: 4px; padding: 8px 16px; margin-bottom: 26px;
  background: rgba(20, 12, 6, .5);
}
.end-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.end-progress { margin-top: 24px; font-size: 12px; color: var(--text-dim); letter-spacing: 2px; }

/* 点击继续播放（自动播放被拦截时） */
.pl-gate {
  position: absolute; inset: 0; display: none; place-items: center;
  background: rgba(0, 0, 0, .72); cursor: pointer; z-index: 5;
}
.pl-gate.show { display: grid; }
.pl-gate div { text-align: center; }
.pl-gate .big { font-size: 46px; color: var(--gold); }
.pl-gate .sm { font-size: 13px; color: var(--text-dim); letter-spacing: 3px; margin-top: 10px; }

.pl-hide { opacity: 0; pointer-events: none; }
