/* ============================================================
 * SteamKit 社区站点 — 设计令牌（暗色 + 亮色双主题）
 * 灵感来自 steam-scripts-site（Steam 蓝 + 紫 + 玻璃）
 * ============================================================ */

:root {
  /* 通用尺寸（Steam 硬朗客户端风：小圆角） */
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;
  --radius-xl: 6px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* 亮色（默认） */
  --color-bg: #f5f7fb;
  --color-bg-elevated: #ffffff;
  --color-bg-muted: #eef1f8;
  --color-bg-card: rgba(255, 255, 255, 0.75);
  --color-bg-card-hover: rgba(255, 255, 255, 0.95);
  --color-bg-glass: rgba(255, 255, 255, 0.7);
  --color-bg-spotlight: rgba(102, 192, 244, 0.04);

  --color-text: #1f2430;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;

  --color-border: rgba(15, 23, 42, 0.08);
  --color-border-strong: rgba(15, 23, 42, 0.16);
  --color-border-subtle: rgba(15, 23, 42, 0.05);

  /* Brand — 默认 Steam 蓝 */
  --color-primary: #66c0f4;
  --color-primary-light: #4fc3f7;
  --color-primary-dark: #3b9fce;
  --color-primary-soft: rgba(102, 192, 244, 0.12);

  --color-secondary: #4fc3f7;
  --color-accent: #a78bfa;
  --color-accent-soft: rgba(167, 139, 250, 0.12);

  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-purple: #c084fc;
  --color-cyan: #22d3ee;
  --color-yellow: #facc15;
  --color-green: #4ade80;

  /* 兼容旧变量的别名（保留向前兼容） */
  --accent: var(--color-primary);
  --accent-dark: var(--color-primary-dark);
  --bg: var(--color-bg);
  --card: var(--color-bg-elevated);
  --text: var(--color-text);
  --muted: var(--color-text-muted);
  --border: var(--color-border-strong);

  /* 渐变 */
  /* ---- 站点主题钩子（data-skin）：默认值 = 原 Steam 蓝，启用主题后由 head 注入覆盖 ---- */
  --skin-title-flow: linear-gradient(110deg, #e4f5ff 0%, #66c0f4 30%, #a78bfa 52%, #22d3ee 74%, #e4f5ff 100%);
  --skin-title-glow: drop-shadow(0 0 16px rgba(102, 192, 244, .30)) drop-shadow(0 0 40px rgba(167, 139, 250, .20));
  --skin-title-glow-strong: drop-shadow(0 0 26px rgba(102, 192, 244, .55)) drop-shadow(0 0 68px rgba(167, 139, 250, .38));
  --skin-title-sheen: linear-gradient(105deg, transparent 38%, rgba(228, 245, 255, 0) 44%, rgba(228, 245, 255, .95) 49%, rgba(34, 211, 238, .85) 51%, rgba(167, 139, 250, .85) 54%, transparent 62%);
  --skin-line-rgb: 102, 192, 244;
  --skin-primary-rgb: 102, 192, 244;

  --gradient-hero: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(102, 192, 244, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 50%, rgba(167, 139, 250, 0.1) 0%, transparent 60%);
  --gradient-brand: linear-gradient(135deg, #66c0f4 0%, #3b9fce 100%);
  --gradient-accent: linear-gradient(135deg, #a78bfa 0%, #66c0f4 100%);
  --gradient-text: linear-gradient(135deg, #66c0f4 0%, #a78bfa 100%);
  --gradient-mesh: radial-gradient(at 20% 20%, rgba(102, 192, 244, 0.10) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(167, 139, 250, 0.08) 0px, transparent 50%),
    radial-gradient(at 0% 80%, rgba(76, 175, 80, 0.06) 0px, transparent 50%);
  --pattern-dots: radial-gradient(circle, rgba(102, 192, 244, 0.08) 1px, transparent 1px);

  /* 顶栏：左浅右深（凸显左侧蓝色 logo） */
  --header-grad: linear-gradient(90deg, rgba(255, 255, 255, .96) 0%, rgba(240, 246, 252, .9) 52%, rgba(211, 226, 241, .92) 100%);
  /* Hero：中间亮、四周暗（凸显居中 logo） */
  --hero-center: radial-gradient(ellipse 50% 66% at 50% 40%, rgba(255, 255, 255, .9) 0%, rgba(198, 226, 250, .4) 44%, transparent 74%);
  --hero-vignette: radial-gradient(ellipse 78% 92% at 50% 42%, transparent 34%, rgba(90, 120, 160, .16) 100%);
  /* 首页 logo 光效（亮色主题：克制） */
  --logo-glow: rgba(56, 140, 200, .38);
  --logo-glow-far: rgba(56, 140, 200, .2);
  --logo-halo: radial-gradient(circle, rgba(96, 176, 228, .26) 0%, rgba(158, 128, 235, .12) 46%, transparent 70%);

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --shadow-card-hover: 0 12px 40px rgba(102, 192, 244, 0.18);
  --shadow-glow-primary: 0 0 0 3px rgba(102, 192, 244, 0.15), 0 0 30px rgba(102, 192, 244, 0.25);

  /* 滚动条 */
  --color-scrollbar-track: transparent;
  --color-scrollbar-thumb: rgba(15, 23, 42, 0.2);

  /* 玻璃（Steam 风：去毛玻璃） */
  --glass-blur: none;
  --glass-bg: var(--color-bg-glass);
  --glass-border: rgba(255, 255, 255, 0.5);

  --shadow: var(--shadow-sm);
}

/* ===== 暗色主题（默认开启） ===== */
:root:not([data-theme='light']) {
  /* Steam 原生深蓝灰（去紫、去霓虹） */
  --color-bg: #141a22;
  --color-bg-elevated: #1b2634;
  --color-bg-muted: #10151d;
  --color-bg-card: rgba(42, 60, 80, 0.5);
  --color-bg-card-hover: rgba(42, 60, 80, 0.85);
  --color-bg-glass: rgba(20, 26, 34, 0.72);
  --color-bg-spotlight: rgba(102, 160, 210, 0.05);

  --color-text: #c9d6e2;
  --color-text-secondary: #97a7b8;
  --color-text-muted: #6b7d90;

  /* 边框去亮蓝，改中性灰蓝 */
  --color-border: rgba(150, 175, 200, 0.13);
  --color-border-strong: rgba(150, 175, 200, 0.28);
  --color-border-subtle: rgba(255, 255, 255, 0.05);

  --color-primary: #66c0f4;
  --color-primary-light: #4fc3f7;
  --color-primary-dark: #3b9fce;
  --color-primary-soft: rgba(102, 192, 244, 0.12);

  --color-secondary: #4fc3f7;
  /* 去紫：accent 统一为 Steam 蓝系 */
  --color-accent: #66c0f4;
  --color-accent-soft: rgba(102, 192, 244, 0.12);

  --color-success: #4caf50;
  --color-warning: #ff9800;
  --color-error: #ff6b6b;
  --color-purple: #7fb0d4;
  --color-cyan: #4fc3f7;
  --color-yellow: #facc15;
  --color-green: #4ade80;

  --accent: var(--color-primary);
  --accent-dark: var(--color-primary-dark);
  --bg: var(--color-bg);
  --card: var(--color-bg-card);
  --text: var(--color-text);
  --muted: var(--color-text-muted);
  --border: var(--color-border-strong);

  /* 去紫：覆盖定义在亮色 :root 的全局渐变（暗色专属，不影响亮色） */
  --gradient-hero: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(102, 192, 244, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 50%, rgba(102, 160, 210, 0.07) 0%, transparent 60%);
  --gradient-brand: linear-gradient(135deg, #66c0f4 0%, #3b8fc7 100%);
  --gradient-accent: linear-gradient(135deg, #66c0f4 0%, #4aa8e0 100%);
  --gradient-text: linear-gradient(135deg, #cfe4f2 0%, #66c0f4 100%);
  --gradient-mesh: radial-gradient(at 20% 20%, rgba(102, 192, 244, 0.08) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(102, 160, 210, 0.05) 0px, transparent 50%),
    radial-gradient(at 0% 80%, rgba(90, 130, 165, 0.04) 0px, transparent 50%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 12px 40px rgba(102, 160, 210, 0.18);
  --shadow-glow-primary: 0 0 0 3px rgba(102, 192, 244, 0.12), 0 0 26px rgba(102, 192, 244, 0.2);

  --color-scrollbar-track: #0a0e1a;
  --color-scrollbar-thumb: #1e2a3a;

  --glass-blur: none;
  --glass-bg: #1b2634;
  --glass-border: rgba(255, 255, 255, 0.08);

  /* 顶栏：左浅右深（凸显左侧蓝色 logo） */
  --header-grad: linear-gradient(90deg, rgba(36, 50, 66, .94) 0%, rgba(23, 33, 46, .88) 52%, rgba(14, 19, 27, .95) 100%);
  /* Hero：中间亮、四周暗（凸显居中 logo）— 减弱中心光晕，去霓虹 */
  --hero-center: radial-gradient(ellipse 50% 66% at 50% 40%, rgba(120, 170, 210, .16) 0%, rgba(70, 110, 150, .07) 46%, transparent 74%);
  --hero-vignette: radial-gradient(ellipse 80% 94% at 50% 42%, transparent 30%, rgba(6, 9, 14, .7) 100%);
  /* 首页 logo 光效（暗色主题：减弱发光） */
  --logo-glow: rgba(102, 192, 244, .34);
  --logo-glow-far: rgba(102, 192, 244, .16);
  --logo-halo: radial-gradient(circle, rgba(102, 192, 244, .2) 0%, rgba(90, 140, 180, .08) 46%, transparent 72%);

  --shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 1px 2px rgba(0, 0, 0, .25);
}

/* ============================================================
 * 重置与基础
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--gradient-mesh), var(--pattern-dots), var(--color-bg);
  background-attachment: fixed;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s ease, color .25s ease;
}
a { color: var(--color-primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--color-primary-light); }
h1, h2, h3 { line-height: 1.35; color: var(--color-text); }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
code {
  background: var(--color-bg-muted);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--color-primary);
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-scrollbar-track); }
::-webkit-scrollbar-thumb {
  background: var(--color-scrollbar-thumb);
  border-radius: 5px;
  border: 2px solid var(--color-scrollbar-track);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 520px; }
.container.narrow-wide { max-width: 980px; }
.muted { color: var(--color-text-muted); }
.small { font-size: 13px; }
.empty { color: var(--color-text-muted); text-align: center; padding: 24px 0; list-style: none; }

/* 通用工具类 */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}
.text-gradient {
  background: var(--gradient-text);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================
 * 顶部导航
 * ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background: var(--header-grad);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 700;
  font-size: 17px;
}
.brand-logo {
  width: 40px;
  height: 40px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(71, 146, 196, .35));
}
.main-nav { display: flex; gap: 6px; flex: 1; }
/* 导航竖线分隔条目（navItems 中单独一行「-」）：站内 / 站外链接分组 */
.main-nav .nav-divider {
  flex: none;
  width: 1px; height: 16px;
  align-self: center;
  margin: 0 7px;
  background: var(--color-border);
}
.main-nav a {
  color: var(--color-text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  transition: all .2s ease;
}
.main-nav a:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
.main-nav a.active {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
.header-user { display: flex; align-items: center; gap: 10px; }
/* 未登录「登录」入口：融入导航的低调文字按钮 */
.login-entry {
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.login-entry:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
/* ===== 站点主题选择器（顶栏右上角）=====
   一个按钮 + 下拉清单：已启用主题可直接切换（走 /theme/:id 写 cookie），
   未启用主题只占位展示，标「待上线」，不可点。 */
.skin-picker { position: relative; }
.skin-btn {
  /* 只保留一个图标按钮：主题名与明暗开关都收进弹窗里 */
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.skin-btn:hover,
.skin-btn[aria-expanded="true"] {
  color: var(--color-primary);
  border-color: var(--color-border-strong);
  background: var(--color-primary-soft);
}
.skin-ico { width: 17px; height: 17px; flex: none; }
/* 换肤图标：悬停/展开时轻轻转一下，给出「换肤」的语义反馈 */
.skin-btn:hover .skin-ico,
.skin-btn[aria-expanded="true"] .skin-ico { transform: rotate(-18deg); }
.skin-ico { transition: transform .28s cubic-bezier(.2, .8, .3, 1); }
/* 主题切换全屏遮罩：盖住整页重载，避免 20 张大图加载时白屏/闪烁的卡顿感 */
.skin-veil {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-bg, #0a0e1a);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
}
.skin-veiling .skin-veil { opacity: 1; visibility: visible; pointer-events: all; }
.skin-veiling.skin-veil-instant .skin-veil { transition: none; }
.skin-veil-box {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-size: 13px; letter-spacing: .08em; color: var(--color-text-secondary);
}
.skin-veil-mark {
  width: 34px; height: 34px; color: var(--color-primary);
  animation: skin-veil-spin 1.6s linear infinite;
}
@keyframes skin-veil-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .skin-veil { transition: none; }
  .skin-veil-mark { animation: none; }
}
.skin-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 80;
  width: 264px; max-height: min(78vh, 620px); overflow-y: auto; padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg-elevated);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .38);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.skin-picker.is-open .skin-menu { opacity: 1; visibility: visible; transform: none; }
.skin-menu-hd {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 4px 8px 8px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em;
  color: var(--color-text-muted); text-transform: uppercase;
}
.skin-menu-hd span { letter-spacing: 0; text-transform: none; font-size: 11px; opacity: .75; }
.skin-menu-hd-sub { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--color-border-subtle); }
/* 明暗切换：搬进主题设置弹窗，选择结果由前端写入 localStorage */
.skin-mode {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 2px 8px 6px;
}
.skin-mode-label { font-size: 12.5px; color: var(--color-text-secondary); }
.skin-mode-switch {
  display: inline-flex; gap: 2px; padding: 2px;
  border: 1px solid var(--color-border); border-radius: 8px;
  background: var(--color-bg-muted);
}
.skin-mode-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--color-text-muted);
  font: inherit; font-size: 11.5px; cursor: pointer;
}
.skin-mode-btn svg { width: 13px; height: 13px; flex: none; }
.skin-mode-btn:hover { color: var(--color-text); }
.skin-mode-btn[aria-pressed="true"] {
  background: var(--color-bg-elevated); color: var(--color-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.skin-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 9px; border-radius: 8px;
  color: var(--color-text-secondary);
  font-size: 13.5px; text-decoration: none;
}
a.skin-item:hover { background: var(--color-primary-soft); color: var(--color-text); }
.skin-item.is-on { background: var(--color-primary-soft); color: var(--color-text); }
.skin-item.is-lock { opacity: .55; cursor: not-allowed; }
.skin-item-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.skin-item-txt b { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.skin-item-txt small {
  font-size: 11px; color: var(--color-text-muted); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.skin-dots { display: inline-flex; gap: 3px; flex: none; }
.skin-dots i { display: block; width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .28); }
.skin-check { width: 14px; height: 14px; flex: none; color: var(--color-primary); }
.skin-soon {
  flex: none; padding: 1px 6px; border-radius: 999px;
  border: 1px solid var(--color-border);
  font-style: normal; font-size: 10.5px; color: var(--color-text-muted);
  white-space: nowrap;
}
@media (max-width: 640px) {
  /* 窄屏按钮缩到 32px，给导航腾空间；弹窗宽度不超出屏幕 */
  .skin-btn { width: 32px; height: 32px; }
  .skin-ico { width: 16px; height: 16px; }
  .skin-menu { width: min(264px, calc(100vw - 24px)); }
}

.theme-toggle {
  --slide: 26px; /* 图标滑出距离：大于「按钮半宽 + 图标半宽」，保证完全移出后被裁掉 */
  position: relative;
  overflow: hidden; /* 关键：滑出边界的图标被裁掉，形成"滑进滑出"的遮罩效果 */
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.theme-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-border-strong);
  background: var(--color-primary-soft);
}
/* 日月对向滑动切换（参考 zibll 主题 toggle-theme 动效）：
   两个图标绝对定位居中，靠 transform 水平滑入滑出；亮色显示月亮（点我变暗），
   暗色显示太阳（点我变亮），点击时月亮向左滑出、太阳从右滑入，0.4s 过渡。 */
.theme-toggle svg {
  position: absolute;
  inset: 0;
  margin: auto; /* absolute + inset:0 + margin:auto 实现水平垂直居中 */
  width: 16px;
  height: 16px;
  transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}
/* 亮色（默认）：月亮居中可见，太阳停在右侧界外 */
.theme-toggle .icon-sun  { transform: translateX(var(--slide)); }
.theme-toggle .icon-moon { transform: translateX(0); }
/* 暗色：太阳滑入居中，月亮向左滑出界外 */
:root:not([data-theme='light']) .theme-toggle .icon-sun  { transform: translateX(0); }
:root:not([data-theme='light']) .theme-toggle .icon-moon { transform: translateX(calc(-1 * var(--slide))); }
/* 尊重系统「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  .theme-toggle svg { transition: none; }
}

/* ============================================================
 * 头像 / 下拉
 * ============================================================ */
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #06121f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.avatar.xs { width: 22px; height: 22px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; font-size: 20px; }
.avatar.xl { width: 72px; height: 72px; font-size: 30px; }
.avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  cursor: pointer;
  font: inherit;
  color: var(--color-text);
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  transition: all .2s;
}
.avatar-btn:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-strong);
}
.avatar-name {
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 6px;
  z-index: 60;
}
.dropdown-menu a, .dropdown-menu .linklike {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--color-text);
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  transition: background .15s;
}
.dropdown-menu a:hover, .dropdown-menu .linklike:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.hidden { display: none !important; }

/* 闪存消息 */
.flash {
  margin-top: 14px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid var(--color-border-strong);
  padding: 10px 14px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.flash-close {
  background: none;
  border: none;
  font-size: 18px;
  color: inherit;
  cursor: pointer;
  line-height: 1;
  opacity: .7;
}
.flash-close:hover { opacity: 1; }

/* ============================================================
 * 按钮 / 表单
 * ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary {
  /* Steam 主操作绿：安装 / 购买 / 开始 */
  background: linear-gradient(180deg, #a4d007 0%, #5c7e10 100%);
  color: #fff;
  border: 1px solid #4c6b22;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover {
  color: #fff;
  background: linear-gradient(180deg, #b4e008 0%, #6a8f13 100%);
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
}
.btn-ghost:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
.btn-ghost.current {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
.btn-danger-ghost {
  background: transparent;
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, .35);
}
.btn-danger-ghost:hover {
  background: rgba(239, 68, 68, .12);
  color: var(--color-error);
}
.btn-light {
  background: rgba(255, 255, 255, .92);
  color: var(--color-primary);
}
.btn-light:hover {
  background: #fff;
  color: var(--color-primary-dark);
}
.btn-download {
  background: linear-gradient(180deg, #a4d007 0%, #5c7e10 100%);
  color: #fff;
  border: 1px solid #4c6b22;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
  font-size: 15px;
  padding: 11px 22px;
}
.btn-download:hover {
  background: linear-gradient(180deg, #b4e008 0%, #6a8f13 100%);
  color: #fff;
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--color-text);
}
.form-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}
.form-hint code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--color-bg-muted);
  font-size: 11.5px;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  font: inherit;
  background: var(--color-bg-card);
  color: var(--color-text);
  outline: none;
  transition: all .15s;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
  background: var(--color-bg-elevated);
}
textarea { resize: vertical; }
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  justify-content: flex-end;
}
.alert {
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-error {
  background: rgba(239, 68, 68, .1);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, .3);
}
.alert-ok {
  background: rgba(34, 197, 94, .1);
  color: var(--color-success, #22c55e);
  border: 1px solid rgba(34, 197, 94, .3);
}
.alert-info {
  background: rgba(26, 159, 255, .1);
  color: var(--color-primary, #1a9fff);
  border: 1px solid rgba(26, 159, 255, .3);
}

/* ============================================================
 * 卡片 / 版式
 * ============================================================ */
.site-main { min-height: calc(100vh - 220px); padding-bottom: 48px; }
/* 首页核心脚本区紧贴页脚，去掉多余留白（仅首页） */
.site-main:has(.home) { padding-bottom: 24px; }
.site-main:has(.home) + .site-footer { margin-top: 0; }
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.card.pad, .pad { padding: 20px; }
.card-title {
  font-size: 16px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.more { font-size: 13px; font-weight: 500; color: var(--color-primary); }
.more:hover { text-decoration: underline; }
.section { margin-top: 26px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.page-head { margin: 26px 0 18px; }
.page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-actions { margin-bottom: 16px; }
.crumbs {
  margin-top: 20px;
  font-size: 13px;
  color: var(--color-text-muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.crumbs a { color: var(--color-text-secondary); }
.crumbs a:hover { color: var(--color-primary); }
.h1-sub { font-size: 14px; font-weight: 400; }

/* ============================================================
 * Hero（主页）
 * ============================================================ */
.hero {
  position: relative;
  background: var(--gradient-hero);
  color: var(--color-text);
  padding: 80px 0 56px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--pattern-dots);
  background-size: 22px 22px;
  opacity: .5;
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.hero-glow-1 {
  top: -120px;
  left: 12%;
  width: 380px;
  height: 380px;
  background: rgba(102, 192, 244, .25);
}
.hero-glow-2 {
  bottom: -160px;
  right: 8%;
  width: 460px;
  height: 460px;
  background: rgba(102, 160, 210, .16);
}
.hero > .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.hero-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 760px;
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 48px;
}
.stat-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat-label {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.announce {
  margin-top: 18px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 10px 16px;
  border-radius: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  backdrop-filter: var(--glass-blur);
}
.announce-tag {
  background: var(--color-warning);
  color: #1f1300;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.stats-row {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.stat {
  flex: 1;
  min-width: 130px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}
.stat b { font-size: 24px; display: block; color: var(--color-primary); }
.stat span { color: var(--color-text-muted); font-size: 13px; }
.stat-alert b { color: var(--color-error); }

/* ============================================================
 * 区块通用
 * ============================================================ */
.section-block { padding: 72px 0; }
.section-block .section-head-block { margin-bottom: 36px; }
.section-foot-cta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 20px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-border-strong);
  background: var(--color-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  text-align: center;
}
.section-foot-cta .btn { font-size: 14px; }
.section-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.section-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 720px;
}

/* ============================================================
 * 脚本猫推荐 / 首次使用指南 / 脚本网格 / 依赖库 / 作者
 * （参考 steam-scripts-site 的 App.tsx 视觉）
 * ============================================================ */
.manager-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background: linear-gradient(135deg, rgba(102, 192, 244, 0.10) 0%, rgba(102, 160, 210, 0.06) 50%, var(--color-bg-card) 100%);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 36px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}
.manager-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--gradient-accent);
  display: grid;
  place-items: center;
  font-size: 32px;
  box-shadow: var(--shadow-glow-primary);
  margin-bottom: 16px;
}
.manager-banner h3 {
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--color-text);
}
.manager-banner p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}
.manager-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.highlight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}
.highlight-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}
.highlight-list li::before {
  content: '✦';
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.step-card {
  position: relative;
  padding: 22px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: all .25s ease;
}
.step-card:hover {
  border-color: var(--color-border-strong);
  background: var(--color-bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.step-num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient-brand);
  color: #06121f;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 14px;
}
.step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 6px;
}
.step-desc {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin: 0 0 10px;
}
.step-tip {
  display: flex;
  gap: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-warning);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 152, 0, .08);
  border: 1px solid rgba(255, 152, 0, .15);
}

