/* ==========================================================================
   RAINBOW SERIES — 站点样式
   主题机制：JS 把当前模组的颜色写进 :root 的 --accent / --accent-soft，
   所有强调色（描边、进度、时间轴、链接、光晕）都从它派生，切换模组时整站一起换色。
   背景图走双层交叉淡入。
   ========================================================================== */

:root {
  --accent: #22c55e;
  --accent-soft: #bbf7d0;
  --accent-rgb: 34, 197, 94;

  --ink: #f4f6fb;
  --ink-2: rgba(244, 246, 251, 0.74);
  --ink-3: rgba(244, 246, 251, 0.5);
  --ink-4: rgba(244, 246, 251, 0.3);

  --panel: rgba(11, 13, 20, 0.62);
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.06);

  --shadow: 0 24px 60px -22px rgba(0, 0, 0, 0.85);
  --radius: 18px;
  --radius-s: 11px;

  --font-display: "Arial Black", "Arial Bold", Gadget, Impact, "Microsoft YaHei",
    "PingFang SC", sans-serif;
  --font-body: "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei UI", "Noto Sans SC", "Noto Sans JP",
    "Noto Sans KR", "Malgun Gothic", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas,
    "Liberation Mono", monospace;

  --gutter: clamp(1rem, 4vw, 2.4rem);
  --maxw: 1240px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #06070b;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
strong { color: #fff; font-weight: 700; }
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
}

::selection { background: rgba(var(--accent-rgb), 0.4); color: #fff; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================== 背景层 ============================== */
.bg-stack { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #06070b; }

.bg-layer {
  position: absolute;
  inset: -4%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 900ms ease, transform 12s linear;
  filter: saturate(1.08) contrast(1.02);
}

.bg-layer.is-on { opacity: 1; transform: scale(1); }

.bg-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(var(--accent-rgb), 0.28), transparent 62%),
    linear-gradient(180deg, rgba(5, 6, 11, 0.82) 0%, rgba(5, 6, 11, 0.9) 46%, rgba(5, 6, 11, 0.97) 100%);
  transition: background 900ms ease;
}

.bg-beam {
  position: absolute;
  inset: auto -20% -30% -20%;
  height: 60vh;
  background: radial-gradient(60% 100% at 50% 100%, rgba(var(--accent-rgb), 0.3), transparent 70%);
  transition: background 900ms ease;
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================== 顶部导航 ============================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem var(--gutter);
  padding-top: max(0.7rem, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(6, 7, 11, 0.92), rgba(6, 7, 11, 0.62));
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line-2);
}

.brand { display: flex; align-items: center; gap: 0.7rem; margin-right: auto; min-width: 0; }

.brand-mark { display: flex; gap: 2px; align-items: flex-end; height: 26px; flex: none; }

