/* =========================================================
   home.css —— 首页：星海 / 真实月球 / 星轨 / 章节
   ========================================================= */

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 clamp(60px, 8vw, 100px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: clamp(20px, 4vw, 60px);
}

.hero-copy { position: relative; z-index: 3; }

/* ---------------- 首屏背景：她的名字 VV ---------------- */
.vv-mark {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 0;
  display: flex;
  translate: -50% -50%;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(200px, 32vw, 500px);
  line-height: 0.74;
  letter-spacing: -0.09em;
  color: rgba(255, 215, 154, 0.072);
  -webkit-text-stroke: 1px rgba(255, 215, 154, 0.26);
  pointer-events: none;
  user-select: none;
  animation: vvDrift 28s var(--ease-soft) infinite alternate;
}
.vv-mark span:last-child { opacity: 0.88; margin-left: -0.05em; }
@keyframes vvDrift {
  from { translate: -52% -50%; }
  to { translate: -48% -52%; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 26px;
}
.hero-badge i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-image: url("../assets/img/moon.jpg");
  background-size: 130%;
  background-position: center;
  box-shadow: 0 0 10px rgba(255, 220, 160, 0.6);
}

.hero-title {
  /* 艺术字。挑的是系统里"有笔意"的那几款，按可用性从好到差排：
       iOS      → 翩翩体 / 华文行楷 / 魏碑 / 楷体
       Windows  → 华文行楷 / 隶书 / 楷体
       Android  → 基本只有思源，会退到下一档（serif）
     找不到就退回衬线 —— 所以"艺术感"不能只靠字体，
     下面还有渐变、逐字歪斜和漂浮，那些在哪个平台都在。 */
  font-family: "HanziPen SC", "Xingkai SC", "STXingkai", "Weibei SC",
               "LiSu", "STLiti", "Kaiti SC", "STKaiti", "KaiTi", "楷体",
               var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 6.6vw, 82px);
  /* 1.26 而不是 1.16：逐字上下浮动 ±8px 需要这个余量，
     否则上一行的字会和下一行撞上 */
  line-height: 1.26;
  letter-spacing: 0.02em;
  margin-bottom: 26px;
  text-wrap: balance;
}

.hero-title .line {
  display: block;
  /* 入场遮罩：字从这条缝里升起来 */
  overflow: hidden;
}
/* 入场演完就放开 —— 否则漂浮的字上下探出去会被切掉 */
.hero-title .line.is-settled { overflow: visible; }

/* 两行之间留够余量。
   字有两个方向的动作：静态错落（dy，±0.052em）+ 浮动（amp，最大 0.091em），
   最坏情况向上探出 0.16em。0.16em 时实测手机上只剩 3px 间隙，
   浮动起来会打架，所以给到 0.24em。 */
.hero-title .line + .line { margin-top: 0.24em; }
/* GSAP 动的是这一层（入场的 yPercent）。
   外层 overflow:hidden 负责"从字缝里升起来"的遮罩感。 */
.hero-title .line-inner { display: block; will-change: transform; }

/* ---------- 单字 ----------
   注意 transform 全都写在 @keyframes 里。
   如果在 .ch 上另写一条 transform，会被动画帧整个覆盖掉，
   错落那部分就没了。 */
