/* =============================================================================
   scene-18.css · 终章星夜 + 结语空景 + 道谢金句 + 大屏谢幕（steps = 4）
   —— step0：星夜大漠长卷（歌词由全局 #lyrics 控制器承载）
   —— step2：道谢（沿用大漠风机光伏背景，叠加黑色遮罩，依次浮入两行巨幅文字）
             · 第一行：“中国式现代化”（金色高光庄重衬线，后排超大字号）
             · 第二行：“是人与自然和谐共生的现代化”（纯白微绿光晕，后排超大字号）
   —— step3：纯粹电影级双层谢幕系统（单次放映不轮播，45s 恒速放慢，从底部滚出并滚完黑场）
             · 上 2/3：一开始上半屏全黑，演职员表自底部向上 45s linear 恒速滚动，滚完出画并切入黑场
             · 下 1/3：参考文献与素材来源（文献素材、曲目原曲、互联网图片）各 15s 同步展示完
   ========================================================================== */
.s18-root {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #03050a;
}

/* ---------------- step2 · 道谢遮罩与金句 ---------------- */
.s18-quote-scrim {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 95% 85% at 50% 50%, rgba(2, 4, 8, 0.28) 0%, rgba(2, 4, 8, 0.45) 70%, rgba(1, 2, 5, 0.62) 100%),
    rgba(0, 0, 0, 0.10);
  transition: opacity 1200ms var(--ease-cine), visibility 1200ms;
}

.s18-root.is-quote .s18-quote-scrim {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.s18-quote-box {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 80px;
  box-sizing: border-box;
}

/* 依次浮入的两行动效基类：微位移 + 景深聚焦展开 + 极微呼吸尺度 */
.s18-quote-line {
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(0.985);
  filter: blur(6px);
  will-change: transform, opacity, filter;
  white-space: nowrap;
}

.s18-quote-box.is-animate .s18-quote-line-1 {
  animation: s18QuoteFloatIn 1500ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.s18-quote-box.is-animate .s18-quote-line-2 {
  animation: s18QuoteFloatIn 1700ms cubic-bezier(0.16, 1, 0.3, 1) 1800ms forwards;
}

@keyframes s18QuoteFloatIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.985);
    filter: blur(6px);
  }
  50% {
    opacity: 0.88;
    filter: blur(1.5px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0px);
  }
}

/* 第一行：中国式现代化 —— 殿堂级庄重纯白衬线，宽舒字距，后排极致清晰 */
.s18-quote-line-1 {
  font-family: var(--font-serif);
  font-size: 78px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.30em;
  padding-left: 0.30em; /* 抵消 letter-spacing 保持视觉绝对居中 */
  color: #ffffff;
  text-shadow:
    0 0 32px rgba(255, 255, 255, 0.38),
    0 2px 10px rgba(0, 0, 0, 0.98),
    0 4px 24px rgba(0, 0, 0, 0.92);
}

/* 第二行：是人与自然和谐共生的现代化 —— 巨幅纯白衬线，后排极致清晰 */
.s18-quote-line-2 {
  margin-top: 48px;
  font-family: var(--font-serif);
  font-size: 88px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.12em;
  padding-left: 0.12em; /* 抵消 letter-spacing 保持视觉绝对居中 */
  color: #ffffff;
  text-shadow:
    0 0 40px rgba(255, 255, 255, 0.42),
    0 2px 12px rgba(0, 0, 0, 0.98),
    0 6px 32px rgba(0, 0, 0, 0.95);
}

/* ---------------- step3 · 全屏致谢层 ---------------- */
.s18-credits {
  position: absolute;
  inset: 0;
  z-index: 8;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 96% 86% at 50% 36%, rgba(4, 6, 11, 0.88) 0%, rgba(3, 4, 8, 0.96) 58%, rgba(2, 3, 6, 0.99) 100%),
    linear-gradient(180deg, rgba(2, 3, 6, 0.65) 0%, rgba(2, 3, 6, 0.45) 45%, rgba(1, 2, 5, 0.92) 100%);
  transition: opacity 1600ms var(--ease-cine), visibility 1600ms;
}

.s18-root.is-credits .s18-credits {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---------------- 上 2/3 · 纯粹演职员表单次滚动 ---------------- */
.s18-credits-top {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 665px;
  overflow: hidden;
  z-index: 2;
}

.s18-roll-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.95) 10%, black 18%, black 82%, rgba(0, 0, 0, 0.95) 90%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.95) 10%, black 18%, black 82%, rgba(0, 0, 0, 0.95) 90%, transparent 100%);
}

.s18-roll-track {
  display: flex;
  flex-direction: column;
  width: 100%;
  transform: translate3d(0, 665px, 0);
  animation: s18CreditsRollOnce 45s linear forwards;
  will-change: transform;
}

.s18-root:not(.is-credits) .s18-roll-track {
  animation-play-state: paused;
}

@keyframes s18CreditsRollOnce {
  0% {
    transform: translate3d(0, 665px, 0);
  }
  100% {
    transform: translate3d(0, -100%, 0);
  }
}

.s18-roll-block {
  width: 1280px;
  margin: 0 auto;
  text-align: center;
  flex-shrink: 0;
}

.s18-roll-main-title {
  padding-top: 50px;
  margin-bottom: 28px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 38px;
  letter-spacing: 0.35em;
  color: #dfa959;
  text-shadow: 0 0 36px rgba(223, 169, 89, 0.25);
}

/* 各板块：拉大类目之间的间距 */
.s18-roll-sect {
  margin-top: 52px;
}