/* 筛选 */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  transition: all .2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip:hover {
  color: var(--color-primary);
  border-color: var(--color-border-strong);
}
.chip.active {
  color: #06121f;
  background: var(--gradient-brand);
  border-color: transparent;
  box-shadow: var(--shadow-glow-primary);
}
.chip-count {
  font-size: 11px;
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 600;
}
.chip.active .chip-count {
  background: rgba(6, 18, 31, .15);
  color: #06121f;
}

/* ---- 分类导航（HUD 科技风：独立芯片卡片 + 角括号选中态） ---- */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.cat-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--color-bg-card), rgba(127, 127, 127, .03));
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.cat-ico {
  width: 15px; height: 15px;
  flex: none;
  color: var(--color-text-muted);
  transition: color .2s ease;
}
.cat-chip:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
}
.cat-chip:hover .cat-ico { color: var(--color-primary); }
.cat-chip.active {
  color: var(--color-primary);
  border-color: color-mix(in srgb, var(--color-primary) 45%, transparent);
  background: linear-gradient(180deg, var(--color-primary-soft), rgba(127, 127, 127, .02));
  box-shadow: 0 0 14px var(--color-primary-soft), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.cat-chip.active .cat-ico { color: var(--color-primary); }
/* HUD 角括号：选中芯片的对角装饰 */
.cat-chip.active::before,
.cat-chip.active::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  pointer-events: none;
}
.cat-chip.active::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--color-primary);
  border-left: 2px solid var(--color-primary);
  border-top-left-radius: 12px;
}
.cat-chip.active::after {
  right: -1px; bottom: -1px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  border-bottom-right-radius: 12px;
}
.cat-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 1px 8px;
  border-radius: 6px;
  color: var(--color-text-muted);
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
}
.cat-chip.active .cat-count {
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border-color: color-mix(in srgb, var(--color-primary) 30%, transparent);
}

/* 脚本卡片 */
.script-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.script-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: all .25s ease;
  cursor: pointer;
  color: var(--color-text);
}
.script-card:hover {
  border-color: var(--color-border-strong);
  background: var(--color-bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  color: var(--color-text);
}
.script-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.script-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}
.script-icon img { width: 100%; height: 100%; display: block; object-fit: contain; }
.script-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 4px;
  line-height: 1.35;
}
.script-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}
.version-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 2px 8px;
  border-radius: 6px;
}
.category-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.featured-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 700;
  color: #06121f;
  background: var(--gradient-accent);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .02em;
}
.script-summary {
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.script-card-foot {
  margin-top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-subtle);
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border);
  flex: none;
}
.author-avatar-fallback {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #06121f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex: none;
}
.author-avatar-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--color-border);
}

