/* ============================================================
   互动剧场 Playable Theater · 电影级 VN 舞台
   依赖 styles.css 的 :root 变量与 [data-hue] --cover-gradient
   ============================================================ */

.gt-stage {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.32s ease;
}
.gt-stage.is-open { opacity: 1; }
.gt-stage[hidden] { display: none; }

.gt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 6, 0.86);
  backdrop-filter: blur(10px);
}

.gt-frame {
  position: relative;
  width: min(1180px, 96vw);
  height: min(760px, 92vh);
  border-radius: 18px;
  overflow: hidden;
  background: var(--cover-gradient, #0a0c10);
  border: 1px solid rgba(212, 178, 111, 0.28);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.4);
  transform: translateY(14px) scale(0.985);
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}
.gt-stage.is-open .gt-frame { transform: translateY(0) scale(1); }

/* 背景层：交叉淡入 + 缓慢推近 */
.gt-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  transform: scale(1.04);
  transition: opacity 0.6s ease, transform 12s linear;
  animation: gtKen 16s ease-in-out infinite alternate;
}
.gt-bg--next { opacity: 0; }
.gt-bg--next.is-shown { opacity: 0.5; }
@keyframes gtKen {
  from { transform: scale(1.02) translate(0, 0); }
  to { transform: scale(1.1) translate(-1.5%, -1.5%); }
}

.gt-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 40%, rgba(3, 4, 6, 0.5) 100%),
    linear-gradient(180deg, rgba(3, 4, 6, 0.35) 0%, transparent 22%, transparent 46%, rgba(3, 4, 6, 0.82) 100%);
}