.hero-title .ch {
  display: inline-block;
  white-space: pre;
  /* 字距也各差一点 —— 均匀字距是最明显的"机器味" */
  margin-inline-end: var(--gap, 0);
  font-size: calc(1em * var(--fs, 1));

  /* 渐变填充：上暖白、下金橙，字里自带光 */
  background-image: linear-gradient(174deg, #ffffff 0%, #fff6e2 30%, #ffd79a 68%, #e8974a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

  /* 一笔淡淡的轮廓，让字在深空里"立"起来 */
  -webkit-text-stroke: 0.4px rgba(255, 226, 180, 0.20);

  transform-origin: 50% 88%;
  animation: chFloat var(--dur, 5s) var(--delay, 0s) ease-in-out infinite;
  will-change: transform;
}

@keyframes chFloat {
  0%, 100% {
    transform: translate3d(0, calc(var(--dy, 0) * 1em), 0)
               rotate(calc(var(--rot, 0) * 1deg));
  }
  50% {
    transform: translate3d(0, calc(var(--dy, 0) * 1em - var(--amp, 0.06) * 1em), 0)
               rotate(calc(var(--rot, 0) * 1deg + var(--sway, 0) * 1deg));
  }
}


/* 标点不浮：浮起来会显得句子散了，给它一个更小的静止偏移 */
.hero-title .ch.is-punct {
  animation: none;
  transform: translate3d(0, calc(var(--dy, 0) * 0.5em), 0)
             rotate(calc(var(--rot, 0) * 0.5deg));
  letter-spacing: -0.06em;
}

.hero-title em {
  position: relative;
  font-style: normal;
  /* 里面的字自己带渐变，这里不用设 color */
}
/* 高亮那个字：更亮的金 + 一层柔光，飘起来的时候像个发光的小东西 */
.hero-title em .ch {
  background-image: linear-gradient(168deg, #fffdf6 0%, #ffe9bf 34%, #ffbe66 78%, #f09442 100%);
  -webkit-text-stroke: 0.5px rgba(255, 236, 200, 0.34);
  filter: drop-shadow(0 2px 14px rgba(255, 190, 110, 0.42));
}

/* 标题整体不挂 filter 动画：
   父元素的 filter 会强制新建合成层，压住里面每个字的独立动画，
   低端机上会明显掉帧。光晕放到字自己身上。 */

/* 安静模式 / 减少动效：停止漂浮，但保留艺术字的静态形态 */
html.calm .hero-title .ch,
html.no-anim .hero-title .ch {
  animation: none;
  transform: translate3d(0, calc(var(--dy, 0) * 1em), 0)
             rotate(calc(var(--rot, 0) * 1deg));
}

@media (prefers-reduced-motion: reduce) {
  .hero-title .ch { animation: none; }
  .hero-title .ch {
    transform: translate3d(0, calc(var(--dy, 0) * 1em), 0)
               rotate(calc(var(--rot, 0) * 1deg));
  }
}

/* 手机：字小、屏幕小，幅度收一半，否则看着像在抖 */
@media (max-width: 640px) {
  /* 小屏：动得慢一点，否则看着像在抖 */
  .hero-title .ch { animation-duration: calc(var(--dur, 5s) * 1.3); }
  /* 字号小了，0.24em 的绝对间隙跟着变小（只剩 5px），
     浮动起来两行会碰到。窄屏单独加大。 */
  .hero-title .line + .line { margin-top: 0.34em; }
}

.hero-title em::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 0%;
  bottom: 0.08em;
  height: 0.30em;
  background: radial-gradient(ellipse at center, rgba(255, 200, 120, 0.34), transparent 70%);
  filter: blur(9px);
  z-index: -1;
  /* 跟着字一起呼吸 */
  animation: emGlow 5.2s ease-in-out infinite;
}
@keyframes emGlow {
  0%, 100% { opacity: 0.55; transform: scaleX(0.96); }
  50%      { opacity: 0.95; transform: scaleX(1.04); }
}
html.calm .hero-title em::after,
html.no-anim .hero-title em::after { animation: none; opacity: 0.8; }

.hero-lead {
  max-width: 29em;
  color: var(--ink-2);
  font-size: clamp(14.5px, 1.5vw, 16px);
  line-height: 2.05;
  margin-bottom: 34px;
}
.hero-lead b { color: var(--gold); font-weight: 500; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  align-items: center;
  margin-bottom: 42px;
}

/* 相遇天数 */
.since {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 11px 20px 11px 14px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}
.since-orb {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fffdf4, #ffe6ac 62%, #bda884);
  box-shadow: 0 0 16px rgba(255, 220, 160, 0.6);
  flex: none;
}
.since-orb::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 154, 0.28);
  animation: sinceRing 3.4s var(--ease-soft) infinite;
}
@keyframes sinceRing {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.16); opacity: 0.25; }
}
.since-txt { font-size: 12px; color: var(--ink-3); letter-spacing: 0.06em; }
.since-txt b {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--gold);
  margin: 0 3px;
  font-weight: 500;
  letter-spacing: 0;
}
.since-sub {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-4);
  margin-top: 1px;
}

/* ---------------- 舞台：月球 + 星轨 ---------------- */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 580px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  perspective: 1100px;
}