/* 核心脚本树状布局（首页）：中间发光干线 + 左右两列（SmallFork / Healer007 各 Top 4） */
.core-tree {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
}
.core-tree::before {
  content: "";
  position: absolute;
  left: 50%; top: 4px; bottom: 4px;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg,
    transparent,
    rgba(var(--skin-line-rgb), .85) 8%,
    rgba(var(--skin-line-rgb), .85) 92%,
    transparent);
  box-shadow: 0 0 12px rgba(var(--skin-line-rgb), .5), 0 0 34px rgba(var(--skin-line-rgb), .22);
  pointer-events: none;
}
/* 凡人修仙传：金雷竹自上而下贯穿；图片缩小后垂直重复，上下两根拼接，单根更细 */
.home .core-trunk {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 220px;
  transform: translateX(-50%);
  background-repeat: repeat-y;
  background-position: center top;
  /* 缩小图片 → 竹身变细；高度不足时垂直衔接成上下两根 */
  background-size: auto 620px;
  /* 整体压暗，降低金色闪电对正文的干扰 */
  filter: brightness(.72) saturate(.85);
  z-index: 0;
  pointer-events: none;
  /* 上下两端虚化变弱，衔接处稍降不透明度弱化接缝 */
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.4) 7%, #000 18%, #000 48%, rgba(0,0,0,.62) 58%, #000 68%, #000 82%, rgba(0,0,0,.4) 93%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.4) 7%, #000 18%, #000 48%, rgba(0,0,0,.62) 58%, #000 68%, #000 82%, rgba(0,0,0,.4) 93%, transparent 100%);
}
.home .core-tree:has(> .core-trunk)::before { display: none; }
.core-heads {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 24px;
}
.core-head { display: inline-flex; align-items: center; gap: 10px; }
.core-head-l { justify-content: flex-end; text-align: right; }
.core-head-r { justify-content: flex-start; }
.core-head-avatar {
  width: 36px; height: 36px; flex: none;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #06121f;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
  box-shadow: 0 0 0 3px var(--color-primary-soft), 0 0 16px rgba(var(--skin-line-rgb), .4);
  overflow: hidden;
  position: relative;
}
/* 头像 img 绝对定位覆盖字母占位：加载前显示字母，加载完成被盖住，失败 onerror 移除 */
.core-head-avatar img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.author-avatar-wrap { position: relative; overflow: hidden; }
.author-avatar-wrap .author-avatar-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
/* 列头头像/昵称 → Steam 主页链接 */
.core-avatar-link { display: inline-flex; flex: none; transition: transform .18s ease; }
.core-avatar-link:hover { transform: scale(1.08); }
.core-name-link { color: inherit; text-decoration: none; transition: color .18s ease; }
.core-name-link:hover b { color: var(--color-primary); }
.core-head-txt b { display: block; font-size: 15px; color: var(--color-text); }
.core-head-txt span { font-size: 11.5px; color: var(--color-text-muted); }
/* 列头贡献对比：满条 = 全部脚本数，填充从中线（昵称侧）向外生长、外端渐隐 */
.core-head-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.core-bar-lbl {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--color-primary-soft);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
  flex: none;
}
.core-bar-lbl b {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-primary);
  line-height: 1;
}
.core-bar-track {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 4px;
}
.core-bar-track i {
  position: absolute;
  top: 0;
  height: 100%;
  transition: width .6s ease;
}
/* 左列：填充贴右侧起点（昵称旁），向左生长、左端收尖渐隐 */
.core-head-l .core-bar-track i {
  right: 0;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(270deg, var(--color-primary) 0%, rgba(var(--skin-line-rgb), .6) 45%, rgba(var(--skin-line-rgb), 0) 92%);
  clip-path: polygon(0 50%, 10% 0, 100% 0, 100% 100%, 10% 100%);
  box-shadow: 0 0 5px rgba(var(--skin-line-rgb), .2);
}
/* 右列：填充贴左侧起点（昵称旁），向右生长、右端收尖渐隐 */
.core-head-r .core-bar-track i {
  left: 0;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(90deg, var(--color-primary) 0%, rgba(var(--skin-line-rgb), .6) 45%, rgba(var(--skin-line-rgb), 0) 92%);
  clip-path: polygon(0 0, 90% 0, 100% 50%, 90% 100%, 0 100%);
  box-shadow: 0 0 5px rgba(var(--skin-line-rgb), .2);
}
.core-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: stretch;
  margin-bottom: 22px;
}
.core-row:last-child { margin-bottom: 0; }
/* 干线上的存档点铃铛（替换原发光节点） */
.core-node-bell {
  position: absolute;
  left: 50%; top: 50%;
  width: 40px; height: auto;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 10px rgba(var(--skin-line-rgb), .55)) drop-shadow(0 2px 4px rgba(0, 0, 0, .5));
}
:root[data-theme='light'] .core-node-bell {
  filter: drop-shadow(0 0 8px rgba(37, 120, 200, .35)) drop-shadow(0 2px 3px rgba(0, 0, 0, .28));
}
/* 凡人修仙传：干线节点改用小绿瓶（竖幅透明 PNG），按高度撑满、比铃铛大、取消像素化 */
:root[data-skin="fanren"] .home .core-node-bell {
  width: auto;
  height: 68px;
  image-rendering: auto;
  filter: drop-shadow(0 0 12px rgba(142, 230, 212, .38)) drop-shadow(0 3px 8px rgba(0, 0, 0, .55));
}
:root[data-skin="fanren"][data-theme='light'] .home .core-node-bell {
  filter: drop-shadow(0 0 9px rgba(44, 138, 120, .30)) drop-shadow(0 3px 6px rgba(0, 0, 0, .22));
}
.core-cell { position: relative; display: flex; min-width: 0; }
.core-cell-l { justify-content: flex-end; }
.core-cell-r { justify-content: flex-start; }
.core-cell .script-card { width: 100%; max-width: 480px; }
/* 卡片 ↔ 干线的水平连接线 */
.core-cell-l::after {
  content: "";
  position: absolute;
  left: 100%; top: 50%;
  width: 32px; height: 1px;
  background: linear-gradient(90deg, rgba(var(--skin-line-rgb), .55), rgba(var(--skin-line-rgb), .08));
}
.core-cell-r::after {
  content: "";
  position: absolute;
  right: 100%; top: 50%;
  width: 32px; height: 1px;
  background: linear-gradient(270deg, rgba(var(--skin-line-rgb), .55), rgba(var(--skin-line-rgb), .08));
}
/* 空单元格不画连接线 */
.core-cell:empty::after { display: none; }
@media (max-width: 860px) {
  .core-tree::before,
  .core-node-bell,
  .core-cell::after { display: none; }
  .core-heads { grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }
  .core-head-l, .core-head-r { justify-content: flex-start; text-align: left; }
  /* 单列后统一两列头为「头像 → 昵称 → 进度条」：
     左列 DOM 是 bar→txt→avatar，用 row-reverse 反转；右列 bar 内徽章在条后面，用 order 调前 */
  .core-head { width: 100%; }
  .core-head-l { flex-direction: row-reverse; }
  .core-head-r .core-bar-lbl { order: -1; }
  /* 单列后左列（SmallFork）进度条改为向右生长，与右列（Healer007）方向并齐 */
  .core-head-l .core-bar-track i {
    right: auto;
    left: 0;
    border-radius: 4px 0 0 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, rgba(var(--skin-line-rgb), .6) 45%, rgba(var(--skin-line-rgb), 0) 92%);
    clip-path: polygon(0 0, 90% 0, 100% 50%, 90% 100%, 0 100%);
  }
  .core-row { grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
  .core-cell .script-card { max-width: none; }
}
.script-stats {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.script-stats svg { width: 13px; height: 13px; }
.script-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 13px;
}
.script-link:hover { text-decoration: underline; }

/* 卡片热度条：安装量相对全站最高值，底栏居中 */
.card-heat {
  width: 150px;
  flex: 0 0 auto;
}
/* 卡片安装按钮：与详情页「直接安装」同一个脚本猫 .user.js 直链 */
.card-install {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: 8px;
  font-size: 11px; font-weight: 650; line-height: 1;
  text-decoration: none; white-space: nowrap;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.card-install svg { width: 12px; height: 12px; flex-shrink: 0; }
.card-install:hover {
  color: #0c2433; background: var(--color-primary); transform: translateY(-1px);
}
.card-heat .heat-top {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-bottom: 0;
  line-height: 1;
  color: var(--color-text-muted);
}
.card-heat .heat-top svg { width: 13px; height: 13px; flex-shrink: 0; align-self: center; }
.card-heat .heat-num {
  position: relative;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* 24h 安装增量角标（首页核心脚本卡，与脚本页同款） */
.card-heat .heat-delta, .sd-heat-num .heat-delta {
  position: absolute; top: -11px; left: calc(100% + 5px);
  padding: 1px 6px; border-radius: 999px;
  font-family: var(--font-mono); font-style: normal;
  font-size: 10px; font-weight: 700; line-height: 1.2;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 14%, transparent);
  pointer-events: none;
}
@supports not (color: color-mix(in srgb, red 10%, blue)) {
  .card-heat .heat-delta, .sd-heat-num .heat-delta { background: rgba(74, 222, 128, .14); }
}
/* 油猴分段加号：琥珀色，和热度条第二段对应 */
.heat-plus { color: #f59e0b; font-weight: 700; }
.card-heat .heat-pct {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-primary);
}
/* 热度条改挂到卡片下边界线：通栏贴底，仅大卡片显示（mini 由 CSS 隐藏） */
.script-card > .heat-track.heat-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%; height: 2px;
  display: flex;
  overflow: hidden;
  background: var(--color-bg-muted);
  z-index: 3;
}
/* 首页 / 脚本页把卡片直接子元素统一设为 relative，这里把热度条覆盖回贴底定位 */
.home .script-card > .heat-track.heat-bottom,
.sp-catalog .script-card > .heat-track.heat-bottom { position: absolute; }
.script-card > .heat-track.heat-bottom .heat-fill {
  display: block;
  height: 100%;
  flex: none;
  border-radius: 0;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 0 6px var(--color-primary-soft);
  /* 进场：从左往右展开，渐变色带不被压缩（参考 PortWatch 的 clip-path 手法） */
  animation: heat-fill-in 1.05s cubic-bezier(.2, .85, .2, 1) both;
}
.script-card > .heat-track.heat-bottom .heat-fill.heat-fill-gf {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  box-shadow: 0 0 6px rgba(245, 158, 11, .3);
}
/* 影之刃零主色赤金与「油猴」黄撞色：首页热度条的脚本猫段固定冷色，两段才分得开 */
:root[data-skin="pbz"] .home .script-card > .heat-track.heat-bottom .heat-fill:not(.heat-fill-gf) {
  background: linear-gradient(90deg, #4fc3f7, #2f80c9);
  box-shadow: 0 0 6px rgba(79, 195, 247, .3);
}
@keyframes heat-fill-in {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
/* 尊重「减少动态效果」：动画立即完成，热度条直接显示最终状态 */
@media (prefers-reduced-motion: reduce) {
  .script-card > .heat-track.heat-bottom .heat-fill,
  .sd-heat-fill {
    animation: none !important;
    clip-path: none !important;
  }
}

/* 依赖库 */
.lib-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
/* ---- 依赖库轮播：无缝横向滚动，悬停暂停 ---- */
.lib-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.lib-track {
  --lib-shift: -50%;
  display: flex;
  width: max-content;
  will-change: transform;
  animation: libScroll 75s linear infinite;
}
.lib-marquee:hover .lib-track { animation-play-state: paused; }
.lib-group {
  display: flex;
  gap: 14px;
  padding-right: 14px;
}
@keyframes libScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(var(--lib-shift, -50%)); }
}
.lib-marquee .lib-card {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
}
.lib-marquee .lib-foot { margin-top: auto; }
@media (prefers-reduced-motion: reduce) {
  .lib-track { animation: none; }
}
.lib-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-border);
  background: var(--color-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: all .2s;
}
.lib-card:hover {
  border-style: solid;
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
}
.lib-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
  gap: 8px;
}
.lib-name-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.lib-ver {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-accent);
  flex-shrink: 0;
}
.lib-summary {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin: 0 0 10px;
}
.lib-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--color-text-muted);
}
.lib-foot a {
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lib-foot a:hover { text-decoration: underline; }

/* 作者 */
.author-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.author-card {
  display: flex;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: all .25s ease;
}
.author-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card-hover);
}
.author-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary);
  flex-shrink: 0;
  background: var(--gradient-accent);
}
.author-avatar-lg-fallback {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #06121f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid var(--color-primary);
}
.author-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 4px;
}
.author-role {
  font-size: 13px;
  color: var(--color-accent);
  margin: 0 0 8px;
}
.author-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0 0 12px;
}
.author-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
}
.author-link:hover { text-decoration: underline; }
/* 推荐脚本下方的作者展示：ID 标记 + 双主页链接 */
.author-id {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  color: var(--color-text-muted); margin-left: 4px; white-space: nowrap;
}
.author-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 2px; }
.author-links .author-link span[aria-hidden] { opacity: .75; }