.brand-mark i {
  width: 4px;
  border-radius: 2px;
  height: 34%;
  background: currentColor;
  transition: height 420ms cubic-bezier(0.2, 0.9, 0.3, 1.2), box-shadow 420ms ease, opacity 420ms ease;
  opacity: 0.5;
}
.brand-mark i:nth-child(1) { color: #ef4444; }
.brand-mark i:nth-child(2) { color: #f97316; }
.brand-mark i:nth-child(3) { color: #eab308; }
.brand-mark i:nth-child(4) { color: #22c55e; }
.brand-mark i:nth-child(5) { color: #06b6d4; }
.brand-mark i:nth-child(6) { color: #3b82f6; }
.brand-mark i:nth-child(7) { color: #8b5cf6; }

/* 当前模组那一根拉满并发光，由 app.js 打 .on */
.brand-mark i.on {
  height: 100%;
  opacity: 1;
  box-shadow: 0 0 10px currentColor;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }

.brand-text b {
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  font-style: italic;
  white-space: nowrap;
}

.brand-text small {
  font-family: var(--font-body);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- 语言选择 ---- */
/* ---------- 语言切换：自定义 listbox，面板样式自己控制 ---------- */
.lang {
  position: relative;
  flex: none;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.34rem 0.62rem 0.34rem 0.6rem;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)) padding-box,
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.55), rgba(255, 255, 255, 0.1)) border-box;
  border: 1px solid transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 6px 18px -12px rgba(0, 0, 0, 0.9);
  transition: background 220ms, box-shadow 220ms, transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.lang-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 10px 26px -14px rgba(var(--accent-rgb), 0.8);
}

.lang-btn:active { transform: translateY(0); }

.lang-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- 回主站：与语言键同款药丸，hover 时一道凝光自左向右扫过 ---- */
.home-btn {
  position: relative;
  overflow: hidden;
  gap: 0.4rem;
  padding: 0.34rem 0.7rem 0.34rem 0.62rem;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.home-icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--accent-soft);
  transition: transform 340ms cubic-bezier(0.2, 0.9, 0.3, 1.2), color 240ms ease;
}

.home-label {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  max-width: 28vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 32%,
    rgba(255, 255, 255, 0.16) 44%,
    rgba(255, 255, 255, 0.58) 50%,
    rgba(255, 255, 255, 0.16) 56%,
    transparent 68%
  );
  opacity: 0;
  transform: translateX(-130%);
}

.home-btn:hover::after,
.home-btn:focus-visible::after {
  animation: homeSweep 820ms cubic-bezier(0.3, 0.72, 0.3, 1) forwards;
}

@keyframes homeSweep {
  from { opacity: 1; transform: translateX(-130%); }
  to { opacity: 0; transform: translateX(130%); }
}

.home-btn:hover .home-icon,
.home-btn:focus-visible .home-icon {
  color: var(--accent);
  transform: translateY(-1px) scale(1.07);
}

.home-btn:hover .home-label { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .home-btn::after,
  .home-btn:hover::after,
  .home-btn:focus-visible::after { animation: none; opacity: 0; }
  .home-btn:hover .home-icon { transform: none; }
}

.bg-noise { display: none; }
.bg-wash {
  background:
    radial-gradient(100% 70% at 78% 8%, rgba(var(--accent-rgb), 0.16), transparent 62%),
    linear-gradient(180deg, rgba(5, 6, 11, 0.86), rgba(5, 6, 11, 0.96));
}

.lang-icon { width: 17px; height: 17px; color: var(--accent-soft); flex: none; }

.lang-cur {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-caret {
  width: 11px; height: 11px;
  flex: none;
  color: var(--ink-3);
  transition: transform 240ms cubic-bezier(0.2, 0.9, 0.3, 1.2), color 200ms;
}

.lang.is-open .lang-caret { transform: rotate(180deg); color: var(--accent-soft); }
.lang.is-open .lang-btn {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 0 0 1px rgba(var(--accent-rgb), 0.5), 0 14px 34px -18px rgba(var(--accent-rgb), 0.9);
}

.lang-list {
  position: absolute;
  z-index: 40;
  top: calc(100% + 9px);
  right: 0;
  min-width: 224px;
  max-height: min(62vh, 430px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 7px;
  list-style: none;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(var(--accent-rgb), 0.22), transparent 60%),
    rgba(11, 14, 22, 0.92);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.4) inset;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-7px) scale(0.975);
  transform-origin: top right;
  transition: opacity 170ms ease, transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1.25), visibility 0s linear 170ms;
}

.lang.is-open .lang-list {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.lang-list::-webkit-scrollbar { width: 8px; }
.lang-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.lang-opt {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.46rem 0.55rem 0.46rem 1.5rem;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 0.85rem;
  cursor: pointer;
  position: relative;
  transition: background 150ms, color 150ms;
}

.lang-opt:hover,
.lang-opt:focus-visible {
  background: rgba(var(--accent-rgb), 0.14);
  color: #fff;
  outline: none;
}

.lang-opt:focus-visible { box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.7) inset; }

.lo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lo-code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* 选中的那一项：左侧一个主色对勾 + 主色底 */
.lang-opt[aria-selected="true"] {
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.24), rgba(var(--accent-rgb), 0.06));
  color: #fff;
}

