/* 学神荣耀 · 演出层样式（开场 CG / 章节转场 / 妖将登场 / 通关评语）
 * 语言：宣纸、墨、朱砂、鎏金；全部为叠加层，不参与布局 */

/* ============ 容器 ============ */
#cine {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity .45s ease;
}
#cine.in { opacity: 1; }
#cine.hidden { display: none; }

/* 上下遮幅（演出腔调） */
.cine-bars { position: absolute; inset: 0; pointer-events: none; }
.cine-bars .bt,
.cine-bars .bb {
  position: absolute;
  left: 0; right: 0;
  height: 0;
  background: #14110e;
  transition: height .55s cubic-bezier(.4, .0, .2, 1);
}
.cine-bars .bt { top: 0; }
.cine-bars .bb { bottom: 0; }
#cine.in.cine-intro .cine-bars .bt,
#cine.in.cine-intro .cine-bars .bb { height: 8.2vh; }
#cine.in.cine-boss .cine-bars .bt,
#cine.in.cine-boss .cine-bars .bb { height: 6.4vh; }

/* 纸纹罩（开场与转场用） */
#cine::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
  background-image:
    radial-gradient(circle at 50% 40%, rgba(255, 250, 238, .10), transparent 60%),
    repeating-linear-gradient(0deg, rgba(120, 100, 70, .025) 0 1px, transparent 1px 4px);
}
#cine.cine-intro.in::after { opacity: 1; }