.s18-roll-sect-title {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 27px;
  letter-spacing: 0.28em;
  color: rgba(228, 190, 130, 0.85);
  margin-bottom: 18px;
}

.s18-roll-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 18px;
  margin: 10px 0;
}

/* 演职员姓名：衬线体、加粗纯白 */
.s18-roll-name {
  width: 420px;
  text-align: right;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.s18-roll-sep {
  color: rgba(226, 184, 116, 0.45);
  font-size: 25px;
  user-select: none;
}

/* 演职员分工：无衬线体、较轻字重 (300) */
.s18-roll-role {
  width: 560px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 29px;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: rgba(235, 224, 208, 0.78);
}

/* 特别鸣谢：国籍采用无衬线轻字重 */
.s18-roll-row-thanks {
  margin: 16px 0 20px;
}

.s18-roll-thanks-line {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 18px;
}

.s18-roll-country {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 21px;
  color: rgba(235, 224, 208, 0.65);
  letter-spacing: 0.02em;
  margin-left: 6px;
}

.s18-roll-org {
  margin-top: 5px;
  font-family: var(--font-sans);
  font-size: 23px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(226, 214, 192, 0.65);
}

.s18-roll-rule {
  height: 1px;
  width: 720px;
  margin: 48px auto;
  background: linear-gradient(90deg, transparent 0%, rgba(228, 190, 130, 0.4) 30%, rgba(228, 190, 130, 0.7) 50%, rgba(228, 190, 130, 0.4) 70%, transparent 100%);
}

.s18-roll-spacer {
  height: 120px;
}

/* ---------------- 中部电影级分割线 ---------------- */
.s18-credits-divider {
  position: absolute;
  left: 80px;
  top: 665px;
  width: 1760px;
  height: 1px;
  z-index: 9;
  background: linear-gradient(90deg, transparent 0%, rgba(226, 184, 116, 0.25) 15%, rgba(226, 184, 116, 0.78) 50%, rgba(226, 184, 116, 0.25) 85%, transparent 100%);
  box-shadow: 0 0 16px rgba(226, 184, 116, 0.28);
}

/* ---------------- 下 1/3 · 素材与参考文献单次推进 ---------------- */
.s18-credits-bottom {
  position: absolute;
  left: 0;
  top: 666px;
  width: 1920px;
  height: 414px;
  z-index: 9;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(3, 5, 10, 0.7) 0%, rgba(2, 3, 6, 0.96) 100%);
}

.s18-b-inner {
  width: 1760px;
  margin: 0 auto;
  padding-top: 18px;
}

.s18-b-header {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(228, 190, 130, 0.12);
}

.s18-b-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.s18-b-mark {
  font-size: 20px;
  color: #dfa959;
  text-shadow: 0 0 12px rgba(223, 169, 89, 0.6);
}

.s18-b-title-main {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #fbf6ec;
}

/* 页面容器 */
.s18-b-pages {
  position: relative;
  width: 100%;
  height: 310px;
  margin-top: 18px;
}

.s18-b-page {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 550ms var(--ease-cine), transform 550ms var(--ease-cine);
  will-change: opacity, transform;
}

.s18-b-page.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Page 0: 文献素材两列布局 */
.s18-b-page[data-page="0"] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
}

.s18-b-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.s18-b-item {
  position: relative;
  padding: 8px 14px 10px;
  border-left: 3px solid rgba(223, 169, 89, 0.38);
  background: rgba(14, 20, 30, 0.28);
  border-radius: 0 4px 4px 0;
}

.s18-b-item-title {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.s18-b-item-desc {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 300;
  color: rgba(235, 224, 208, 0.78);
  line-height: 1.5;
  letter-spacing: 0.015em;
}

/* Page 1: 曲目原曲全宽卡片 */
.s18-b-col-full {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.s18-b-song-card {
  padding: 12px 18px 14px;
  border-left: 3px solid rgba(223, 169, 89, 0.45);
  background: rgba(14, 20, 30, 0.32);
  border-radius: 0 4px 4px 0;
}

.s18-b-song-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.s18-b-song-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: #ffffff;
}

.s18-b-song-sep {
  color: rgba(226, 184, 116, 0.4);
  font-size: 22px;
}

.s18-b-song-orig {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 400;
  color: #f2ead9;
}

.s18-b-song-orig em {
  font-style: italic;
  color: #ffffff;
}

.s18-b-song-meta {
  margin-top: 5px;
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 300;
  color: rgba(235, 224, 208, 0.8);
  line-height: 1.4;
}

/* Page 2: 互联网图片两张大卡片 */
.s18-b-photo-card {
  padding: 16px 20px 18px;
  border-left: 3px solid rgba(223, 169, 89, 0.45);
  background: rgba(14, 20, 30, 0.32);
  border-radius: 0 4px 4px 0;
}

.s18-b-photo-name {
  font-family: var(--font-sans);
  font-size: 27px;
  font-weight: 600;
  color: #ffffff;
}

.s18-b-photo-source {
  margin-top: 6px;
  font-family: var(--font-sans);
  font-size: 23px;
  font-weight: 400;
  color: #eed4a0;
}

.s18-b-photo-desc {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 21px;
  font-weight: 300;
  color: rgba(235, 224, 208, 0.8);
  line-height: 1.4;
}

/* ---------------- 滚完黑场（Blackout）遮罩 ---------------- */
.s18-blackout {
  position: absolute;
  inset: 0;
  background: #000000;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1600ms var(--ease-soft);
}

.s18-root.is-blackout .s18-blackout {
  opacity: 1;
  pointer-events: auto;
}