.lang-opt[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 0.62rem;
  top: 50%;
  width: 8px; height: 4.5px;
  border-left: 1.7px solid var(--accent-soft);
  border-bottom: 1.7px solid var(--accent-soft);
  transform: translateY(-70%) rotate(-45deg);
}

.lang-opt[aria-selected="true"] .lo-code { color: var(--accent-soft); }

/* ============================== 布局 ============================== */
.hero, .stage-section, .support {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-head { margin-bottom: 1.5rem; }

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 2.15rem);
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.section-head p { margin: 0; color: var(--ink-3); font-size: 0.94rem; }

/* ============================== 标题区 ============================== */
.hero {
  padding-top: clamp(2.6rem, 7vw, 5.4rem);
  padding-bottom: clamp(2rem, 5vw, 3.4rem);
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-soft);
  opacity: 0.85;
}

.eyebrow span { color: var(--ink-3); }

/* italic 字体的字形会探出元素盒子，background-clip:text 会把探出去的部分裁掉，
   所以给渐变文字留出 padding。 */
.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  line-height: 1.06;
  letter-spacing: -0.02em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.05em 0.34em;
  font-size: clamp(2.4rem, 9.4vw, 6.4rem);
  text-transform: uppercase;
  overflow: visible;
}

.wm-rainbow {
  padding: 0.06em 0.16em 0.06em 0.04em;
  background-image: linear-gradient(
    96deg,
    #ef4444 0%, #f97316 17%, #eab308 33%, #22c55e 50%,
    #06b6d4 66%, #3b82f6 83%, #8b5cf6 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wm-plain {
  padding-right: 0.1em;
  color: #fff;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 14px 34px rgba(0, 0, 0, 0.6);
}

.tagline {
  margin: 1.15rem auto 0;
  font-family: var(--font-mono);
  font-size: clamp(0.66rem, 1.6vw, 0.84rem);
  letter-spacing: 0.26em;
  color: var(--ink-3);
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5em;
}

.tagline b { color: var(--accent-soft); font-size: 1.15em; }
.tagline i { font-style: normal; }
.tagline .dot { color: var(--ink-4); }

.tagline::before,
.tagline::after {
  content: "";
  flex: 1 1 60px;
  max-width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.7), transparent);
}

.hero-lede { display: none; }

.hero-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.7rem;
  margin: 2rem 0 0;
  padding: 0;
}

.hstat {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 132px;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--ink-2);
  justify-content: center;
}

.hstat b { font-family: var(--font-display); font-size: 1.15rem; color: #fff; }

.hstat i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-4);
  flex: none;
}

.hstat.pub i  { background: #22c55e; box-shadow: 0 0 12px #22c55e; }
.hstat.unl i  { background: #fb923c; box-shadow: 0 0 12px #fb923c; }
.hstat.dev i  { background: #eab308; box-shadow: 0 0 12px #eab308; }
.hstat.plan i { background: #3b82f6; box-shadow: 0 0 12px #3b82f6; }

/* ============================== 七色切换条 ============================== */
.spectrum {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.55rem;
  margin-bottom: 1.6rem;
}

.chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.85rem 0.8rem 0.95rem;
  border: 0;
  border-radius: var(--radius-s);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  text-align: left;
  overflow: hidden;
  isolation: isolate;
  min-width: 0;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 260ms, background 260ms;
}

.chip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--chip-rgb), 0.42), rgba(var(--chip-rgb), 0.1));
  opacity: 0;
  z-index: -1;
  transition: opacity 280ms;
}

.chip::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: var(--chip);
  transform: scaleX(0.22);
  transform-origin: left;
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.chip:hover { transform: translateY(-4px); }
.chip:hover::before { opacity: 0.55; }