/* 真实月球：退到右上作为远景天体，被画面边缘裁切形成纵深 */
.moon {
  position: absolute;
  right: -10%;
  top: -12%;
  width: 54%;
  aspect-ratio: 1;
  z-index: 1;
  will-change: transform;
}
.moon-body {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  /* 只做很轻的边缘暗化，保持月面均匀（真实满月本就均匀受光） */
  box-shadow:
    inset 0 0 26px 0 rgba(6, 8, 16, 0.32),
    inset 5px 7px 22px rgba(255, 250, 235, 0.06);
}
.moon-body img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 略放大，把照片四周的黑边裁到圆外 */
  transform: scale(1.04);
  /* 照片曝光保守，提亮到人眼观感；不改变月面细节 */
  filter: brightness(1.44) contrast(1.04) saturate(1.02);
  will-change: transform;
}
/* ---------------- 月面徽记 ----------------
   SVG 随月亮等比缩放（viewBox 100×100），所以月亮多大字就多大，
   不会出现"固定 px 在小月亮上看着还行、在大月亮上小得看不见"的问题。 */
.moon-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 66%;
  height: 66%;
  translate: -50% -52%;
  overflow: visible;
  pointer-events: none;
  rotate: -6deg;
  filter: drop-shadow(0 0 10px rgba(255, 214, 150, 0.35));
}

/* 印章外环 */
.moon-mark-ring circle {
  fill: none;
  stroke: rgba(255, 246, 222, 0.62);
  stroke-width: 0.9;
}
.moon-mark-ring .moon-mark-dash {
  stroke-width: 1.6;
  stroke-dasharray: 4 7;
  animation: markRingSpin 60s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes markRingSpin { to { transform: rotate(360deg); } }

/* 三层文字 = 刻痕效果：
   glow 是外扩的暗影（凹陷）→ edge 是上缘高光（受光的切口）→ face 是本体 */
.moon-mark text {
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: auto;
  letter-spacing: -1px;
}
.moon-mark-glow {
  fill: rgba(26, 18, 6, 0.5);
  filter: blur(1.6px);
}
.moon-mark-edge {
  fill: none;
  stroke: rgba(255, 250, 236, 0.85);
  stroke-width: 2.6;
  opacity: 0.9;
}
.moon-mark-face {
  fill: rgba(58, 40, 14, 0.78);
}

/* 极淡的暖色高光，模拟月光色温 */
.moon-body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 243, 216, 0.16), transparent 52%),
    radial-gradient(circle at 70% 78%, rgba(255, 226, 178, 0.06), transparent 58%);
  mix-blend-mode: screen;
}
/* 一层极淡的球面明暗，只为了立体感，不能重 */
.moon-body::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 250, 0.07), transparent 50%);
  mix-blend-mode: soft-light;
}
/* 衍射光晕：贴着边缘的一圈暖光 */
.moon-halo {
  position: absolute;
  inset: -7%;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    transparent 76%,
    rgba(255, 236, 205, 0.34) 85%,
    rgba(255, 214, 160, 0.16) 92%,
    transparent 100%
  );
  filter: blur(5px);
  z-index: -1;
  animation: haloBreath 8s var(--ease-soft) infinite;
}
/* 大范围反向散射光 */
.moon-aura {
  position: absolute;
  inset: -46%;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(255, 226, 178, 0.16),
    rgba(255, 205, 145, 0.05) 52%,
    transparent 74%
  );
  filter: blur(10px);
  z-index: -2;
  animation: haloBreath 8s var(--ease-soft) infinite reverse;
}
@keyframes haloBreath {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.045); }
}

/* 轨道系统（3D 透视下压扁成椭圆） */
.orbits {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform-style: preserve-3d;
  transform: rotateX(64deg) rotateZ(-18deg);
  pointer-events: none;
}
.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(160, 180, 255, 0.14);
  transform: translate(-50%, -50%);
}
.orbit.o1 {
  width: 58%;
  height: 58%;
  border-color: rgba(255, 215, 154, 0.2);
  animation: orbitTilt 26s var(--ease-soft) infinite alternate;
}
.orbit.o2 {
  width: 80%;
  height: 80%;
  animation: orbitTilt 34s var(--ease-soft) infinite alternate-reverse;
}
.orbit.o3 {
  width: 100%;
  height: 100%;
  border-color: rgba(147, 233, 255, 0.1);
  border-style: dashed;
  animation: orbitTilt 44s linear infinite;
}
@keyframes orbitTilt {
  from { transform: translate(-50%, -50%) rotateZ(0deg); }
  to   { transform: translate(-50%, -50%) rotateZ(9deg); }
}