/* 跳过按钮 */
.cine-skip {
  position: absolute;
  right: 22px;
  bottom: 12vh;
  z-index: 3;
  pointer-events: auto;
  padding: 8px 18px;
  border: 1px solid rgba(212, 199, 173, .7);
  border-radius: 999px;
  background: rgba(20, 17, 14, .55);
  color: #e8ddc8;
  font-size: 13px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.cine-skip:hover { background: rgba(140, 44, 34, .8); color: #fff6e6; }
.cine-skip.hidden { display: none; }

/* 内容层 */
.cine-body {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* ============ ① 开场 CG ============ */
.cine-body.intro { justify-content: flex-start; }
.intro-v {
  position: absolute;
  left: 6vw;
  top: 16vh;
  display: flex;
  flex-direction: column;
  gap: 1.6vh;
  padding: 22px 30px 24px 26px;
  border-left: 3px solid #8c2c22;
  border-radius: 3px;
  background: linear-gradient(100deg, rgba(247, 241, 230, .92), rgba(247, 241, 230, .72));
  box-shadow: 0 12px 40px rgba(50, 35, 18, .14);
  backdrop-filter: blur(3px);
  animation: fadeUp .9s .25s both;
}
.iv-name {
  font-size: clamp(34px, 5.4vw, 72px);
  line-height: 1;
  letter-spacing: .28em;
  font-weight: 700;
  color: #2b2119;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .35), 0 8px 22px rgba(60, 40, 20, .22);
}
.iv-name span { color: #8c2c22; }
.iv-sub {
  font-size: clamp(12px, 1.2vw, 16px);
  letter-spacing: .34em;
  color: #6a5a48;
}
.intro-poem {
  position: absolute;
  right: 6vw;
  top: 20vh;
  text-align: right;
  padding: 20px 26px 20px 30px;
  border-right: 3px solid #8c2c22;
  border-radius: 3px;
  background: linear-gradient(260deg, rgba(247, 241, 230, .92), rgba(247, 241, 230, .70));
  box-shadow: 0 12px 40px rgba(50, 35, 18, .14);
  backdrop-filter: blur(3px);
  animation: fadeUp 1s .9s both;
}
.intro-poem p {
  margin: 0 0 1.1vh;
  font-size: clamp(15px, 1.7vw, 22px);
  letter-spacing: .22em;
  color: #3a2f24;
  opacity: .92;
}
.intro-poem p:nth-child(1) { animation: fadeUp .8s 1.0s both; }
.intro-poem p:nth-child(2) { animation: fadeUp .8s 1.5s both; }
.intro-poem p:nth-child(3) { animation: fadeUp .8s 2.0s both; color: #8c2c22; }
.intro-cap {
  position: absolute;
  left: 6vw;
  bottom: 11.5vh;
  font-size: 12px;
  letter-spacing: .3em;
  color: #6a5a48;
  animation: fadeUp .8s 2.4s both;
}

/* ============ ② 章节转场 ============ */
.cine-chapter { background: radial-gradient(circle at 50% 45%, rgba(247, 241, 230, .96), rgba(238, 230, 214, .99)); }
.cine-chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image:
    repeating-linear-gradient(0deg, rgba(120, 100, 70, .03) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(120, 100, 70, .03) 0 1px, transparent 1px 5px);
}
.ch-wrap { text-align: center; animation: chIn .8s cubic-bezier(.2, .8, .2, 1) both; }
.ch-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 13px;
  letter-spacing: .5em;
  color: #6a5a48;
}
.ch-line i { display: block; width: 44px; height: 1px; background: linear-gradient(90deg, transparent, #b09a72, transparent); }
.ch-seal {
  margin: 2.2vh auto 1.4vh;
  width: 62px; height: 62px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: #8c2c22;
  color: #f7ecda;
  font-size: 26px;
  letter-spacing: .1em;
  box-shadow: 0 8px 22px rgba(140, 44, 34, .28);
  transform: rotate(-4deg);
}
.ch-name {
  margin: 0;
  font-size: clamp(40px, 6vw, 78px);
  letter-spacing: .24em;
  color: #241c15;
  font-weight: 700;
}
.ch-desc {
  margin: 1.6vh 0 0;
  font-size: clamp(14px, 1.5vw, 18px);
  letter-spacing: .18em;
  color: #6a5a48;
}
.ch-foot {
  margin-top: 4vh;
  font-size: 12px;
  letter-spacing: .3em;
  color: #9a8a72;
}

/* ============ ③ 妖将登场 ============ */
.cine-boss { background: radial-gradient(circle at 50% 58%, rgba(20, 16, 12, .26), rgba(12, 9, 7, .84)); }
.cine-boss.mo { background: radial-gradient(circle at 50% 58%, rgba(58, 50, 42, .30), rgba(10, 8, 7, .86)); }
.cine-body.boss { justify-content: flex-start; }
.bs-side {
  position: absolute;
  left: 7vw;
  top: 50%;
  transform: translateY(-50%);
  animation: bossIn .9s cubic-bezier(.2, .8, .2, 1) both;
}
.cine-boss.hun .bs-side { left: auto; right: 7vw; }
.bs-rank {
  font-size: 14px;
  letter-spacing: .5em;
  color: #c9a45c;
}
.bs-name {
  margin-top: 1.2vh;
  font-size: clamp(38px, 5.6vw, 74px);
  letter-spacing: .2em;
  color: #f4e8d2;
  text-shadow: 0 0 26px rgba(160, 60, 120, .5), 0 6px 20px rgba(0, 0, 0, .6);
}
.cine-boss.hun .bs-name { text-shadow: 0 0 30px rgba(140, 100, 220, .62), 0 6px 22px rgba(0, 0, 0, .6); }
.bs-line {
  margin-top: 1.4vh;
  font-size: clamp(13px, 1.4vw, 17px);
  letter-spacing: .22em;
  color: #d8c6a8;
  opacity: .9;
}
.bs-mark {
  position: absolute;
  right: 8vw;
  top: 50%;
  transform: translateY(-50%) rotate(-6deg);
  width: 96px; height: 96px;
  border: 2px solid rgba(201, 164, 92, .55);
  color: rgba(201, 164, 92, .85);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  letter-spacing: .06em;
  animation: sealIn .7s .35s both;
}
.cine-boss.hun .bs-mark { left: 8vw; right: auto; }

/* ============ ④ 结算评语 ============ */
.res-verdict {
  margin: 10px 0 4px;
  text-align: left;
  border-top: 1px solid rgba(150, 130, 100, .35);
  padding-top: 10px;
}
.vd-wrap { display: flex; gap: 12px; align-items: flex-start; }
.vd-seal {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  background: #8c2c22;
  color: #f7ecda;
  font-size: 20px;
  transform: rotate(-4deg);
  box-shadow: 0 4px 12px rgba(140, 44, 34, .26);
}
.vd-wrap[data-lose] .vd-seal { background: #4a443c; }
.vd-main { flex: 1 1 auto; min-width: 0; }
.vd-top { display: flex; align-items: baseline; gap: 8px; }
.vd-lab { font-size: 11px; letter-spacing: .18em; color: #8a7a62; }
.vd-top b { font-size: 19px; color: #241c15; letter-spacing: .08em; }
.vd-acc { margin-left: auto; font-size: 11px; color: #8a7a62; }
.vd-word { margin: 6px 0 0; font-size: 13px; line-height: 1.7; color: #3a2f24; }
.vd-tip { margin: 4px 0 0; font-size: 12px; color: #8a7a62; }
.vd-weak { margin-top: 6px; font-size: 12px; color: #8a7a62; }
.vd-weak b { color: #8c2c22; }

/* ============ 动画 ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes chIn {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes bossIn {
  from { opacity: 0; transform: translateY(-50%) translateX(-26px); }
  to { opacity: 1; transform: translateY(-50%); }
}
@keyframes sealIn {
  from { opacity: 0; transform: translateY(-50%) rotate(-6deg) scale(.7); }
  to { opacity: 1; transform: translateY(-50%) rotate(-6deg) scale(1); }
}

/* ============ 结算页：星级逐颗点亮 ============ */
@keyframes starPop {
  0%   { opacity: 0; transform: scale(.35) rotate(-16deg); }
  62%  { opacity: 1; transform: scale(1.22) rotate(2deg); }
  100% { opacity: 1; transform: none; }
}
.stars b.lit { animation: starPop .42s cubic-bezier(.2, 1.25, .45, 1) both; }
@keyframes vdIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.res-verdict { animation: vdIn .52s .16s ease-out both; }

/* 动效降级：系统开启「减少动态效果」时直接落到终态，不做淡入与运镜过渡 */
@media (prefers-reduced-motion: reduce) {
  #cine { transition: none; }
  #cine.in.cine-intro .cine-bars .bt,
  #cine.in.cine-intro .cine-bars .bb { height: 8.2vh; transition: none; }
  #cine.in.cine-boss .cine-bars .bt,
  #cine.in.cine-boss .cine-bars .bb { height: 6.4vh; transition: none; }
  .cine-body * { animation: none !important; }
  .stars b.lit, .res-verdict { animation: none !important; }
}

/* 窄屏：竖排标题降到顶部，别压住城郭 */
@media (max-width: 720px) {
  .intro-v { left: 5vw; top: 11vh; }
  .intro-poem { right: 5vw; top: 13vh; }
  .intro-poem p { font-size: 13px; }
  .bs-name { font-size: 40px; }
  .bs-mark { width: 64px; height: 64px; font-size: 30px; }
}