/* ============================================================
 * 详情弹窗
 * ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 8, 18, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  animation: fadeIn .2s ease;
}
.modal {
  width: 100%;
  max-width: 820px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slideUp .25s ease;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 30px 30px 24px;
  background: var(--gradient-hero);
  border-bottom: 1px solid var(--color-border);
  position: relative;
}
.modal-head .script-icon {
  width: 56px;
  height: 56px;
  font-size: 28px;
  border-radius: 16px;
  /* 图标加柔光与描边，从渐变头部里立起来 */
  border-color: rgba(255, 255, 255, .38);
  box-shadow: 0 8px 24px rgba(8, 20, 40, .28), 0 0 0 4px rgba(255, 255, 255, .06);
}
.modal-title {
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -.3px;
  margin: 1px 0 9px;
  padding-right: 30px; /* 给右上角关闭按钮留位，避免长标题被 × 压住 */
  color: var(--color-text);
  font-weight: 800;
}
/* 头部元信息行：加大分隔点间距、标签对齐更稳 */
.modal-head .script-meta { gap: 9px; }
.modal-body { padding: 24px 28px 30px; }
/* 简介：左侧主色强调条 + 淡底卡片，和下面的功能列表拉开层次 */
.modal-summary {
  position: relative;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin: 0 0 28px;
  padding: 14px 18px 14px 20px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
}
.modal-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: .2px;
}
.modal-section-title svg { flex-shrink: 0; }
.feature-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 9px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--color-text-secondary);
}
/* JS 已插入绿色对勾图标，去掉旧的 ▹ 三角，避免每条特性出现双重符号 */
.feature-list li::before {
  display: none;
}
/* 更新历史：改为左侧时间线，节点带柔光，比一排大卡片更紧凑精致 */
.changelog {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 0 0 8px 6px;
  padding-left: 20px;
}
.changelog::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--color-primary), var(--color-accent-soft));
}
.changelog-item {
  position: relative;
  padding: 10px 14px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
}
.changelog-item::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 16px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-bg-elevated), 0 0 0 5px var(--color-primary-soft);
}
.changelog-ver {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.changelog-version {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-green);
  background: rgba(74, 222, 128, .12);
  padding: 1px 9px;
  border-radius: 999px;
}
.changelog-date {
  font-size: 12px;
  color: var(--color-text-muted);
}
.changelog-notes {
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin: 0;
}
/* 更新历史「展开全部 / 收起」按钮 */
.changelog-more {
  display: block;
  margin: 14px 0 0 6px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.changelog-more:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}
/* 折叠时隐藏多余历史条目 */
.changelog-item.hidden { display: none; }

/* ---- 依赖组件（弹窗内紧凑 chips，一行多个自动换行） ---- */
.dep-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
}
.dep-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
a.dep-chip:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px var(--color-primary-soft);
}
.dep-name { color: var(--color-text); }
.dep-ver {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-green);
  background: rgba(74, 222, 128, .12);
  padding: 1px 7px;
  border-radius: 999px;
}
.dep-opt {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border-strong);
  padding: 1px 7px;
  border-radius: 999px;
}
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-size: 16px;
  display: grid;
  place-items: center;
  transition: all .2s;
  cursor: pointer;
}
.modal-close:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 回到顶部 */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--color-primary);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all .25s;
  cursor: pointer;
  z-index: 80;
}
.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow-primary);
}

/* ============================================================
 * 主页：脚本卡片（向后兼容）
 * ============================================================ */
.hero-search { padding: 64px 0 56px; text-align: left; }
.search-box {
  display: flex;
  gap: 10px;
  max-width: 580px;
  margin: 22px 0 0;
}
.search-box input {
  flex: 1;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 15px;
  background: var(--color-bg-card);
  backdrop-filter: var(--glass-blur);
  color: var(--color-text);
}
.search-box .btn { border-radius: var(--radius-md); }

.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.sort-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13.5px;
}
.sort-bar a {
  color: var(--color-text-muted);
  font-weight: 600;
  padding: 4px 2px;
}
.sort-bar a.on { color: var(--color-primary); border-bottom: 2px solid var(--color-primary); }
.sort-bar a:hover { color: var(--color-primary); }
.search-hint {
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}
.acard {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--color-text);
  transition: all .2s ease;
}
.acard:hover {
  transform: translateY(-3px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card-hover);
  color: var(--color-text);
}
.acard-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 85%, black), var(--color-primary-dark));
  display: grid;
  place-items: center;
}
.acard-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acard-cover .ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 46px; opacity: .9;
}
.acard-dl {
  position: absolute; right: 10px; top: 10px; background: rgba(16,24,40,.72); color: #fff;
  font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; backdrop-filter: blur(4px);
}
.acard-cover-chip {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 24, 40, .55);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .12);
  white-space: nowrap;
  max-width: calc(100% - 90px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.acard-body { padding: 14px 16px 13px; flex: 1; display: flex; flex-direction: column; }
.acard-title {
  font-size: 15.5px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.acard-excerpt {
  color: var(--color-text-muted);
  font-size: 13px;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.acard-meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  font-size: 12.5px;
  color: var(--color-text-muted);
  min-height: 28px;
}
.acard-meta-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.acard-author-name {
  font-weight: 600;
  color: var(--color-text);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acard-time {
  color: var(--color-text-muted);
  white-space: nowrap;
  font-size: 11.5px;
}
.acard-board-chip {
  background: var(--color-bg-muted);
  color: var(--color-text-secondary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.acard-stats {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}
.acard-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-text-muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.acard-stat svg { width: 13px; height: 13px; opacity: .85; }
.cat-chip {
  background: var(--color-bg-muted);
  color: var(--color-text-secondary);
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.thread-tags { margin-top: 10px; }
.thread-cover img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  border: 1px solid var(--color-border);
}
.dl-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(120deg, var(--color-primary-soft), color-mix(in srgb, var(--color-primary) 4%, var(--color-bg-card)));
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ============================================================
 * 版块 / 论坛
 * ============================================================ */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.board-card {
  display: flex;
  gap: 14px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  color: var(--color-text);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  transition: all .15s;
}
.board-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card-hover);
  color: var(--color-text);
}
.board-icon {
  width: 44px; height: 44px; border-radius: 11px; font-size: 24px; flex-shrink: 0;
  background: var(--color-primary-soft);
  display: flex; align-items: center; justify-content: center;
}
.board-icon.lg { width: 52px; height: 52px; font-size: 27px; }
.board-icon.sm { width: 32px; height: 32px; font-size: 17px; border-radius: 8px; }
.board-body h3 { font-size: 16px; margin-bottom: 2px; }
.board-body p { color: var(--color-text-muted); font-size: 13px; margin-bottom: 6px; }
.board-meta { font-size: 12px; color: var(--color-text-muted); }
.home-columns { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.col-side .card { margin-bottom: 18px; }

.hot-list { list-style: none; counter-reset: hot; }
.hot-list li {
  display: flex;
  flex-direction: column;
  padding: 7px 0;
  border-bottom: 1px dashed var(--color-border);
  counter-increment: hot;
}
.hot-list li:last-child { border-bottom: none; }
.hot-list li::before {
  content: counter(hot);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  margin-right: 6px;
}
.hot-list li a { color: var(--color-text); font-weight: 500; }
.hot-list li span { color: var(--color-text-muted); font-size: 12px; padding-left: 18px; }

.thread-list { list-style: none; }
.thread-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--color-border);
}
.thread-item:last-child { border-bottom: none; }
.thread-main { flex: 1; min-width: 0; }
.thread-title {
  color: var(--color-text);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thread-title:hover { color: var(--color-primary); }
.thread-meta {
  font-size: 12.5px;
  color: var(--color-text-muted);
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.thread-meta a { color: var(--color-text-muted); }
.thread-meta a:hover { color: var(--color-primary); }
.thread-count { color: var(--color-text-muted); font-size: 13px; flex-shrink: 0; }

/* ============================================================
 * 徽章
 * ============================================================ */
.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-right: 4px;
}
.badge-pin { background: rgba(250, 204, 21, .15); color: var(--color-yellow); }
.badge-lock { background: var(--color-bg-muted); color: var(--color-text-muted); }
.badge-op { background: var(--color-primary-soft); color: var(--color-primary); }
.badge-admin { background: var(--color-accent-soft); color: var(--color-accent); font-size: 11px; }
.badge-ok { background: rgba(74, 222, 128, .15); color: var(--color-green); }
.badge-type { background: rgba(102, 192, 244, .12); color: var(--color-primary); }
.badge-optional { background: var(--color-bg-muted); color: var(--color-text-muted); }

/* 账号设置：登录方式两栏（Steam 主方式 / 站内密码可选） */
.login-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.login-method {
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg-muted);
}
.login-method + .login-method { margin-top: 0; }
.lm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--color-text); }
.lm-head svg { flex: none; opacity: .8; }
@media (max-width: 720px) {
  .login-methods { grid-template-columns: 1fr; }
}

/* 账号设置页：左侧身份栏 + 菜单，右侧内容区 */.account-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 40px;
}
.account-side {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  position: sticky;
  top: 84px;
  backdrop-filter: var(--glass-blur);
}
.acc-identity {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 6px 14px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 10px;
}
.acc-id-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.acc-id-name { color: var(--color-text); font-size: 16px; word-break: break-all; }
.acc-id-steam { display: flex; flex-direction: column; gap: 1px; }
.acc-id-steam code {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.acc-id-links { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.acc-id-links a { color: var(--color-primary); }
/* 右侧表单不要拉满整行，资料类表单限宽 */
.account-main form { max-width: 560px; }
.acc-nav { display: flex; flex-direction: column; gap: 2px; }
.acc-nav a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--color-text-secondary);
  font-size: 14px;
  transition: background .15s, color .15s;
}
.acc-nav a:hover {
  background: var(--color-bg-muted);
  color: var(--color-text);
}
.account-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.account-main .card { margin: 0; }
img.avatar { object-fit: cover; }
@media (max-width: 900px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-side { position: static; }
  .acc-nav { flex-direction: row; flex-wrap: wrap; }
}

/* ============================================================
 * 论坛版块行
 * ============================================================ */
.board-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}
.board-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
}
.board-info { flex: 1; min-width: 0; }
.board-info h2 a { color: var(--color-text); font-size: 17px; }
.board-info h2 a:hover { color: var(--color-primary); }
.board-stats { display: flex; gap: 20px; text-align: center; }
.board-stats b { display: block; font-size: 17px; color: var(--color-primary); }
.board-stats span { font-size: 12px; color: var(--color-text-muted); }
.board-last {
  width: 240px;
  flex-shrink: 0;
  border-left: 1px solid var(--color-border);
  padding-left: 18px;
}
.pager {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 22px 0;
  flex-wrap: wrap;
}
.pager-item {
  padding: 6px 13px;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  background: var(--color-bg-card);
  color: var(--color-text);
  font-size: 14px;
}
.pager-item.current {
  background: var(--gradient-brand);
  color: #06121f;
  border-color: transparent;
}

/* ============================================================
 * 帖子详情
 * ============================================================ */
.thread-h1 { display: block; margin-bottom: 6px; }
.post {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 12px;
}
.post-side {
  width: 110px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.post-author {
  font-weight: 600;
  color: var(--color-text);
  font-size: 14px;
  text-align: center;
  word-break: break-all;
}
.post-body { flex: 1; min-width: 0; }
.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.floor { margin-left: auto; color: var(--color-text-muted); font-size: 12.5px; }
.post-content {
  word-break: break-word;
  color: var(--color-text);
}
.post-content code {
  background: var(--color-bg-muted);
  color: var(--color-primary);
}
.admin-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg-card);
  border: 1px dashed var(--color-border-strong);
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}
.admin-bar form { display: inline; }

/* ============================================================
 * 反馈
 * ============================================================ */