/* 轨道上的光点 */
.satellite {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  animation: satSpin var(--dur, 22s) linear infinite;
}
.satellite.is-rev { animation-direction: reverse; }
@keyframes satSpin {
  from { transform: rotate(0deg) translateX(var(--rad)) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(var(--rad)) rotate(-360deg); }
}
.satellite i {
  position: absolute;
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, var(--gold) 62%, rgba(255, 170, 90, 0.25));
  box-shadow: 0 0 12px rgba(255, 215, 150, 1), 0 0 30px rgba(255, 190, 110, 0.6);
}
.satellite.blue i {
  background: radial-gradient(circle at 35% 35%, #fff, var(--cyan) 62%, rgba(90, 200, 255, 0.25));
  box-shadow: 0 0 12px var(--cyan), 0 0 28px rgba(120, 210, 255, 0.55);
}
.satellite.violet i {
  background: radial-gradient(circle at 35% 35%, #fff, var(--violet) 62%, rgba(160, 130, 255, 0.25));
  box-shadow: 0 0 12px var(--violet), 0 0 28px rgba(160, 130, 255, 0.55);
  width: 6px;
  height: 6px;
}

/* 中心：她 */
.core {
  position: relative;
  z-index: 4;
  width: 34%;
  max-width: 178px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.core-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 240, 210, 0.18), transparent 52%),
    linear-gradient(155deg, rgba(44, 57, 104, 0.96), rgba(13, 17, 34, 0.98));
  border: 1px solid rgba(255, 215, 154, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 215, 154, 0.16),
    0 0 28px rgba(255, 205, 145, 0.28),
    0 0 70px rgba(255, 195, 130, 0.16),
    inset 0 0 46px rgba(120, 150, 255, 0.2);
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 52px);
  color: #fff6e4;
  text-shadow: 0 0 22px rgba(255, 215, 154, 0.5);
  background-size: cover;
  background-position: center;
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s;
}
.core:hover .core-inner {
  transform: scale(1.04);
  box-shadow:
    0 0 0 1px rgba(255, 215, 154, 0.24),
    0 0 40px rgba(255, 205, 145, 0.4),
    0 0 96px rgba(255, 195, 130, 0.24),
    inset 0 0 46px rgba(120, 150, 255, 0.24);
}
.core-inner img { width: 100%; height: 100%; object-fit: cover; }

/* 中心两侧的旋转虚线环 */
.core-ring {
  position: absolute;
  inset: -13%;
  border-radius: 50%;
  border: 1px dashed rgba(190, 205, 255, 0.24);
  animation: spin 30s linear infinite;
}
.core-ring::before {
  content: "";
  position: absolute;
  top: -2.5px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px var(--gold), 0 0 26px rgba(255, 200, 120, 0.7);
}
.core-ring.r2 {
  inset: -25%;
  border-style: solid;
  border-color: rgba(190, 205, 255, 0.07);
  animation-duration: 52s;
  animation-direction: reverse;
}
.core-ring.r2::before { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.core-label {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: var(--ink-4);
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 5;
}

/* 滚动提示 */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.3em;
  color: var(--ink-4);
  text-transform: uppercase;
  z-index: 5;
}
.scroll-cue i {
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: cueDrop 2.6s var(--ease-soft) infinite;
}
@keyframes cueDrop {
  0% { transform: scaleY(0.15); transform-origin: top; opacity: 0; }
  45% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}

/* ---------------- 数据条 ---------------- */
.stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: clamp(20px, 4vw, 44px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(160, 180, 255, 0.07);
}
.stat {
  padding: clamp(20px, 3vw, 32px) clamp(10px, 2vw, 26px);
  background: rgba(6, 9, 17, 0.6);
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.stat b em {
  font-style: normal;
  font-size: 0.52em;
  color: var(--ink-3);
  margin-left: 3px;
}
.stat span {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* ---------------- 章节：入口卡 ---------------- */
.section {
  position: relative;
  padding: clamp(64px, 9vw, 118px) 0 0;
}
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 46px);
}
.sec-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
  margin-bottom: 14px;
}
.sec-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 3.8vw, 40px);
  line-height: 1.34;
  letter-spacing: 0.01em;
}
.sec-desc {
  margin-top: 12px;
  max-width: 32em;
  color: var(--ink-3);
  font-size: 14.5px;
  line-height: 1.9;
}