/* 顶栏 */
.gt-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
}
.gt-ribbon {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(212, 178, 111, 0.4);
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(3, 4, 6, 0.4);
}
.gt-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto;
}
.gt-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(244, 239, 230, 0.2);
  transition: background 0.3s ease, transform 0.3s ease;
}
.gt-dot.is-on { background: var(--gold); transform: scale(1.15); }
.gt-close {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(244, 239, 230, 0.18);
  background: rgba(3, 4, 6, 0.5);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.gt-close:hover { background: rgba(166, 82, 73, 0.4); border-color: rgba(212, 178, 111, 0.5); }

/* 内容屏 */
.gt-screen {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 64px clamp(22px, 5vw, 64px) clamp(28px, 5vh, 56px);
  overflow-y: auto;
}
.gt-screen::-webkit-scrollbar { width: 8px; }
.gt-screen::-webkit-scrollbar-thumb { background: rgba(212, 178, 111, 0.25); border-radius: 8px; }

.gt-kicker {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
}
.gt-title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 14px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

/* —— 开场 —— */
.gt-intro { max-width: 720px; animation: gtRise 0.5s ease both; }
.gt-tagline {
  font-family: var(--font-serif);
  font-size: clamp(16px, 2vw, 21px);
  font-style: italic;
  color: #ede8df;
  line-height: 1.6;
  margin: 0 0 14px;
}
.gt-pitch {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 22px;
  max-width: 620px;
}
.gt-cast-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.gt-cast { margin: 0; width: 92px; text-align: center; }
.gt-cast-img {
  display: block;
  width: 92px; height: 92px;
  border-radius: 12px;
  background-size: cover;
  background-position: center top;
  border: 1px solid rgba(212, 178, 111, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.gt-cast figcaption { margin-top: 6px; display: flex; flex-direction: column; }
.gt-cast figcaption strong { font-size: 12.5px; color: var(--ink); }
.gt-cast figcaption em { font-size: 11px; color: var(--muted); font-style: normal; }
.gt-foot-note { font-size: 12px; color: var(--muted); margin: 14px 0 0; }

/* —— 旁白幕 —— */
.gt-scene { max-width: 760px; animation: gtRise 0.45s ease both; }
.gt-narrate {
  background: linear-gradient(180deg, rgba(8, 9, 12, 0.4), rgba(8, 9, 12, 0.72));
  border: 1px solid rgba(212, 178, 111, 0.18);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 18px;
  backdrop-filter: blur(4px);
}
.gt-act {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.gt-narrate p {
  font-family: var(--font-serif);
  font-size: clamp(16px, 2.1vw, 22px);
  line-height: 1.75;
  color: #f4efe6;
  margin: 0;
}

/* —— 抉择幕 —— */
.gt-decision { max-width: 820px; width: 100%; animation: gtRise 0.45s ease both; }
.gt-speaker {
  width: 88px; height: 88px;
  border-radius: 12px;
  background-size: cover;
  background-position: center top;
  border: 1px solid rgba(212, 178, 111, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 14px;
  position: relative;
}
.gt-speaker span {
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  color: var(--ink);
  background: rgba(3, 4, 6, 0.8);
  border: 1px solid rgba(212, 178, 111, 0.3);
  border-radius: 999px;
  padding: 2px 10px;
}
.gt-prompt {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.4vw, 26px);
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 22px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}
.gt-choices { display: grid; gap: 12px; }
@media (min-width: 720px) { .gt-choices { grid-template-columns: 1fr 1fr; } }
.gt-choice {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(212, 178, 111, 0.28);
  background: rgba(10, 12, 16, 0.66);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  backdrop-filter: blur(4px);
}
.gt-choice:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  background: rgba(212, 178, 111, 0.12);
}
.gt-choice-label { font-size: 16px; font-weight: 600; }
.gt-choice-hint { font-size: 12px; color: var(--gold); letter-spacing: 0.04em; }

/* —— 结局幕 —— */
.gt-ending { max-width: 760px; animation: gtRise 0.5s ease both; }
.gt-end-name {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 10px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.gt-end-cond {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid rgba(212, 178, 111, 0.3);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 14px;
}
.gt-end-out {
  font-family: var(--font-serif);
  font-size: clamp(16px, 2.1vw, 21px);
  line-height: 1.75;
  color: #f4efe6;
  margin: 0 0 16px;
}
.gt-path { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.gt-path b { color: var(--ink); font-weight: 600; }
.gt-unlock { font-size: 12.5px; color: var(--gold); margin: 0 0 18px; }
.gt-unlock b { color: var(--ink); }

/* —— 免费试玩闸 —— */
.gt-gate { max-width: 600px; animation: gtRise 0.45s ease both; }
.gt-gate-lock { font-size: 40px; display: block; margin-bottom: 10px; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5)); }
.gt-gate .gt-title { font-size: clamp(24px, 3.4vw, 38px); }
.gt-gate .gt-pitch { max-width: 540px; }
.gt-gate .gt-pitch b { color: var(--gold); }
.gt-gate .gt-pitch strong { color: var(--ink); }
.gt-roadmap {
  border: 1px solid rgba(212, 178, 111, 0.18);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: rgba(10, 12, 16, 0.5);
}
.gt-roadmap-h {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.gt-roadmap ul { margin: 0; padding-left: 18px; }
.gt-roadmap li { font-size: 13.5px; color: var(--muted); line-height: 1.7; }

.gt-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.gt-btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.gt-btn:hover { transform: translateY(-2px); }
.gt-btn--go {
  background: linear-gradient(135deg, var(--gold), #c79a52);
  color: #1a1408;
  box-shadow: 0 10px 30px rgba(212, 178, 111, 0.3);
}
.gt-btn--ghost {
  background: rgba(10, 12, 16, 0.6);
  border-color: rgba(212, 178, 111, 0.32);
  color: var(--ink);
}
.gt-btn--ghost:hover { border-color: var(--gold); background: rgba(212, 178, 111, 0.1); }

.gt-cta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 0;
}
.gt-cta b { color: var(--ink); }
.gt-cta-pro {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  color: var(--gold);
  border: 1px solid rgba(212, 178, 111, 0.4);
  border-radius: 999px;
  padding: 2px 10px;
}

/* —— 选择器 —— */
.gt-chooser { width: 100%; max-width: 1040px; margin: 0 auto; align-self: center; animation: gtRise 0.45s ease both; }
.gt-chooser-lead { font-size: 14.5px; color: var(--muted); line-height: 1.7; max-width: 640px; margin: 0 0 26px; }
.gt-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.gt-pick {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(212, 178, 111, 0.2);
  background: rgba(10, 12, 16, 0.6);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.gt-pick:hover { transform: translateY(-3px); border-color: var(--gold); background: rgba(212, 178, 111, 0.08); }
.gt-pick:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gt-pick-cover {
  width: 64px; height: 64px;
  flex: 0 0 auto;
  border-radius: 10px;
  background-size: cover;
  background-position: center top;
  background-color: var(--bg-elevated);
  border: 1px solid rgba(212, 178, 111, 0.25);
}
.gt-pick-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.gt-pick-tag { font-size: 10.5px; letter-spacing: 0.08em; color: var(--gold); }
.gt-pick-body strong { font-size: 16px; color: var(--ink); }
.gt-pick-body em {
  font-size: 12px; color: var(--muted); font-style: normal;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gt-pick-go { font-size: 13px; color: var(--gold); white-space: nowrap; }

/* 本月限定专题番外：置顶金色特设卡 */
.gt-pick--ed {
  grid-column: 1 / -1;
  border-color: rgba(212, 178, 111, 0.55);
  background: linear-gradient(120deg, rgba(212, 178, 111, 0.15), rgba(10, 12, 16, 0.6) 58%);
  box-shadow: inset 0 0 0 1px rgba(212, 178, 111, 0.12);
}
.gt-pick--ed:hover {
  border-color: var(--gold);
  background: linear-gradient(120deg, rgba(212, 178, 111, 0.22), rgba(10, 12, 16, 0.55) 58%);
}
.gt-pick--ed .gt-pick-cover { width: 84px; height: 84px; }
.gt-pick--ed .gt-pick-body strong {
  font-size: 18px;
  color: var(--gold);
  font-family: var(--font-serif, "Noto Serif SC", serif);
}
.gt-pick--ed .gt-pick-body em { white-space: normal; }
.gt-pick--ed .gt-pick-go { font-size: 14px; font-weight: 600; }
.gt-pick-tag--ed {
  align-self: flex-start;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(212, 178, 111, 0.18);
  border: 1px solid rgba(212, 178, 111, 0.4);
  color: var(--gold);
  font-weight: 600;
}

@keyframes gtRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 顶栏「互动剧场」按钮：重置 button 默认样式以贴合 <a> 导航项 */
.nav-link.nav-link--btn {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  color: inherit;
}

/* 入口按钮（宇宙卡 / 世界观弹窗内） */
.play-demo-btn {
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(212, 178, 111, 0.4);
  background: linear-gradient(135deg, rgba(212, 178, 111, 0.16), rgba(212, 178, 111, 0.06));
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.play-demo-btn:hover { transform: translateY(-2px); background: rgba(212, 178, 111, 0.22); border-color: var(--gold); }

/* 移动端 */
@media (max-width: 640px) {
  .gt-frame { width: 100vw; height: 100vh; border-radius: 0; border: none; }
  .gt-bg { opacity: 0.42; }
  .gt-screen { padding: 64px 18px 28px; }
  .gt-cast { width: 72px; }
  .gt-cast-img { width: 72px; height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .gt-bg { animation: none; transition: opacity 0.4s ease; }
  .gt-intro, .gt-scene, .gt-decision, .gt-ending, .gt-chooser { animation: none; }
}