.fb-list { list-style: none; }
.fb-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.fb-item:last-child { border-bottom: none; }
.fb-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.fb-status {
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
}
.st-pending { background: rgba(250, 204, 21, .15); color: var(--color-warning); }
.st-processing { background: rgba(102, 192, 244, .15); color: var(--color-primary); }
.st-resolved { background: rgba(74, 222, 128, .15); color: var(--color-green); }
.fb-reply {
  background: var(--color-bg-card);
  border-left: 3px solid var(--color-primary);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 8px 0;
}
.fb-reply-tag { font-size: 12px; color: var(--color-primary); font-weight: 700; }
.fb-reply p { font-size: 14px; margin-top: 2px; }
.fb-intro { list-style: none; margin-top: 18px; }
.fb-intro li { padding: 6px 0; color: var(--color-text-muted); }
.fb-admin-item { margin-bottom: 14px; }
.fb-content {
  color: var(--color-text);
  margin: 8px 0;
  word-break: break-word;
}
.fb-admin-actions {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
  margin-top: 10px;
}
.fb-status-btns {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.fb-reply-form {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.fb-reply-form textarea { flex: 1; }

/* ============================================================
 * 个人页
 * ============================================================ */
.profile-head {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
.profile-info h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

/* ============================================================
 * 认证页
 * ============================================================ */
.auth-card { margin: 40px 0; }
.auth-card h1 { margin-bottom: 4px; }
.auth-card form { margin-top: 18px; }
.auth-alt {
  text-align: center;
  margin-top: 16px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* ============================================================
 * 表格（后台）
 * ============================================================ */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--color-bg-muted);
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border);
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  color: var(--color-text);
}
.table tr:last-child td { border-bottom: none; }
.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.table-actions form { display: inline; }

/* ============================================================
 * 后台布局
 * ============================================================ */
.admin-wrap {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 22px;
  margin-top: 24px;
  align-items: start;
}
.admin-side {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  position: sticky;
  top: 84px;
  backdrop-filter: var(--glass-blur);
}
.admin-side-title {
  font-weight: 700;
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 8px;
  color: var(--color-text);
}
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--color-text-secondary);
  font-size: 14px;
  transition: all .15s;
}
.admin-nav a:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.admin-nav a.active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 600;
}
.admin-side-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  padding-left: 10px;
}
.admin-side-foot a {
  color: var(--color-text-muted);
  font-size: 13px;
}
.admin-content { min-width: 0; }
.admin-content h1 { margin-bottom: 8px; }
.admin-content > p { margin-bottom: 16px; }
.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.admin-content .card.pad { margin-bottom: 14px; }
.board-form { display: flex; gap: 10px; flex-wrap: wrap; }
.board-form input[name="icon"] { width: 64px; text-align: center; }
.board-form input[name="name"] { width: 180px; }
.board-form input[name="desc"] { flex: 1; min-width: 160px; }
.board-form input[name="sort"] { width: 76px; }
.board-edit-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tab {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  transition: all .15s;
}
.tab.active {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #06121f;
}
.tab:hover:not(.active) {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* 设置页 */
.settings-form { padding-bottom: 40px; }
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.checks { display: flex; gap: 20px; flex-wrap: wrap; }
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  color: var(--color-text);
}
.check input { width: auto; accent-color: var(--color-primary); }
.swatches { display: flex; gap: 10px; }
.swatch { cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 0; }
.swatch span {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: all .15s;
}
.swatch input:checked + span {
  border-color: var(--color-text);
  transform: scale(1.1);
}

/* ============================================================
 * 安装向导
 * ============================================================ */
.install-body {
  background: linear-gradient(160deg, var(--color-bg-muted), var(--color-bg));
  min-height: 100vh;
  padding: 40px 16px;
}
.install-shell { max-width: 620px; margin: 0 auto; }
.install-head { text-align: center; margin-bottom: 26px; }
.install-logo {
  font-size: 40px;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--gradient-accent);
  box-shadow: var(--shadow-glow-primary);
}
.install-head h1 {
  font-size: 26px;
  margin-top: 14px;
  color: var(--color-text);
}
.install-steps {
  display: flex;
  list-style: none;
  background: var(--color-bg-card);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  justify-content: space-between;
  border: 1px solid var(--color-border);
  backdrop-filter: var(--glass-blur);
}
.install-steps li {
  font-size: 13px;
  color: var(--color-text-muted);
  position: relative;
  padding-left: 20px;
}
.install-steps li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--color-bg-muted);
  border: 2px solid var(--color-border-strong);
}
.install-steps li.current {
  color: var(--color-text);
  font-weight: 700;
}
.install-steps li.current::before {
  background: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-soft);
  border-color: transparent;
}
.install-steps li.done { color: var(--color-success); }
.install-steps li.done::before {
  background: var(--color-success);
  border-color: transparent;
}
.install-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 28px 30px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}
.install-card h2 { margin-bottom: 10px; color: var(--color-text); }
.install-card p { margin-bottom: 12px; }
.install-card form { margin-top: 16px; }
.install-info { list-style: none; margin: 14px 0 18px; }
.install-info li { padding: 5px 0; font-size: 14px; }
.check-list {
  list-style: none;
  margin: 14px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.check-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  align-items: center;
}
.check-item.ok {
  background: rgba(74, 222, 128, .06);
  border-color: rgba(74, 222, 128, .35);
}
.check-item.fail {
  background: rgba(239, 68, 68, .06);
  border-color: rgba(239, 68, 68, .35);
}
.check-icon { font-size: 20px; }
.install-done { text-align: center; }
.done-icon { font-size: 46px; margin-bottom: 8px; }
.done-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}
.install-foot { text-align: center; margin-top: 18px; }

/* ============================================================
 * 错误页
 * ============================================================ */
.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}
.error-card {
  text-align: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  padding: 44px 52px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  max-width: 480px;
}
.error-code { font-size: 44px; margin-bottom: 10px; }
.error-card .btn { margin-top: 18px; }

/* ============================================================
 * 页脚
 * ============================================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 32px 0 36px;
  margin-top: 20px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 18px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.9;
}
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--color-primary); }
.footer-inner a:hover { text-decoration: underline; }
.footer-heart {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-error);
}
.footer-icp {
  margin: 4px 0 0;
}
.footer-police {
  margin: 4px 0 0;
}
.footer-police a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 1;
}
.footer-police-icon {
  width: auto;
  height: 15px;
  display: inline-block;
  vertical-align: middle;
}

/* ============================================================
 * 响应式
 * ============================================================ */
@media (max-width: 1024px) {
  .script-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .lib-grid { grid-template-columns: repeat(2, 1fr); }
  .manager-banner { grid-template-columns: 1fr; padding: 28px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 20px; }
}
@media (max-width: 860px) {
  .home-columns, .admin-two-col, .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .admin-wrap { grid-template-columns: 1fr; }
  .admin-side { position: static; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .board-last { display: none; }
  .board-stats { display: none; }
  .author-grid { grid-template-columns: 1fr; }
  .header-inner { gap: 12px; }
  .avatar-name { display: none; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 56px 0 44px; }
}
@media (max-width: 640px) {
  .script-grid, .steps-grid, .lib-grid { grid-template-columns: 1fr; }
  /* 大卡片底栏：作者列按昵称内容自适应，热度列吃掉剩余空间，避免窄屏把昵称截断 */
  .script-card-foot { grid-template-columns: auto minmax(0, 1fr) auto; }
  .card-heat { width: auto; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 28px; }
  .main-nav { min-width: 0; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { padding: 6px 5px; font-size: 12.5px; white-space: nowrap; }
  .main-nav .nav-divider { margin: 0 2px; }
  /* 顶栏收纳：品牌只留 logo，防止 375px 下把 body 撑出横向滚动 */
  .brand-name { display: none; }
  .header-inner { gap: 10px; }
  .header-user { gap: 6px; }
  .post { flex-direction: column; }
  .post-side { flex-direction: row; width: 100%; }
  .stats-row { flex-wrap: wrap; }
  .stat { min-width: calc(50% - 7px); }
  .section-block { padding: 48px 0; }
  .container { padding: 0 16px; }
  /* 回到顶部按钮 fixed 悬浮在右下角，留出空间避免遮挡末尾备案号行 */
  .site-footer { padding-bottom: 84px; }
  .modal-head { padding: 22px; }
  .modal-body { padding: 20px 22px 28px; }
}
@media (max-width: 480px) {
  .hero-actions .btn { flex: 1; min-width: 0; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 18px; }
  .script-card { padding: 18px; }
}
@media (max-width: 380px) {
  /* 极窄屏：底栏收紧，给热度数字右上角的 24h 角标留出空间，避免压到安装按钮 */
  .script-card-foot { gap: 6px; }
  .card-install { padding: 4px 6px; font-size: 10.5px; }
}
/* ============================================================
 * 个人数据中心（/data）
 * ============================================================ */
.data-headline { display: flex; gap: 14px; align-items: center; }
.dh-emoji { font-size: 34px; line-height: 1; }
.data-headline b { font-size: 17px; color: var(--color-text); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.kpi {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi-label { font-size: 12.5px; color: var(--color-text-muted); }
.kpi b { font-size: 22px; color: var(--color-text); line-height: 1.2; }
.kpi b i { font-style: normal; font-size: 12px; color: var(--color-text-muted); margin-left: 3px; font-weight: 600; }
.kpi .muted { font-size: 11.5px; }

.data-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.data-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.data-col .card { margin: 0; }
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .data-cols { grid-template-columns: 1fr; }
}

.game-list { list-style: none; margin: 0; }
.game-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.game-row:last-child { border-bottom: none; }
.game-capsule {
  width: 92px;
  height: 43px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
  background: var(--color-bg-muted);
}
.game-capsule.sm { width: 62px; height: 29px; }
.game-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.game-info b { color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-hours { flex-shrink: 0; font-weight: 700; color: var(--color-primary); font-size: 15px; text-align: right; }
.game-hours i { font-style: normal; font-size: 11px; color: var(--color-text-muted); font-weight: 600; margin-left: 2px; }

.bar-chart { display: flex; flex-direction: column; gap: 7px; }
.bar-line { display: flex; align-items: center; gap: 10px; }
.bar-label { flex: none; width: 62px; font-size: 12px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.bar-track { flex: 1; height: 12px; background: var(--color-bg-muted); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light, var(--color-primary))); border-radius: 999px; }
.bar-value { flex: none; width: 44px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--color-text-secondary);
}
.chip b { color: var(--color-primary); margin-left: 3px; }

.data-big { font-size: 28px; font-weight: 800; color: var(--color-text); margin: 6px 0; }

.lib-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lib-table-card { padding: 0; overflow-x: auto; }
.lib-table { min-width: 760px; }
.lib-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.lib-name { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.lib-name > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lib-name { text-align: left; }
.lib-toolbar select { width: auto; }

/* ============================================================
 * Home v2 — 首页重设计（科技感 / 简洁化）
 * 全部样式收敛在 .home 作用域内，不影响 /scripts 等共用组件页面
 * ============================================================ */
.home .sec { margin-top: 76px; }
.home .container { max-width: 1180px; }

/* ---- Hero（居中版）---- */
.home .hh {
  position: relative;
  /* 图片层需向下延伸进「旗舰」区块做长渐隐，不能裁切 */
  overflow: visible;
  padding: 72px 0 56px;
}
/* Hero 自身渐变背景抽到独立层，与照片一起做底部渐隐，消除与内容区的硬边 */
.hh-base {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    var(--hero-center),
    var(--hero-vignette),
    radial-gradient(ellipse 62% 55% at 16% 4%, var(--color-primary-soft), transparent 62%),
    radial-gradient(ellipse 52% 48% at 84% 0%, var(--color-accent-soft), transparent 60%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 74%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 74%, transparent 100%);
}
/* 背景层（轮播 / 单张）：铺满 Hero，位于网格/辉光之下，内容之上 */
.hh-slides {
  position: absolute; inset: 0 0 -280px 0; z-index: 0;
  pointer-events: none;
  /* 图片保持全幅：顶部短渐显（不被 header 生硬切割），
     底部长距离渐隐一直延伸到「不止脚本，还有两件旗舰」标题上方才淡完，无分界线。
     顶部渐显收窄到 6%：之前 9% 在照片上方留出约 70px 的淡带，观感像蒙了层白纱 */
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 6%, #000 56%, transparent 82%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 6%, #000 56%, transparent 82%);
}
.hh-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: 0; transition: opacity .9s ease;
}
.hh-slide.on { opacity: 1; }
.hh-slide-veil {
  position: absolute; inset: 0;
  /* 必须盖在轮播图之上：JS 会给每张 .hh-slide 递增 z-index（1、2、3…），
     遮罩若不定层级会被图片压到下面，等于没有压暗 */
  z-index: 9000;
  pointer-events: none;
  /* 主题可覆盖（--skin-veil）：只做整体压暗，读到「够用」为止。
     真正需要对比度的文字/logo 交给下面 .hh-inner 的局部垫底，
     整幅压太重会把照片压成一层灰膜，看着就是「糊」 */
  background: var(--skin-veil, linear-gradient(180deg, rgba(10, 16, 24, .42), rgba(10, 16, 24, .56)));
}
:root[data-theme='light'] .hh-slide-veil {
  /* 浅色下也压暗到中性灰：hero 是照片，白字/金字的对比优先于「整页纯白」 */
  background: linear-gradient(180deg, rgba(18, 15, 12, .16), rgba(18, 15, 12, .28));
}
/* 内容区局部垫底：只在 logo + 标题这一带加深，照片四周保持通透清晰。
   以前是整幅加一层厚遮罩，边缘也被压灰，观感就是「蒙了一层」 */
.home .hh:has(.hh-slides) .hh-inner::before {
  content: "";
  position: absolute;
  inset: -48px -12%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(ellipse 44% 54% at 50% 50%,
    rgba(10, 9, 8, .40) 0%,
    rgba(10, 9, 8, .26) 42%,
    rgba(10, 9, 8, .10) 68%,
    transparent 80%);
}
/* 浅色下照片中心容易偏亮，局部垫底稍弱一点，避免中间出现一块「黑晕」 */
:root[data-theme='light'] .home .hh:has(.hh-slides) .hh-inner::before {
  background: radial-gradient(ellipse 46% 56% at 50% 50%,
    rgba(12, 10, 8, .50) 0%,
    rgba(12, 10, 8, .34) 40%,
    rgba(12, 10, 8, .16) 64%,
    rgba(12, 10, 8, .05) 78%,
    transparent 88%);
}
/* 浅色 + 照片：中心的白色光晕原本是给纯渐变 hero 做纵深用的，
   照片态的顶部/底部渐隐区会把它露出来，像蒙了一层白雾，这里直接去掉 */
:root[data-theme='light'] .home .hh:has(.hh-slides) .hh-base {
  background:
    var(--hero-vignette),
    radial-gradient(ellipse 62% 55% at 16% 4%, var(--color-primary-soft), transparent 62%),
    radial-gradient(ellipse 52% 48% at 84% 0%, var(--color-accent-soft), transparent 60%);
}
/* 浅色主题：hero 照片偏深，ghost 按钮垫白底保证可读（脚本/工具/扩展/插件） */
:root[data-theme='light'] .home .hh .hh-actions .btn-ghost {
  background: rgba(255, 255, 255, .84);
  border-color: rgba(255, 255, 255, .95);
  color: #1b2734;
  box-shadow: 0 2px 12px rgba(10, 20, 35, .18);
}
:root[data-theme='light'] .home .hh .hh-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, .95);
  border-color: var(--color-primary);
  color: var(--color-primary);
}
/* 深色主题：hero 照片偏亮蓝，ghost 按钮与数据条垫深底保证可读 */
:root:not([data-theme='light']) .home .hh .hh-actions .btn-ghost {
  background: rgba(10, 17, 28, .58);
  border-color: rgba(150, 190, 228, .42);
  color: #eaf3fc;
  box-shadow: 0 2px 14px rgba(4, 10, 20, .45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
:root:not([data-theme='light']) .home .hh .hh-actions .btn-ghost:hover {
  background: rgba(16, 28, 44, .8);
  border-color: var(--color-primary);
  color: var(--color-primary);
}
:root:not([data-theme='light']) .home .hh .hh-stats {
  background: rgba(12, 19, 30, .7);
  border-color: rgba(150, 190, 228, .3);
  box-shadow: 0 8px 28px -10px rgba(4, 10, 20, .6);
}
:root:not([data-theme='light']) .home .hh .hh-stat span { color: #b9c9da; }

/* 内容区动态背景：Hero 之下缓慢流动的淡蓝光晕，与 Hero 呼应、消除割裂 */
.home { position: relative; isolation: isolate; overflow-x: clip; }
.home-ambient ~ * { position: relative; z-index: 1; }
.home-ambient {
  position: absolute; top: 0; left: 0; right: 0;
  height: 1500px; z-index: 0; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 34%, #000 46%, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 34%, #000 46%, #000 72%, transparent 100%);
}
.home-ambient::before,
.home-ambient::after {
  content: ""; position: absolute; border-radius: 50%;
  background: var(--ambient-blob);
  will-change: transform;
}
.home-ambient::before {
  width: 760px; height: 680px; top: 560px; left: -160px;
  animation: ambient-drift-a 26s ease-in-out infinite alternate;
}
.home-ambient::after {
  width: 860px; height: 720px; top: 860px; right: -240px;
  animation: ambient-drift-b 34s ease-in-out infinite alternate;
}
:root { --ambient-blob: radial-gradient(circle, rgba(102, 192, 244, .2) 0%, rgba(102, 192, 244, .07) 46%, transparent 70%); }
:root:not([data-theme='light']) { --ambient-blob: radial-gradient(circle, rgba(102, 160, 210, .28) 0%, rgba(102, 160, 210, .1) 48%, transparent 72%); }
@keyframes ambient-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(180px, 70px, 0) scale(1.15); }
}
@keyframes ambient-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-200px, -60px, 0) scale(1); }
}
/* ---- 动效层：极光旋涡带 + Hero 底缘扫描光线 ----
   全部 transform 动画（GPU 合成），作用域在 home-ambient 内，z-index 0 不遮挡内容 */