/* 三个入口卡 */
.gates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.6vw, 20px);
}
.gate {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 268px;
  padding: 26px 24px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(24, 31, 55, 0.6), rgba(9, 12, 22, 0.8));
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.45s var(--ease), transform 0.55s var(--ease-out), box-shadow 0.55s var(--ease);
}
.gate::before {
  /* 顶部渐变描边高光 */
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 154, 0.55), transparent);
  opacity: 0;
  transition: opacity 0.45s;
}
.gate::after {
  /* 悬停光斑 */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 226, 180, 0.11), transparent 62%);
  opacity: 0;
  transition: opacity 0.45s;
  pointer-events: none;
}
.gate:hover {
  transform: translateY(-5px);
  border-color: var(--line-3);
  box-shadow: 0 30px 60px -34px rgba(120, 150, 255, 0.7);
}
.gate:hover::before,
.gate:hover::after { opacity: 1; }

.gate-num {
  position: absolute;
  top: 20px;
  right: 22px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-4);
}
.gate-icon {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--gold);
  margin-bottom: 22px;
  transition: 0.45s var(--ease);
}
.gate:hover .gate-icon {
  background: rgba(255, 215, 154, 0.1);
  border-color: rgba(255, 215, 154, 0.34);
  transform: rotate(-6deg) scale(1.05);
}
.gate h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  margin-bottom: 9px;
}
.gate p {
  color: var(--ink-3);
  font-size: 13.2px;
  line-height: 1.8;
}
.gate-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
  transition: color 0.4s;
}
.gate:hover .gate-foot { color: var(--gold); }
.gate-arrow {
  transition: transform 0.45s var(--ease-out);
}
.gate:hover .gate-arrow { transform: translateX(5px); }

/* ---------------- 时间线 ---------------- */
.timeline {
  position: relative;
  margin-top: clamp(30px, 4vw, 48px);
  padding-left: 34px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-2) 8%, var(--line-2) 88%, transparent);
}
.timeline-line {
  position: absolute;
  left: 7px;
  top: 6px;
  width: 1px;
  height: 0;
  background: linear-gradient(180deg, var(--gold), rgba(255, 215, 154, 0.2));
  box-shadow: 0 0 12px rgba(255, 200, 130, 0.7);
}
.tl-item {
  position: relative;
  padding: 0 0 clamp(30px, 4vw, 44px) 0;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 9px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: #070a14;
  transition: 0.6s var(--ease);
}
.tl-item::after {
  content: "";
  position: absolute;
  left: -30px;
  top: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px var(--gold);
  opacity: 0;
  transform: scale(0.4);
  transition: 0.7s var(--ease-out);
}
.tl-item.is-lit::before { border-color: rgba(255, 215, 154, 0.6); }
.tl-item.is-lit::after { opacity: 1; transform: scale(1); }

.tl-date {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--gold);
  opacity: 0.85;
  margin-bottom: 8px;
}
.tl-title {
  font-family: var(--serif);
  font-size: clamp(17px, 2.2vw, 21px);
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}
.tl-text {
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.95;
  max-width: 40em;
}

/* ---------------- 结尾召唤 ---------------- */
.outro {
  position: relative;
  margin-top: clamp(56px, 9vw, 110px);
  padding: clamp(44px, 7vw, 82px) clamp(24px, 5vw, 64px);
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 130% at 50% -20%, rgba(255, 216, 154, 0.12), transparent 58%),
    linear-gradient(170deg, rgba(22, 29, 52, 0.8), rgba(8, 11, 20, 0.9));
  text-align: center;
  overflow: hidden;
}
.outro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 154, 0.6), transparent);
}
.outro h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3.6vw, 38px);
  line-height: 1.45;
  margin-bottom: 16px;
}
.outro p {
  color: var(--ink-3);
  font-size: 14.5px;
  max-width: 34em;
  margin: 0 auto 30px;
  line-height: 1.95;
}
.outro-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* 结尾的星尘装饰 */
.outro-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}
.outro-stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  animation: twinkleSoft 4s var(--ease-soft) infinite;
}
@keyframes twinkleSoft {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 40px); }
  .hero-grid { grid-template-columns: 1fr; gap: 18px; }
  .stage {
    max-width: 460px;
    order: -1;
    aspect-ratio: 1 / 1;
    margin-top: -10px;
  }
  .moon { right: -3%; top: -3%; width: 68%; }
  .hero-title { font-size: clamp(36px, 9vw, 56px); }
  .gates { grid-template-columns: 1fr; }
  .gate { min-height: 0; }
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 18px; display: flex; align-items: baseline; gap: 12px; text-align: left; }
  .stat b { font-size: 26px; }
  .stat span { margin-top: 0; }
}