.chip[aria-selected="true"] {
  transform: translateY(-6px);
  box-shadow: 0 14px 34px -12px rgba(var(--chip-rgb), 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.chip[aria-selected="true"]::before { opacity: 1; }
.chip[aria-selected="true"]::after { transform: scaleX(1); }

.chip-top { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.chip-no {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.68);
}

.chip-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(var(--chip-rgb), 0.55), 0 0 12px var(--chip);
  flex: none;
}

.chip-name {
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.28;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  overflow-wrap: anywhere;
}

/* ---- 状态徽章：色条与详情共用 ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.28);
}

.badge.published { color: #5eead4; border-color: rgba(45, 212, 191, 0.5); }
.badge.unlisted { color: #fdba74; border-color: rgba(251, 146, 60, 0.5); }
.badge.developing { color: #fcd34d; border-color: rgba(245, 158, 11, 0.5); }
.badge.planned { color: #bfdbfe; border-color: rgba(96, 165, 250, 0.45); }

/* 四档状态点：实心=公开发布，半满=私有部署测试，四分之一=开发中，空心=计划中。
   圆点只是徽章文字的一个图形前缀，文字仍然是那四个统一标签。 */
.badge::before {
  content: "";
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.4px solid currentColor;
}

.badge.published::before { background: currentColor; }
.badge.unlisted::before { background: linear-gradient(90deg, currentColor 0 50%, transparent 50% 100%); }
.badge.developing::before { background: linear-gradient(90deg, currentColor 0 25%, transparent 25% 100%); }

/* ============================== 详情舞台 ============================== */
.stage {
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stage-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  padding: clamp(1.2rem, 3vw, 2.2rem);
}

.stage[data-anim="in"] .stage-inner > * {
  animation: rise 520ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.stage[data-anim="in"] .stage-inner > *:nth-child(2) { animation-delay: 70ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}

.mod-main { min-width: 0; }

.mod-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.85rem; }

.tag-soft {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

.mod-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.2vw, 2.9rem);
  line-height: 1.1;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  padding-right: 0.06em;
  background: linear-gradient(180deg, #fff 42%, rgba(var(--accent-rgb), 0.85));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  overflow-wrap: anywhere;
}

.mod-pitch {
  font-size: 1.08rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.35rem;
  border-left: 3px solid var(--accent);
  padding-left: 0.85rem;
}

.mod-pitch-en {
  margin: 0 0 1rem;
  font-size: 0.86rem;
  font-style: italic;
  color: var(--ink-3);
  border-left: 3px solid rgba(var(--accent-rgb), 0.28);
  padding-left: 0.85rem;
}

.mod-summary { margin: 0 0 1.35rem; color: var(--ink-2); }

/* ---- 阶段进度 ---- */
.stages-h {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.6rem;
}

.stages { list-style: none; margin: 0 0 1.35rem; padding: 0; display: grid; gap: 0.42rem; }

.stage-step {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.84rem;
  color: var(--ink-4);
}

.stage-step .bar {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
  position: relative;
}

.stage-step .bar span {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(var(--accent-rgb), 0.35));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.stage-step.done { color: var(--ink); }
.stage-step.done .bar span { transform: scaleX(1); }
.stage-step.now { color: #fff; font-weight: 700; }
.stage-step .tick { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent-soft); }

/* ---- 元信息 ---- */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
}

.meta-grid li {
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-s);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line-2);
  min-width: 0;
}

.meta-grid li.src { grid-column: 1 / -1; }

.meta-k {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 0.18rem;
}

.meta-v { font-size: 0.84rem; color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }

/* ---- 数据 / 链接 ---- */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  padding: 0.9rem 0 0.2rem;
  margin-bottom: 0.8rem;
  border-top: 1px solid var(--line-2);
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--accent-soft);
}

.stat span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-family: var(--font-mono);
}

.links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  transition: background 200ms, transform 200ms, box-shadow 200ms;
}

.link-btn:hover {
  background: rgba(var(--accent-rgb), 0.34);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(var(--accent-rgb), 0.9);
}

.link-btn.ghost { background: rgba(255, 255, 255, 0.05); border-color: var(--line); color: var(--ink-2); }

/* ---- 右列：视觉 ---- */
.mod-visual { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }

.hero-shot {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 26px 60px -26px rgba(0, 0, 0, 0.9);
  aspect-ratio: 16 / 10;
  background: #0a0c12;
  margin: 0;
}

.hero-shot[data-zoom] { cursor: zoom-in; }

.hero-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms cubic-bezier(0.2, 0.8, 0.3, 1); }
.hero-shot:hover img { transform: scale(1.04); }

.shot-badge {
  position: absolute;
  top: 0.7rem; left: 0.7rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.92);
  color: #04060a;
  font-weight: 700;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.5rem;
  max-height: 168px;
  overflow-y: auto;
  padding-right: 2px;
}

.thumb {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #0a0c12;
  aspect-ratio: 16 / 10;
  transition: border-color 200ms, transform 200ms;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { border-color: var(--accent); transform: translateY(-2px); }
.thumb.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ---- 预告卡 ---- */
.soon {
  border: 1px dashed rgba(var(--accent-rgb), 0.45);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  background: rgba(var(--accent-rgb), 0.06);
}

.soon h4 { margin: 0 0 0.4rem; font-family: var(--font-display); font-size: 1.05rem; color: #fff; }
.soon p { margin: 0; font-size: 0.9rem; color: var(--ink-2); }

/* ---- 详情分页 ---- */
.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0 clamp(1.2rem, 3vw, 2.2rem);
  border-top: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.22);
}

.dtab {
  border: 0;
  background: none;
  padding: 0.8rem 0.95rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  transition: color 200ms, border-color 200ms;
}

.dtab:hover { color: var(--ink); }
.dtab[aria-selected="true"] { color: #fff; border-bottom-color: var(--accent); }

.dpanel { padding: clamp(1.2rem, 3vw, 2rem); border-top: 1px solid var(--line-2); }
.dpanel[hidden] { display: none; }

/* ---- 官网长描述渲染 ---- */
.prose { max-width: 68ch; color: var(--ink-2); font-size: 0.94rem; }
.prose h3, .prose h4, .prose h5, .prose h6 {
  font-family: var(--font-display);
  color: #fff;
  margin: 1.6rem 0 0.6rem;
  line-height: 1.3;
  letter-spacing: 0;
}
.prose h3 { font-size: 1.3rem; }
.prose h4 { font-size: 1.08rem; }
.prose h5 { font-size: 0.95rem; }
.prose h6 { font-size: 0.88rem; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 0.85rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--accent); }
/* 官网正文自带 markdown 外链（如「Browse All My Mods」）；全站 a 默认去装饰，正文里得能看出可点 */
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(var(--accent-rgb), 0.45);
  transition: text-decoration-color 160ms ease;
}
.prose a:hover { text-decoration-color: currentColor; }

/* ---- 功能卡片 ---- */
.feat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 0.9rem;
}

.feat {
  padding: 1rem 1.1rem;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line-2);
  border-left: 2px solid rgba(var(--accent-rgb), 0.65);
  transition: background 220ms, transform 220ms;
}

.feat:hover { background: rgba(var(--accent-rgb), 0.08); transform: translateY(-2px); }
.feat h4 { margin: 0 0 0.32rem; font-size: 0.96rem; color: #fff; line-height: 1.35; }
.feat p { margin: 0; font-size: 0.86rem; color: var(--ink-2); line-height: 1.62; }

.note-fine { margin: 0.9rem 0 0; font-size: 0.78rem; color: var(--ink-4); }

/* ---- 版本时间轴 ---- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }

.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), rgba(var(--accent-rgb), 0.1));
}

.rel { position: relative; padding: 0 0 1.35rem 2rem; }

.rel::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #0a0c12;
  border: 2px solid var(--accent);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.8);
}

.rel.local::before { border-color: rgba(255, 255, 255, 0.28); box-shadow: none; }

.rel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; margin-bottom: 0.3rem; }
.rel-v { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: #fff; }
.rel-date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-4); }

.rel-chan {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
}

.rel-chan.published { color: #04060a; background: var(--accent); }
/* 私有部署测试的每条：不填色、只用未公开那档的橙色描边，和"已上线"明显分开 */
.rel-chan.private {
  color: #fdba74;
  border: 1px solid rgba(251, 146, 60, 0.5);
  background: rgba(251, 146, 60, 0.1);
}
.rel-chan.local { color: var(--ink-3); border: 1px solid var(--line); }

.rel-head-line { font-size: 0.88rem; color: var(--accent-soft); margin: 0 0 0.45rem; font-weight: 600; }

.rel ul { margin: 0; padding: 0 0 0 1.1rem; font-size: 0.86rem; color: var(--ink-2); }
.rel ul li { margin-bottom: 0.34rem; }
.rel ul li::marker { color: var(--accent); }

.rel-panel { max-width: 74ch; }

/* ---- 上下色切换 ---- */
.stage-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; }