:root { --amb-ribbon-grad: conic-gradient(from 130deg at 50% 50%,
  transparent 0deg,
  rgba(102, 192, 244, .17) 55deg,
  rgba(93, 140, 220, .11) 125deg,
  transparent 195deg,
  rgba(102, 192, 244, .13) 285deg,
  transparent 360deg); }
:root:not([data-theme='light']) { --amb-ribbon-grad: conic-gradient(from 130deg at 50% 50%,
  transparent 0deg,
  rgba(96, 158, 214, .24) 55deg,
  rgba(70, 110, 190, .15) 125deg,
  transparent 195deg,
  rgba(96, 158, 214, .18) 285deg,
  transparent 360deg); }
.amb-ribbon {
  position: absolute;
  width: 920px; height: 520px;
  border-radius: 50%;
  background: var(--amb-ribbon-grad);
  filter: blur(48px);
  animation: amb-ribbon-spin 46s linear infinite;
  will-change: transform;
}
.amb-ribbon-a { top: 600px; left: -180px; }
.amb-ribbon-b {
  top: 880px; right: -240px; left: auto;
  width: 780px; height: 460px;
  animation-duration: 60s;
  animation-direction: reverse;
}
@keyframes amb-ribbon-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* 扫描光线（已按需求删除：hero 下方左右移动的光条） */
@media (prefers-reduced-motion: reduce) {
  .home-ambient::before, .home-ambient::after { animation: none; }
  .amb-ribbon { display: none; }
}
/* 浅色主题：背景透出后，给深色副标题加白色描边保证可读 */
:root[data-theme='light'] .home .hh .hh-sub {
  color: #202634;
  font-weight: 500;
  text-shadow: 0 1px 1px #fff, 0 0 8px rgba(255, 255, 255, 1), 0 0 16px rgba(255, 255, 255, .95);
  /* 照片上叠白雾仍偏杂乱，加白色半透明垫底让文字更清楚 */
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
/* 深色主题：灰色字直接叠在照片上几乎读不出，加深色半透明垫底 + 亮白字（同按钮/数据条处理） */
:root:not([data-theme='light']) .home .hh .hh-sub {
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  background: rgba(10, 17, 28, .62);
  border: 1px solid rgba(150, 190, 228, .22);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: #eaf3fc;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
}
/* 渐变字（transparent fill）不能加阴影，否则透明区被填白糊成一团；保持原色 */
:root[data-theme='light'] .home .hh .grad,
:root[data-theme='light'] .home .hh-stat b {
  text-shadow: none;
  filter: none;
}
/* 浅色主题统计卡：半透明适当透出背景图；数字改实色深字，避免渐变透明字在亮背景上发虚 */
:root[data-theme='light'] .home .hh .hh-stats {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(30, 70, 110, 0.18);
  box-shadow: 0 8px 28px -10px rgba(20, 40, 70, 0.35);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
:root[data-theme='light'] .home .hh-stat b {
  background: none; -webkit-text-fill-color: #1b5e8f; color: #1b5e8f;
}
/* 有背景图时：照片在最底，网格/辉光叠在照片上（减淡），内容保持最上层。
   网格从 .35 降到 .2：44px 的细线铺在照片上会多一层「纱窗」质感，压住细节 */
.home .hh:has(.hh-slides)::before { z-index: 1; opacity: .2; }
.home .hh:has(.hh-slides) .hh-glow { z-index: 1; }
.home .hh:has(.hh-slides) .hh-glow::before,
.home .hh:has(.hh-slides) .hh-glow::after { opacity: .12; }
.home .hh:has(.hh-slides) .hh-inner { z-index: 2; }
.home .hh::before {
  /* 科技网格：渐隐遮罩只让顶部隐约可见 */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--color-border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border-subtle) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 72% 85% at 50% 0%, #000 28%, transparent 76%);
  mask-image: radial-gradient(ellipse 72% 85% at 50% 0%, #000 28%, transparent 76%);
  pointer-events: none;
}
.home .hh::after {
  /* 顶部一道主题色光线 */
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent 6%, var(--color-primary) 50%, transparent 94%);
  opacity: .45;
}
.home .hh-glow {
  /* 双色辉光球：缓慢漂浮，增强纵深 */
  position: absolute; inset: 0;
  pointer-events: none;
}
.home .hh-glow::before,
.home .hh-glow::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
}
.home .hh-glow::before {
  width: 420px; height: 420px;
  left: 50%; margin-left: -320px; top: -200px;
  background: var(--color-primary);
}
.home .hh-glow::after {
  width: 380px; height: 380px;
  left: 50%; margin-left: -60px; top: -170px;
  background: #66c0f4;
}
:root:not([data-theme='light']) .home .hh-glow::before,
:root:not([data-theme='light']) .home .hh-glow::after { opacity: .28; }
@media (prefers-reduced-motion: no-preference) {
  .home .hh::before { animation: hh-grid 3.6s linear infinite; }
  @keyframes hh-grid { to { background-position: 44px 44px; } }
  .home .hh-glow::before { animation: hh-float 11s ease-in-out infinite alternate; }
  .home .hh-glow::after { animation: hh-float 13s ease-in-out infinite alternate-reverse; }
  @keyframes hh-float { from { transform: translateY(0); } to { transform: translateY(60px); } }
  .home .hh-inner > * { animation: hh-in .5s ease both; }
  .home .hh-inner > *:nth-child(2) { animation-delay: .05s; }
  .home .hh-inner > *:nth-child(3) { animation-delay: .1s; }
  .home .hh-inner > *:nth-child(4) { animation-delay: .15s; }
  .home .hh-inner > *:nth-child(5) { animation-delay: .2s; }
  @keyframes hh-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  .home .hh-logo-halo { animation: hh-halo-breathe 4.8s ease-in-out infinite; }
  @keyframes hh-halo-breathe {
    0%, 100% { opacity: .68; transform: translate(-50%, -50%) scale(.92); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  }
}
.home .hh-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.home .hh-logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
}
.home .hh-logo-halo {
  /* 背光晕：径向渐变托住 logo */
  content: "";
  position: absolute;
  left: 50%; top: 52%;
  width: 360px; height: 300px;
  transform: translate(-50%, -50%);
  background: var(--logo-halo);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}
.home .hh-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 240px; height: auto;
  /* 沿 PNG 透明轮廓发光：近处实光 + 远处柔光 + 底部投影 */
  filter:
    drop-shadow(0 0 8px var(--logo-glow))
    drop-shadow(0 0 26px var(--logo-glow-far))
    drop-shadow(0 12px 30px rgba(0, 0, 0, .28));
}
.home .hh-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  max-width: 100%;
  padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 24px -8px var(--color-primary);
  font-family: var(--font-mono); font-size: 12px; color: var(--color-text-secondary);
  white-space: normal; line-height: 1.6;
}
/* hero 眉标：置于 hero 内容最顶部（logo 上方），与 logo 留出间距 */
.home .hh-kicker { margin: 0 0 16px; }
.home .hh-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .18);
  animation: hh-pulse 2.2s ease-in-out infinite;
}
@keyframes hh-pulse { 50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, .06); } }
.home .hh h1 {
  margin-top: 0;
  font-size: clamp(38px, 5vw, 58px); line-height: 1.12; letter-spacing: -.02em; font-weight: 800;
}
.home .hh .grad {
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
/* hero 主标题流光动画（参考 SteamKit 扩展站）：多色渐变流动 + 光晕呼吸 + 高光折射扫过 */
.home .hh .grad.hh-title-flow {
  position: relative;
  display: inline-block;
  background: var(--skin-title-flow);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: var(--skin-title-glow);
  animation: hh-title-flow 7s ease-in-out infinite, hh-title-glow 4s ease-in-out infinite;
  will-change: filter, background-position;
}
/* 高光折射层：复制一份文字，一道白/青/紫光带周期扫过字身 */
.home .hh .grad.hh-title-flow::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  background: var(--skin-title-sheen);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: hh-title-refract 5.5s linear infinite;
  pointer-events: none;
}
@keyframes hh-title-flow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes hh-title-glow {
  0%, 100% { filter: var(--skin-title-glow); }
  50% { filter: var(--skin-title-glow-strong); }
}
@keyframes hh-title-refract { 0% { background-position: 180% 0; } 100% { background-position: -80% 0; } }
@media (prefers-reduced-motion: reduce) {
  .home .hh .grad.hh-title-flow, .home .hh .grad.hh-title-flow::after { animation: none; }
}
.home .hh-sub {
  margin: 18px auto 0; max-width: 640px;
  font-size: 16px; line-height: 1.7; color: var(--color-text-secondary);
}
.home .hh-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
/* hero 主 CTA：跟随站点主题色渐变（Steam 蓝），与 hero 蓝色品牌视觉一致；
   全局 .btn-primary 的 Steam 绿留给各页「安装」类操作按钮 */