@media (max-width: 640px) {
  .hero-actions .btn { flex: 1 1 auto; }
  .stage { max-width: 360px; }
  .core { width: 36%; }
  .core-label { font-size: 8.5px; bottom: -28px; }
  .scroll-cue { display: none; }
  .outro { padding: 40px 22px; }
  .timeline { padding-left: 26px; }
  .tl-item::before { left: -26px; width: 13px; height: 13px; }
  .tl-item::after { left: -22px; top: 12px; }
}

/* =========================================================
   时间线编辑
   ========================================================= */
.sec-tools { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; }

.tl-empty {
  padding: 30px 22px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  color: var(--ink-4);
  font-size: 13.5px;
}

.tl-editor {
  margin-top: 26px;
  padding: clamp(18px, 2.6vw, 28px);
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: linear-gradient(165deg, rgba(24, 31, 55, 0.72), rgba(9, 12, 22, 0.86));
  backdrop-filter: blur(10px);
}
.tl-editor-head h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  margin-bottom: 6px;
}
.tl-editor-head p {
  font-size: 12.5px;
  color: var(--ink-4);
  line-height: 1.8;
  margin-bottom: 20px;
}

.tl-editor-list { display: grid; gap: 14px; }

.tl-row {
  display: grid;
  gap: 9px;
  padding: 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}
.tl-row-head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.tl-row-num {
  flex: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gold);
  opacity: 0.8;
  width: 20px;
}
.tl-in-date { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; }
.tl-row-tools { display: flex; gap: 4px; flex: none; }
.tl-mini {
  width: 27px; height: 27px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-3);
  font-size: 11px;
  cursor: pointer;
  transition: 0.25s var(--ease);
}
.tl-mini:hover:not([disabled]) { color: var(--ink); border-color: var(--line-3); background: rgba(255, 255, 255, 0.08); }
.tl-mini[disabled] { opacity: 0.3; cursor: not-allowed; }
.tl-mini.tl-del:hover { color: #ff9b9b; border-color: rgba(255, 120, 120, 0.45); background: rgba(120, 30, 30, 0.35); }

.tl-in-title { font-family: var(--serif); font-size: 15px; }
.tl-in-text { font-size: 13.5px; min-height: 62px; }

.tl-editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.tl-editor-actions { display: flex; gap: 9px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .sec-tools { width: 100%; padding-bottom: 0; }
  .tl-row-head { flex-wrap: wrap; }
  .tl-in-date { flex: 1 0 60%; }
  .tl-editor-actions { width: 100%; }
  .tl-editor-actions .btn { flex: 1; }
}

/* =========================================================
   时间穿梭
   ========================================================= */
.tj-panel {
  margin-top: 16px;
  padding: 18px 18px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: rgba(10, 14, 26, 0.6);
}
.tj-head { margin-bottom: 14px; }
.tj-head h4 {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 6px;
  letter-spacing: 0.04em;
}
.tj-head p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

.tj-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}
.tj-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s, background 0.2s;
}
.tj-item:hover { border-color: var(--line-3); background: rgba(255, 255, 255, 0.04); }
.tj-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tj-when {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.tj-desc {
  font-size: 12px;
  color: var(--ink-4);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tj-go { flex: 0 0 auto; white-space: nowrap; }
.tj-empty {
  margin: 0;
  padding: 18px 4px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-4);
  text-align: center;
}
.tj-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.tj-count { font-size: 12px; color: var(--ink-4); }

@media (max-width: 640px) {
  .tj-panel { padding: 14px 12px 12px; }
  .tj-item { flex-direction: column; align-items: stretch; gap: 8px; }
  .tj-go { width: 100%; }
  .tj-list { max-height: 260px; }
}