.navbtn {
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--ink-2);
  transition: background 200ms, color 200ms, transform 200ms;
}

.navbtn:hover { background: rgba(var(--accent-rgb), 0.2); color: #fff; transform: translateY(-2px); }

.navcount {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  white-space: nowrap;
}

/* ============================== 支持作者 ============================== */
.support { padding-top: clamp(3.5rem, 8vw, 6rem); padding-bottom: clamp(3rem, 7vw, 5rem); }

.support-card {
  position: relative;
  border-radius: 26px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  overflow: hidden;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.support-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  z-index: 3;
  background: linear-gradient(90deg, #ef4444, #f97316, #eab308, #22c55e, #06b6d4, #3b82f6, #8b5cf6);
}

.support-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../img/bg-support.jpg") center / cover no-repeat;
  opacity: 0.5;
  filter: saturate(1.15);
  transition: filter 900ms ease;
}

.support-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 80% at 50% 0%, rgba(var(--accent-rgb), 0.3), transparent 62%),
    linear-gradient(180deg, rgba(6, 7, 12, 0.7), rgba(6, 7, 12, 0.92));
  transition: background 900ms ease;
}

.support-body {
  position: relative;
  text-align: center;
  padding: clamp(2rem, 5vw, 3.2rem) clamp(1.1rem, 4vw, 3rem) clamp(1.8rem, 4vw, 2.6rem);
}

.support-title {
  margin: 0 0 clamp(1.6rem, 4vw, 2.4rem);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #fff;
  transform: rotate(-1.4deg);
  text-shadow: 0 6px 26px rgba(0, 0, 0, 0.75);
}

.support-title::after {
  content: "";
  display: block;
  width: min(240px, 60%);
  height: 2px;
  margin: 0.7rem auto 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.support-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(1.2rem, 4vw, 3rem);
}

.support-side { flex: 0 0 auto; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  transition: transform 200ms, box-shadow 200ms, background 200ms;
  white-space: nowrap;
}

.pill-btn:hover { transform: translateY(-2px); }

.pill-btn.primary {
  color: #06070b;
  background: linear-gradient(120deg, #fff, var(--accent-soft));
  border-color: transparent;
  box-shadow: 0 16px 40px -18px rgba(var(--accent-rgb), 0.95);
}

.qr-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(0.8rem, 2.4vw, 1.5rem);
}

.qr-row li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 148px;
}

/* 二维码本体保持原始方形尺寸，外框做成彩虹描边的票卡 */
.qr-frame {
  position: relative;
  display: block;
  width: 148px;
  height: 148px;
  padding: 7px;
  border-radius: 20px;
  background:
    linear-gradient(150deg, rgba(239, 68, 68, 0.9), rgba(234, 179, 8, 0.9) 28%,
      rgba(34, 197, 94, 0.9) 50%, rgba(6, 182, 212, 0.9) 72%, rgba(139, 92, 246, 0.9));
  box-shadow: 0 18px 38px -16px rgba(0, 0, 0, 0.9);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 300ms;
}

.qr-row li:nth-child(1) .qr-frame { --tilt: -2.2deg; }
.qr-row li:nth-child(2) .qr-frame { --tilt: 0.8deg; }
.qr-row li:nth-child(3) .qr-frame { --tilt: 2.4deg; }