.home .hh-actions .btn-primary {
  background: linear-gradient(180deg, var(--color-primary-light), var(--color-primary-dark));
  border-color: var(--color-primary-dark);
  box-shadow: 0 6px 18px -6px var(--color-primary);
}
.home .hh-actions .btn-primary:hover {
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary-dark));
  filter: brightness(1.08);
  box-shadow: 0 8px 22px -6px var(--color-primary);
}
.home .hh-stats {
  display: flex; width: 100%; margin: 32px auto 0; max-width: 680px; /* 4 项后收窄，避免整行拉伸过长 */
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgba(42, 60, 80, 0.38);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}
.home .hh-stat {
  flex: 1 1 0; min-width: 0;
  padding: 16px 14px;
  border-left: 1px solid var(--color-border-subtle);
  text-align: center;
  position: relative;
}
/* 右上角今日增量角标（累计安装 / 访问量） */
.home .stat-delta {
  position: absolute; top: 7px; right: 8px; z-index: 1;
  padding: 1px 7px; border-radius: 999px;
  font-family: var(--font-mono); font-style: normal; font-size: 10.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 14%, transparent);
}
@supports not (color: color-mix(in srgb, red 10%, blue)) {
  .home .stat-delta { background: rgba(74, 222, 128, .14); }
}
.home .hh-stat:first-child { border-left: 0; }
.home .hh-stat b {
  display: block;
  font-family: var(--font-mono); font-size: 24px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.home .hh-stat span { display: block; margin-top: 3px; font-size: 12px; color: var(--color-text-muted); white-space: nowrap; }

/* ---- 公告条 ---- */
.home .hh-announce {
  display: flex; align-items: center; gap: 12px;
  margin-top: 28px; padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  font-size: 13px; color: var(--color-text-secondary);
}
.home .hh-announce-tag {
  flex: none;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--color-primary); letter-spacing: .12em;
}

/* ---- 区块头（统一 kicker / 标题 / 右侧链接）---- */
.home .sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 30px;
}
.home .kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--color-primary);
}
.home .kicker::before { content: ""; width: 20px; height: 1px; background: var(--color-primary); opacity: .7; }
.home .sec-title { margin-top: 8px; font-size: 27px; font-weight: 750; letter-spacing: -.01em; }
/* 核心脚本标题：左侧记忆之花装饰图，与文字垂直居中对齐 */
.home .memory-flower-title, .home .swordman-title, .home .authors-title { display: flex; align-items: center; gap: 12px; }
.home .memory-flower, .home .swordman {
  width: 52px; height: 52px; object-fit: contain; flex: none;
  filter: drop-shadow(0 0 14px rgba(var(--skin-primary-rgb), .5));
}
.home .swordman { filter: drop-shadow(0 0 10px rgba(255, 255, 255, .35)); }
:root[data-theme='light'] .home .memory-flower { filter: drop-shadow(0 2px 8px rgba(37, 120, 200, .28)); }
/* 官方图是白色剪影，浅色主题下需染成深色才可见 */
:root[data-theme='light'] .home .swordman {
  filter: brightness(0) saturate(100%) invert(18%) sepia(70%) saturate(2200%) hue-rotate(190deg) brightness(88%);
}
/* 凡人修仙传的鼎与绿瓶本身是彩色素材，亮色下不能被染成白色剪影 */
:root[data-theme='light'][data-skin="fanren"] .home .swordman,
:root[data-theme='light'][data-skin="fanren"] .home .memory-flower {
  filter: drop-shadow(0 2px 8px rgba(79, 191, 168, .28));
}
/* 作者区标题配图：与脚本区图标同高，整张显示不裁切（原图为透明人物图） */
.home .authors-title-icon {
  height: 52px; width: auto; max-width: 132px;
  object-fit: contain; flex: none;
  filter: drop-shadow(0 0 12px rgba(var(--skin-primary-rgb), .38));
}
:root[data-theme='light'] .home .authors-title-icon {
  filter: drop-shadow(0 2px 8px rgba(var(--skin-primary-rgb), .28));
}
.home .sec-em { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.home .sec-of { font-size: .62em; font-weight: 600; color: var(--color-text-muted); }
.home .sec-desc { margin-top: 6px; max-width: 660px; font-size: 14px; color: var(--color-text-muted); }
.home .sec-stats-inline { color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.home .more-link {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 13px; color: var(--color-primary);
  transition: border-color .15s, background .15s;
}
.home .more-link:hover { border-color: var(--color-border-strong); background: var(--color-primary-soft); }

/* ---- 核心脚本卡片（作用域内收紧）---- */
.home .script-grid { gap: 18px; }
.home .script-card {
  position: relative;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.home .script-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card-hover);
}
.home .script-summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .home .script-card:hover .script-name { color: var(--color-primary); }
}
.home .script-name { transition: color .15s ease; }

/* ---- 快速开始（脚本猫 + 步骤合并两栏）---- */
.home .qs {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 1.45fr;
  gap: 18px;
}
.home .qs-manager {
  display: flex; flex-direction: column;
  padding: 26px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.home .qs-brand { display: flex; align-items: center; gap: 12px; }
.home .qs-logo {
  width: 44px; height: 44px; flex: 0 0 auto;
  object-fit: contain; border-radius: 11px;
  background: rgba(27, 150, 224, .12);
  padding: 4px;
}
.home .qs-manager h3 { margin-top: 0; font-size: 19px; }
.home .qs-en { font-size: 12px; font-weight: 500; color: var(--color-text-muted); font-family: var(--font-mono); }
.home .qs-ver {
  display: inline-block; vertical-align: 2px; margin-left: 6px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums; text-decoration: none;
  padding: 3px 9px; border-radius: 999px;
  color: var(--pc-accent, var(--color-primary));
  background: var(--pc-tint, var(--color-primary-soft));
  transition: filter .15s;
}
.home .qs-ver:hover { filter: brightness(1.08); text-decoration: none; }
.home .qs-tagline { margin-top: 10px; font-size: 13px; color: var(--color-text-muted); }
.home .qs-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.home .qs-points { margin: 16px 0 0; padding: 0; list-style: none; }
.home .qs-points li {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: 13px; color: var(--color-text-secondary);
}
.home .qs-points li::before {
  content: "";
  position: absolute; left: 2px; top: 13px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--color-primary);
}
.home .qs-steps {
  margin: 0; padding: 6px 26px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  list-style: none;
}
.home .qs-step {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--color-border-subtle);
}
.home .qs-step:last-child { border-bottom: 0; }
.home .qs-num {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  border: 1px solid var(--color-border);
  background: var(--color-primary-soft);
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: var(--color-primary);
}
.home .qs-title { font-size: 14.5px; font-weight: 650; }
.home .qs-desc { margin-top: 3px; font-size: 12.5px; color: var(--color-text-muted); }
.home .qs-tip { color: var(--color-text-muted); opacity: .85; }

/* ---- 依赖库 / 作者（作用域内收紧）---- */
.home .lib-grid { gap: 14px; }
.home .lib-card {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.home .lib-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}
.home .author-grid { gap: 18px; }

/* ---- 响应式 ---- */
@media (max-width: 960px) {
  .home .hh { padding: 64px 0 48px; }
  .home .hh h1 { font-size: 34px; }
  .home .hh-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 移动端 2×2 */
    overflow: hidden;
    /* hh-inner 是 align-items:center 的 flex 列，须显式撑满再负 margin 突破容器内边距 */
    width: 100%;
    margin-left: -12px;
    margin-right: -12px;
  }
  .home .hh-stat {
    flex: none; min-width: 0;
    padding: 14px 10px;
    border-left: 1px solid var(--color-border-subtle);
    border-top: 1px solid var(--color-border-subtle);
  }
  .home .hh-stat:nth-child(-n+2) { border-top: 0; }
  .home .hh-stat:nth-child(2n+1) { border-left: 0; }
  .home .hh-stat b { font-size: 23px; }
  .home .hh-stat span { font-size: 12px; }
  .home .qs { grid-template-columns: 1fr; }
  .home .sec { margin-top: 56px; }
  .home .sec-title { font-size: 23px; }
}
@media (max-width: 600px) {
  .home .hh h1 { font-size: 28px; }
  .home .hh-badge { font-size: 11px; padding: 5px 12px; }
  /* 四个入口按钮：上2下2 网格 */
  .home .hh-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 340px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  /* 数据条：负 margin 再拉宽一点，卡片不显窄 */
  .home .hh-stats { margin-left: -16px; margin-right: -16px; }
  .home .hh-stat { padding: 13px 8px; }
  .home .hh-stat b { font-size: 21px; }
  .home .hh-stat span { font-size: 11.5px; letter-spacing: -0.2px; }
  .home .hh-logo { width: 184px; }
  .home .hh-logo-wrap { margin-bottom: 20px; }
  .home .hh-logo-halo { width: 260px; height: 220px; }
}

/* ═══ Home v2.2 旗舰产品双卡 ═══
   取色自 hub.leansoftx.com 官方主页：
   - GameVault：--accent #ff5566 → #ff9b3d 渐变（红橙）
   - SteamKit ：#93d8fb → #4fb0e8 → #3a5fd6 渐变（蓝）
   形态：两卡向内倾斜成梯形（共享灭点），左右向外发光；整卡 <a> 直达产品主页 */
.home .prod-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  perspective: 1600px; /* 共享灭点：两卡朝中间「通道」倾斜 */
}
/* 凡人修仙传风雷翅：铺在两卡背后，长剑（z-index:3）从双翼中间穿过，位置与剑都不动 */
.home .prod-wings {
  position: absolute;
  left: 50%; top: 50%;
  width: min(760px, 68%); height: auto;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 20px var(--skin-sword-glow, rgba(220, 30, 50, .35)));
}
/* 凡人主题旗舰卡适度透明，让背后的双翼透出；其他主题保持原背景 */
:root[data-skin="fanren"]:not([data-theme='light']) .home .prod-grid .prod-card {
  --color-bg-card: rgba(38, 52, 46, .72);
}
:root[data-skin="fanren"][data-theme='light'] .home .prod-grid .prod-card {
  --color-bg-card: rgba(255, 255, 255, .70);
}
/* 《影之刃零》黑伤：竖插在两卡中间，剑尖朝下，pointer-events 不挡卡片点击 */
.home .prod-sword {
  position: absolute;
  left: 50%; top: 50%;
  width: 270px; height: auto;
  transform: translate(-50%, -50%) rotate(-90deg);
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 6px 18px var(--skin-sword-glow, rgba(220, 30, 50, .45)));
}
/* 窄屏单列时隐藏，避免剑横穿卡片正文（恢复原有断点） */
@media (max-width: 860px) {
  .home .prod-sword { display: none; }
  .home .prod-wings { display: none; }
}
.home .prod-card {
  /* 主题色变量：默认 = SteamKit 蓝 */
  --pc-accent: #4fb0e8;
  --pc-accent2: #3a5fd6;
  --pc-glow: rgba(79, 176, 232, .30);      /* 外发光 */
  --pc-tint: rgba(79, 176, 232, .07);      /* 卡面染色 */
  --pc-chip: rgba(79, 176, 232, .35);      /* 虚线芯片描边 */
  --pc-border: rgba(79, 176, 232, .22);    /* 边框染色 */
  --pc-tilt: -9deg;                        /* 右卡：内侧（左缘）向后倒 */
  position: relative;
  display: flex; flex-direction: column;
  padding: 26px 28px;
  border: 1px solid var(--pc-border);
  border-radius: var(--radius-lg);
  color: inherit; text-decoration: none;
  background:
    linear-gradient(155deg, var(--pc-tint), transparent 46%),
    var(--color-bg-card);
  overflow: hidden;
  cursor: pointer;
  transform: rotateY(var(--pc-tilt));
  transition: transform .35s cubic-bezier(.22, .68, .32, 1), border-color .25s ease, box-shadow .35s ease;
}
/* GameVault：取官网 hero 主色（红橙渐变），左卡向左发光 */
.home .prod-grid .prod-gv {
  --pc-accent: #ff5566;
  --pc-accent2: #ff9b3d;
  --pc-glow: rgba(255, 85, 102, .30);
  --pc-tint: rgba(255, 85, 102, .07);
  --pc-chip: rgba(255, 85, 102, .32);
  --pc-border: rgba(255, 85, 102, .20);
  --pc-tilt: 9deg; /* 左卡：内侧（右缘）向后倒 → 梯形 */
  box-shadow: -22px 10px 46px -16px var(--pc-glow), 0 6px 18px rgba(2, 6, 12, .16);
}
.home .prod-grid .prod-sk {
  box-shadow: 22px 10px 46px -16px var(--pc-glow), 0 6px 18px rgba(2, 6, 12, .16);
}
:root[data-theme='light'] .home .prod-grid .prod-gv {
  --pc-glow: rgba(255, 85, 102, .20);
  --pc-tint: rgba(255, 85, 102, .06);
  --pc-chip: rgba(255, 85, 102, .45);
  --pc-border: rgba(255, 85, 102, .30);
}
:root[data-theme='light'] .home .prod-grid .prod-sk {
  --pc-glow: rgba(79, 176, 232, .22);
  --pc-tint: rgba(79, 176, 232, .06);
  --pc-chip: rgba(59, 95, 214, .45);
  --pc-border: rgba(59, 95, 214, .30);
}
/* 顶部主题色渐变光线（呼应官网 grad） */
.home .prod-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--pc-accent), var(--pc-accent2));
  opacity: .9;
  z-index: 2;
}
/* hover：略回正 + 抬升，发光增强（高特异性压过 home-card.css 的通用 hover 阴影） */
.home .prod-grid .prod-card:hover {
  border-color: var(--color-border-strong);
}
.home .prod-grid .prod-gv:hover {
  transform: rotateY(4deg) translateY(-4px);
  box-shadow: -30px 16px 60px -14px var(--pc-glow), 0 14px 38px rgba(2, 6, 12, .30);
}
.home .prod-grid .prod-sk:hover {
  transform: rotateY(-4deg) translateY(-4px);
  box-shadow: 30px 16px 60px -14px var(--pc-glow), 0 14px 38px rgba(2, 6, 12, .30);
}
.home .prod-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.home .prod-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.home .prod-logo {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.home .prod-logo svg { width: 100%; height: 100%; display: block; }
/* GameVault：复刻官网 hero 圆环——深色渐变圆底 + 白描边手柄 */
.home .prod-logo-gv {
  width: 46px; height: 46px;
  border-radius: 50%;
  padding: 10px;
  background: linear-gradient(160deg, #161a26, #0a0d14);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 85, 102, .18), 0 4px 14px rgba(0, 0, 0, .35);
}
/* SteamKit：官网 hero SVG 自带渐变圆角方块，直接铺满 */
.home .prod-logo-sk { background: transparent; box-shadow: none; }
.home .prod-tag {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .1em;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  background: var(--color-bg-elevated, rgba(127,127,127,.08));
}
.home .prod-card .prod-ver {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 4px 10px; border-radius: 999px;
  color: var(--pc-accent);
  background: var(--pc-tint);
}
.home .prod-title { font-size: 20px; font-weight: 750; letter-spacing: -.01em; }
.home .prod-sub { font-size: 15px; font-weight: 600; color: var(--color-text-secondary); }
.home .prod-desc {
  margin-top: 10px; font-size: 13.5px; line-height: 1.65;
  color: var(--color-text-secondary);
}
.home .prod-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 16px 0 0; padding: 0; list-style: none;
}
.home .prod-chips li {
  font-size: 12px; padding: 4px 11px; border-radius: 999px;
  border: 1px dashed var(--pc-chip);
  color: var(--color-text-muted);
}
/* 底部直达提示：hover 箭头外移 */
.home .prod-foot {
  margin-top: auto; padding-top: 18px;
  display: flex; align-items: center; gap: 8px;
  color: var(--pc-accent);
}
.home .prod-visit { font-size: 12.5px; font-weight: 650; letter-spacing: .05em; }
/* 旗舰卡片作者（Healer007）：头像 + 昵称，占位同 author-avatar-wrap 方案 */
.home .prod-author {
  display: inline-flex; align-items: center; gap: 7px;
  margin-right: auto;
  font-size: 12.5px; font-weight: 600;
  color: var(--color-text-secondary);
}
.prod-author-avatar {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #06121f;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  border: 1px solid var(--color-border);
}
.prod-author-avatar img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.home .prod-foot svg { transition: transform .22s ease; }
.home .prod-card:hover .prod-foot svg { transform: translateX(4px); }
@media (max-width: 960px) {
  .home .prod-grid { grid-template-columns: 1fr; gap: 16px; perspective: none; }
  .home .prod-card,
  .home .prod-grid .prod-card:hover { transform: none; }
  .home .prod-grid .prod-gv,
  .home .prod-grid .prod-sk,
  .home .prod-grid .prod-gv:hover,
  .home .prod-grid .prod-sk:hover {
    box-shadow: 0 10px 30px -12px var(--pc-glow), 0 6px 18px rgba(2, 6, 12, .14);
  }
}
@media (prefers-reduced-motion: reduce) {
  .home .prod-card,
  .home .prod-grid .prod-gv:hover,
  .home .prod-grid .prod-sk:hover { transform: none; transition: none; }
}

/* ===========================================================================
   注册 / 验证码（学习子比主题的注册流：图形验证码 + 邮箱验证码）
   =========================================================================== */
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row input { flex: 1 1 auto; min-width: 0; }
.captcha-img {
  flex: 0 0 auto;
  width: 130px; height: 44px;
  border: 1px solid var(--color-border); border-radius: 8px;
  cursor: pointer; display: block; background: #eef3f8;
}
.captcha-img[data-loading="1"] { opacity: 0.4; }
.captcha-img:hover { border-color: var(--color-primary); }

.code-row { display: flex; gap: 10px; align-items: stretch; }
.code-row input { flex: 1 1 auto; min-width: 0; }
.code-row .btn { flex: 0 0 auto; white-space: nowrap; }

@media (max-width: 480px) {
  .captcha-img { width: 110px; height: 40px; }
}

/* ===========================================================================
   登录弹窗 v3 + 下划线输入框（学习子比主题 sign 窗口设计）
   双栏：左品牌插画区 + 右表单；下划线浮动标签；渐变按钮；圆形社交图标
   =========================================================================== */
.modal.login-modal {
  width: 730px;
  max-width: calc(100vw - 40px);
  border-radius: 18px;
  position: relative;
  animation: modalPop .3s cubic-bezier(.34, 1.4, .64, 1);
  transition: width .45s ease;
}
.modal.login-modal.is-signup { width: 470px; }

/* ---- 3D 翻转卡片（正面登录 / 背面注册） ---- */
.lm-flip {
  position: relative;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.45, .05, .35, 1), height .45s ease;
}
.lm-face {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.lm-face-front { display: grid; grid-template-columns: 300px 1fr; }
.lm-face-back { transform: rotateY(180deg); }
.lm-flip.flipped { transform: rotateY(180deg); }

/* Steam 官网图标（favicon 提取 256px PNG：深蓝圆底 + 白色 logo），直接使用 */
@keyframes modalPop {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-modal-overlay { align-items: center; padding: 20px; }
.login-modal .modal-close {
  top: 12px; right: 12px; z-index: 3;
  width: 32px; height: 32px; font-size: 15px;
}

/* ---- 左侧品牌插画区 ---- */
.lm-side {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 26px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(160deg, rgba(27, 40, 56, .55) 0%, rgba(8, 14, 26, .92) 100%),
    radial-gradient(ellipse 120% 90% at 20% 10%, #2b4a68 0%, transparent 60%),
    #16212f;
}
.lm-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .4;
  pointer-events: none;
}
.lm-glow-a {
  width: 230px; height: 230px;
  background: var(--color-primary);
  top: -50px; right: -50px;
  animation: lmFloat 11s ease-in-out infinite;
}
.lm-glow-b {
  width: 190px; height: 190px;
  background: var(--color-accent);
  bottom: -50px; left: -60px;
  animation: lmFloat 13s ease-in-out infinite reverse;
}
@keyframes lmFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-16px, 14px); }
}
@media (prefers-reduced-motion: reduce) {
  .lm-glow-a, .lm-glow-b { animation: none; }
}
.lm-brand { position: relative; z-index: 1; }
.lm-badge {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 18px;
  display: grid; place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.lm-site {
  display: block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
}
.lm-brand p {
  margin: 10px 0 18px;
  font-size: 12.5px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .72);
}
.lm-points {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lm-points span {
  font-size: 11.5px;
  padding: 4px 11px;
  border-radius: 99px;
  color: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .07);
}

/* ---- 右侧表单区 ---- */
.lm-main { padding: 36px 36px 28px; background: var(--color-bg-elevated); }
.lm-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}
.lm-title {
  margin: 0;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 1px;
}
.lm-switch {
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.lm-switch:hover { color: var(--color-primary); }
.lm-switch i { font-style: normal; margin-left: 3px; font-size: 15px; }

/* ---- 下划线输入框（子比 line-form 风格：浮动标签 + 聚焦展开线） ---- */
.lm-field { position: relative; margin: 0 0 24px; }
.lm-field input {
  height: auto;
  width: 100%;
  background: transparent !important;
  border: none;
  border-bottom: 1px solid var(--color-border-strong);
  border-radius: 0;
  padding: 12px 30px 8px 2px;
  font-size: 14.5px;
  color: var(--color-text);
  outline: none;
  transition: border-color .2s ease;
}
.lm-field input:hover { border-bottom-color: var(--color-text-muted); }
.lm-ph {
  position: absolute;
  left: 2px; top: 12px;
  font-size: 14px;
  color: var(--color-text-muted);
  opacity: .6;
  transform-origin: left top;
  transition: transform .18s ease, color .18s ease, opacity .18s ease;
  pointer-events: none;
  user-select: none;
  cursor: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 34px);
}
.lm-field input:focus ~ .lm-ph,
.lm-field input:not(:placeholder-shown) ~ .lm-ph {
  transform: translateY(-15px) scale(.76);
  opacity: 1;
}
.lm-field input:focus ~ .lm-ph { color: var(--color-primary); }
.lm-line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
  pointer-events: none;
}
.lm-field input:focus ~ .lm-line { transform: scaleX(1); }
.lm-eye {
  position: absolute;
  right: 0; top: 7px;
  width: 30px; height: 30px;
  border: none;
  background: none;
  padding: 0;
  display: grid; place-items: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color .15s ease;
}
.lm-eye:hover, .lm-eye.is-on { color: var(--color-primary); }

/* ---- 渐变提交按钮 ---- */
.lm-submit {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 6px;
  border: none;
  border-radius: 10px;
  background: var(--gradient-brand);
  color: #06121f !important;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 6px;
  text-indent: 6px;
  cursor: pointer;
  box-shadow: 0 6px 16px var(--color-primary-soft);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.lm-submit:hover {
  color: #06121f !important;
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: var(--shadow-glow-primary);
}
.lm-submit:disabled { opacity: .65; transform: none; box-shadow: none; cursor: wait; filter: none; }

/* ---- 社交登录（圆形图标，子比 social_loginbar 风格） ---- */
.social-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  color: var(--color-text-muted);
  font-size: 12px;
}
.social-separator::before,
.social-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.lm-social { display: flex; justify-content: center; gap: 14px; }
.lm-social-item {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff !important;
  border: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.lm-social-item.steam {
  background: #1b2838;
  box-shadow: 0 3px 10px rgba(27, 40, 56, .35);
}
.lm-social-item.steam:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 16px rgba(27, 40, 56, .45);
}
.lm-tip {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
  opacity: .85;
}

/* ---- 注册页（复用下划线输入） ---- */
.auth-card .lm-title { font-size: 24px; }
.code-row, .captcha-row { margin-bottom: 8px; align-items: flex-start; }
.code-row .lm-field,
.captcha-row .lm-field { margin-bottom: 0; flex: 1 1 auto; min-width: 0; }
.code-row .btn { margin-top: 4px; }
.captcha-img { margin-top: 4px; }
.login-modal .alert { font-size: 13px; padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; }

/* ---- 移动端 ---- */
@media (max-width: 760px) {
  .modal.login-modal { max-width: 420px; }
  .modal.login-modal.is-signup { max-width: 420px; }
  .lm-face-front { grid-template-columns: 1fr; }
  .lm-side { display: none; }
  .lm-main { padding: 28px 24px 24px; }
  .lm-head-row { margin-bottom: 20px; }
}
@media (max-width: 480px) {
  .lm-main { padding: 24px 18px 20px; }
  .lm-title { font-size: 23px; }
}

/* ============================================================
 * Steam 客户端风收尾：压平圆角 + 去毛玻璃
 * 放在末尾统一覆盖；胶囊(999px)与圆形(50%/头像)保留
 * ============================================================ */

/* 1) 压平中等偏大的硬编码圆角 → 4px（不影响胶囊/圆形/已有≤6px） */
.btn,
.card, .panel, .surface,
.hh-stat, .hh-stats,
.prod-card, .script-card, .lib-card,
.badge, .chip, .tag,
input, textarea, select,
.modal, .alert,
.hero-badge, .manager-banner {
  border-radius: 4px;
}

/* 2) 卡片/玻璃背景改实色，避免去掉模糊后半透明透出底纹变脏 */
:root:not([data-theme='light']) {
  --color-bg-card: #1b2634;
  --color-bg-card-hover: #223043;
  --color-bg-glass: #1b2634;
  --glass-bg: #1b2634;
}
:root[data-theme='light'] {
  --color-bg-card: #ffffff;
  --color-bg-card-hover: #f7f9fc;
  --color-bg-glass: #ffffff;
  --glass-bg: #ffffff;
}
/* 兜底：关闭全站毛玻璃（工具页独立 CSS / loading 遮罩除外） */
*:not(.gift-app *):not(.pbz-app *):not(.loading) {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 主题切换瞬间：禁用全部过渡，避免旧/新两套颜色混排闪烁 */
html.theme-switching,
html.theme-switching * {
  transition: none !important;
}

/* 主题切换：直接切换，不使用 View Transitions 整页转场
 * （部分移动端 WebView 会卡住转场快照，导致转场后整页点击无响应） */