.qr-frame::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 14px;
  border: 1px dashed rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.qr-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
}

.qr-row li:hover .qr-frame {
  transform: rotate(0deg) translateY(-5px) scale(1.03);
  box-shadow: 0 26px 46px -14px rgba(var(--accent-rgb), 0.75);
}

.qr-row em {
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-family: var(--font-mono);
  text-align: center;
}

/* ============================== 页脚 ============================== */
.foot { border-top: 1px solid var(--line-2); background: rgba(4, 5, 9, 0.8); backdrop-filter: blur(10px); }

.foot-rainbow { height: 3px; background: linear-gradient(90deg, #ef4444, #f97316, #eab308, #22c55e, #06b6d4, #3b82f6, #8b5cf6); }

.foot-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 1.6rem var(--gutter) calc(1.8rem + env(safe-area-inset-bottom));
  text-align: center;
}

.foot-brand { margin: 0 0 0.5rem; font-size: 0.84rem; color: var(--ink-3); }
.foot-brand b { font-family: var(--font-display); font-style: italic; color: #fff; }
.foot-fine { margin: 0; font-size: 0.72rem; color: var(--ink-4); }
.foot-fetched { margin-top: 0.45rem; }

/* ============================== 灯箱 ============================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 2rem 1.2rem;
  background: rgba(3, 4, 8, 0.92);
  backdrop-filter: blur(8px);
  animation: fade 220ms ease;
}

.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }

.lightbox figure { margin: 0; max-width: min(1100px, 92vw); }
.lightbox img { width: 100%; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.lightbox figcaption { margin-top: 0.8rem; text-align: center; font-size: 0.86rem; color: var(--ink-2); }

.lb-close {
  position: absolute;
  top: max(1.1rem, env(safe-area-inset-top));
  right: 1.3rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.4rem;
  line-height: 1;
}

.lb-close:hover { background: rgba(var(--accent-rgb), 0.3); }

/* ============================== 滚动进场 ============================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 620ms ease, transform 620ms cubic-bezier(0.2, 0.8, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================== 响应式 ============================== */
@media (max-width: 1100px) {
  .spectrum {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 900px) {
  .stage-inner { grid-template-columns: minmax(0, 1fr); }
  .mod-visual { order: -1; }
  .brand-text small { display: none; }
  .thumb-row { max-height: none; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .spectrum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
  .chip { padding: 0.7rem 0.65rem 0.8rem; gap: 0.45rem; }
  .chip-name { font-size: 0.82rem; }
  .hero { padding-top: 2rem; }
  .hero-stats { gap: 0.5rem; }
  .hstat { min-width: 0; flex: 1 1 44%; padding: 0.5rem 0.7rem; font-size: 0.8rem; }
  .stat-row { gap: 1.1rem; }
  .stage-nav { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
  .navbtn { font-size: 0.78rem; padding: 0.45rem 0.85rem; }
  .detail-tabs { gap: 0; }
  .dtab { padding: 0.75rem 0.7rem; font-size: 0.8rem; }
  .qr-row li { width: clamp(104px, 27vw, 148px); }
  .qr-frame { width: 100%; height: auto; aspect-ratio: 1; padding: 6px; border-radius: 16px; }
  .support-flex { flex-direction: column; gap: 1.4rem; }
  .lang-btn { padding: 0.3rem 0.5rem; gap: 0.35rem; }
  .lang-cur { font-size: 0.78rem; max-width: 34vw; }
  .lang-list { min-width: min(78vw, 240px); max-height: 58vh; }
  .lang-opt { padding: 0.62rem 0.55rem 0.62rem 1.6rem; font-size: 0.86rem; }
  .home-label { font-size: 0.78rem; max-width: 22vw; }
  .home-icon { width: 15px; height: 15px; }
}

@media (max-width: 400px) {
  .spectrum { grid-template-columns: 1fr; }
  .brand-text b { font-size: 0.9rem; }
  .brand-text small { display: none; }
  .home-label { max-width: 18vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
