/* ============================================================
 * 馒头手游 · 全局样式
 * 风格：深色电竞杂志风（tech-dark / cinematic arcade editorial）
 * 所有颜色、字号、圆角、阴影均来自下方 token，页面不得自行发明样式
 * ============================================================ */

:root {
  /* ---- 颜色 ---- */
  --ink-950: #06080F;
  --ink-900: #0A0E17;
  --ink-850: #0E1421;
  --ink-800: #131B2B;
  --ink-750: #182338;
  --line: #22304A;
  --line-soft: #182135;

  --text: #EEF3FB;
  --text-sub: #94A3BE;
  --text-mute: #5F6E8A;

  --brand: #FF5C35;
  --brand-hi: #FF8A5B;
  --brand-press: #E14A26;
  --brand-soft: rgba(255, 92, 53, .13);

  --accent: #35D0FF;
  --accent-soft: rgba(53, 208, 255, .12);

  --success: #3DDC97;
  --warning: #FFB020;
  --danger: #FF4D6D;

  /* ---- 字体 ---- */
  --font-sans: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Source Han Sans SC",
               "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Code", Consolas, monospace;

  /* ---- 尺寸 ---- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  --sh-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --sh-md: 0 10px 30px -12px rgba(0, 0, 0, .75);
  --sh-lg: 0 30px 70px -28px rgba(0, 0, 0, .85);

  --page-max: 1280px;
  --header-h: 64px;
  --sidebar-w: 236px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------------- 基础重置 ---------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html {
  /* 移动端横竖屏切换时不要自动放大字号 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* 锚点跳转时给吸顶导航留出高度，标题不会被盖住 */
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 16px);
  /* 去掉手机点击时那层灰色蒙版，改用 :active 反馈（见文末「触摸反馈」） */
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-sans);
  background: var(--ink-950);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 移动端菜单展开时锁住背景滚动 */
body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--brand); color: #1a0d07; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-950); }
::-webkit-scrollbar-thumb { background: var(--ink-750); border-radius: 999px; border: 2px solid var(--ink-950); }
::-webkit-scrollbar-thumb:hover { background: var(--line); }

/* ---------------- 背景氛围层 ---------------- */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 620px at 12% -6%, rgba(255, 92, 53, .17), transparent 62%),
    radial-gradient(760px 560px at 92% 2%, rgba(53, 208, 255, .11), transparent 60%),
    radial-gradient(900px 700px at 50% 108%, rgba(255, 92, 53, .07), transparent 65%),
    var(--ink-950);
}
.bg-fx::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 76%);
  mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 76%);
}
.bg-fx::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ---------------- 通用工具类 ---------------- */
.icon { display: inline-block; vertical-align: middle; flex: none; }

.mono { font-family: var(--font-mono); }

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand);
}

.muted { color: var(--text-sub); }
.dim { color: var(--text-mute); }

.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 24px; }

/* 首屏交错上浮 */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  animation: revealUp .62s var(--ease) forwards;
}
@keyframes revealUp {
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { animation: none; opacity: 1; transform: none; }
}

/* ============================================================
 * 1. 顶部导航（客户端外壳 · shell.js 注入内容）
 * ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  /* 刘海屏：把状态栏高度让出来，非刘海设备 env() 为 0 */
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(6, 8, 15, .8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 11px;
  overflow: hidden;
  flex: none;
  box-shadow: 0 6px 18px -6px rgba(255, 195, 60, .55);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-text { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand-text small {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-top: -3px;
}

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  transition: color .18s, background .18s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav a.is-active { color: var(--text); background: var(--brand-soft); }
.nav a.is-active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-hi));
}

.header-search { margin-left: auto; width: 260px; }
.search { position: relative; }
.search input {
  width: 100%;
  height: 38px;
  padding: 0 40px 0 38px;
  border-radius: var(--r-pill);
  background: var(--ink-800);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.search input::placeholder { color: var(--text-mute); }
.search input:focus {
  border-color: var(--brand);
  background: var(--ink-850);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.search .search-icon {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
  pointer-events: none;
}
.search kbd {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mute);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  background: var(--ink-900);
}

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-sub);
  transition: .18s;
}
.icon-btn:hover { color: var(--text); border-color: var(--text-mute); background: rgba(255, 255, 255, .04); }

.nav-toggle { display: none; }

.mobile-menu {
  position: fixed;
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  z-index: 59;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  /* 横屏 / 小屏时菜单可能高于可视区，允许内部滚动 */
  max-height: calc(100vh - var(--header-h) - env(safe-area-inset-top, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(6, 8, 15, .97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.mobile-menu.is-open { display: flex; }
/* 手机端导航里补一个搜索框（大屏用的是顶栏那个） */
.mobile-search { margin: 2px 2px 8px; }
.mobile-search .search input { height: 44px; font-size: 16px; }
.mobile-menu a {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  color: var(--text-sub);
  transition: .18s;
}
.mobile-menu a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.mobile-menu a.is-active { background: var(--brand-soft); color: var(--brand-hi); font-weight: 600; }
/* 窄屏打开过菜单后又拉宽窗口时，别让菜单残留 */
@media (min-width: 1025px) {
  .mobile-menu { display: none !important; }
}

/* ============================================================
 * 2. 按钮 / 表单 / 标签
 * ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s, transform .12s, box-shadow .18s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-hi));
  color: #1a0d07;
  box-shadow: 0 10px 26px -12px rgba(255, 92, 53, .95);
}
.btn-primary:hover { filter: brightness(1.07); }

.btn-ghost {
  background: rgba(255, 255, 255, .03);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--text-mute); background: rgba(255, 255, 255, .07); }

.btn-quiet { background: transparent; color: var(--text-sub); }
.btn-quiet:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

.btn-accent { background: var(--accent); color: #04222c; }
.btn-accent:hover { filter: brightness(1.08); }

.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { height: 50px; padding: 0 28px; font-size: 15px; border-radius: var(--r-md); }
.btn-block { width: 100%; }

.btn:disabled, .btn.is-disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.is-loading { pointer-events: none; opacity: .8; }
.spinner {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, .25);
  border-top-color: currentColor;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 输入控件 */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-sub); }
.field .req { color: var(--brand); margin-left: 2px; }

.input, .select, .textarea {
  width: 100%;
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.input, .select { height: 40px; padding: 0 12px; }
.textarea { padding: 10px 12px; min-height: 88px; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.input.is-error, .textarea.is-error { border-color: var(--danger); }
.select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3BE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}
.select option { background: var(--ink-800); }
.field-error {
  font-size: 11.5px;
  color: var(--danger);
  display: none;
}
.field.is-invalid .field-error { display: block; }

/* 多选标签组 */
.check-group { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-sub);
  font-size: 13px;
  transition: .18s;
}
.check-pill:hover { color: var(--text); border-color: var(--text-mute); }
.check-pill.is-on { background: var(--brand-soft); border-color: var(--brand); color: var(--text); }

/* 小标签 */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  background: rgba(255, 255, 255, .05);
  color: var(--text-sub);
  border: 1px solid transparent;
}
.tag-brand { background: var(--brand-soft); color: var(--brand-hi); }
.tag-accent { background: var(--accent-soft); color: var(--accent); }

/* 状态角标 */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 25px; padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 700;
  white-space: nowrap;
  flex: none;
  backdrop-filter: blur(6px);
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-success { background: rgba(61, 220, 151, .16); color: var(--success); }
.badge-warning { background: rgba(255, 176, 32, .16); color: var(--warning); }
.badge-accent { background: rgba(53, 208, 255, .16); color: var(--accent); }
.badge-neutral { background: rgba(255, 255, 255, .1); color: var(--text-sub); }

/* ============================================================
 * 3. 首页 Hero 轮播
 * ============================================================ */
.hero { max-width: var(--page-max); margin: 24px auto 0; padding: 0 24px; }
/* 首页语义主标题：视觉上是轮播上方的一行引导语，但对搜索引擎是页面主题 */
.hero-lead { margin: 0 0 14px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.hero-lead em { font-style: normal; font-weight: 500; color: var(--text-sub); }
.hero-track {
  position: relative;
  height: 404px;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--sh-md);
  background: var(--ink-900);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .7s var(--ease), transform 6s linear;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 8, 15, .96) 0%, rgba(6, 8, 15, .74) 40%, rgba(6, 8, 15, .18) 74%, rgba(6, 8, 15, .05) 100%);
}
.hero-slide.align-right::after {
  background: linear-gradient(270deg, rgba(6, 8, 15, .96) 0%, rgba(6, 8, 15, .74) 40%, rgba(6, 8, 15, .18) 74%, rgba(6, 8, 15, .05) 100%);
}
.hero-copy {
  position: absolute;
  z-index: 3;
  left: 56px;
  bottom: 58px;
  max-width: 520px;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s var(--ease) .15s, transform .6s var(--ease) .15s;
}
.hero-slide.is-active .hero-copy { opacity: 1; transform: none; }
.hero-slide.align-right .hero-copy { left: auto; right: 56px; text-align: right; }
.hero-slide.align-right .hero-copy .hero-actions { justify-content: flex-end; }
.hero-title { font-size: 46px; line-height: 1.1; margin: 12px 0 12px; }
.hero-title span { color: var(--brand); }
.hero-sub { font-size: 15px; color: var(--text-sub); max-width: 430px; }
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 24px; }

.hero-nav {
  position: absolute;
  z-index: 4;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-dots { display: flex; gap: 7px; margin-right: 4px; }
/* 视觉上是一条细线，但按钮本身有 34px 高，手指点得到 */
.hero-dot {
  width: 26px;
  height: 34px;
  border: none;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
}
.hero-dot::before {
  content: '';
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .25);
  transition: width .25s, background .25s;
}
.hero-dot.is-active::before { background: var(--brand); width: 40px; }
.hero-arrow {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(10, 14, 23, .6);
  backdrop-filter: blur(8px);
  color: var(--text);
  display: grid; place-items: center;
  transition: .18s;
}
.hero-arrow:hover { border-color: var(--brand); color: var(--brand-hi); }

/* 数据条 */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 20px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.stat-strip > div {
  background: var(--ink-900);
  padding: 18px 22px;
}
.stat-strip .v {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.stat-strip .v em { font-style: normal; font-size: 13px; color: var(--text-mute); margin-left: 2px; }
.stat-strip .k { font-size: 12.5px; color: var(--text-sub); margin-top: 2px; }

/* ============================================================
 * 4. 区块
 * ============================================================ */
.section { max-width: var(--page-max); margin: 0 auto; padding: 56px 24px 0; }
.section-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.section-title { font-size: 26px; margin-top: 6px; }
.section-sub { font-size: 13px; color: var(--text-sub); padding-bottom: 4px; }
.section-more {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-sub);
  padding-bottom: 4px;
  transition: color .18s, gap .18s;
}
.section-more:hover { color: var(--brand); gap: 10px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ============================================================
 * 5. 游戏卡片
 * ============================================================ */
.game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.game-card {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: var(--ink-800);
  border: 1px solid var(--line);
  transition: transform .26s var(--ease), border-color .26s, box-shadow .26s;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 92, 53, .5);
  box-shadow: var(--sh-md);
}
.game-cover { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--ink-850); }
.game-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.game-card:hover .game-cover img { transform: scale(1.05); }
.game-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 8, 15, .94) 0%, rgba(6, 8, 15, .42) 32%, transparent 60%);
}
.game-cover .badge { position: absolute; z-index: 2; top: 10px; left: 10px; }
.game-cover .new-flag {
  position: absolute; z-index: 2; top: 10px; right: 10px;
  height: 22px; padding: 0 8px;
  display: inline-flex; align-items: center;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #1a0d07;
  font-size: 11px; font-weight: 800;
  letter-spacing: .04em;
}
.game-cover .hover-play {
  position: absolute;
  z-index: 2;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(.86);
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 92, 53, .92);
  color: #1a0d07;
  opacity: 0;
  transition: opacity .25s, transform .25s var(--ease);
}
.game-card:hover .hover-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.game-body { padding: 12px 14px 14px; }
.game-title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.game-tagline {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
}
/* 每段各自不折行：宁可整段换行，也不要"★ / 9.1"这种被拦腰截断 */
.game-meta > span { white-space: nowrap; }
.game-meta .rated { color: var(--warning); font-weight: 700; }
.game-meta .plat { margin-left: auto; font-family: var(--font-sans); }

/* ---------------- 编辑推荐（横向卡） ---------------- */
.pick-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pick-card {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 18px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--ink-850);
  border: 1px solid var(--line-soft);
  transition: transform .24s var(--ease), border-color .24s, background .24s;
}
.pick-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 92, 53, .45);
  background: var(--ink-800);
}
.pick-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
}
.pick-cover img { width: 100%; height: 100%; object-fit: cover; }
.pick-body { display: flex; flex-direction: column; min-width: 0; }
.pick-body h3 { font-size: 19px; margin: 8px 0 6px; }
.pick-body .tl { font-size: 13px; color: var(--text-sub); line-height: 1.65; }
.pick-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.pick-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
}

/* ============================================================
 * 6. 榜单
 * ============================================================ */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item {
  display: grid;
  grid-template-columns: 40px 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 9px 16px 9px 10px;
  border-radius: 14px;
  background: var(--ink-850);
  border: 1px solid var(--line-soft);
  transition: .2s;
}
.rank-item:hover { background: var(--ink-800); border-color: var(--line); transform: translateX(3px); }
.rank-no {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--text-mute);
  text-align: center;
}
.rank-item:nth-child(1) .rank-no { color: #FFD24A; }
.rank-item:nth-child(2) .rank-no { color: #CBD5E1; }
.rank-item:nth-child(3) .rank-no { color: #E8956B; }
.rank-thumb {
  width: 56px; height: 56px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rank-main { min-width: 0; }
.rank-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 0; }
/* 名称过长时截断而不是换行，保证同一榜单里行高一致 */
.rank-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rank-desc {
  font-size: 12px; color: var(--text-sub); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-right { text-align: right; }
.rank-heat { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--accent); }
.rank-delta { font-family: var(--font-mono); font-size: 11px; margin-top: 3px; }
.rank-delta.up { color: var(--success); }
.rank-delta.down { color: var(--danger); }
.rank-delta.flat { color: var(--text-mute); }

/* ============================================================
 * 7. 筛选 / 分页
 * ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--ink-850);
  border: 1px solid var(--line-soft);
}
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.filter-label {
  font-size: 12px; color: var(--text-mute);
  min-width: 44px; font-family: var(--font-mono);
}
.chip {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-sub);
  font-size: 13px;
  transition: .18s;
}
.chip:hover { color: var(--text); border-color: var(--text-mute); }
.chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #1a0d07;
  font-weight: 600;
}
.filter-foot {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.result-count { font-size: 13px; color: var(--text-sub); white-space: nowrap; }
.result-count b { font-family: var(--font-mono); color: var(--brand); font-size: 15px; }
.filter-foot .select { width: auto; min-width: 148px; margin-left: auto; height: 36px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 36px; }
.page-btn {
  min-width: 36px; height: 36px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-size: 13px;
  display: grid; place-items: center;
  transition: .18s;
}
.page-btn:hover:not(:disabled) { color: var(--text); border-color: var(--text-mute); }
.page-btn.is-active { background: var(--brand); border-color: var(--brand); color: #1a0d07; font-weight: 700; }
.page-btn:disabled { opacity: .35; cursor: not-allowed; }
.page-ellipsis { color: var(--text-mute); padding: 0 4px; }

/* ============================================================
 * 8. 游戏详情页
 * ============================================================ */
.detail-hero {
  position: relative;
  height: 340px;
  margin-top: 24px;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
}
.detail-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--ink-950) 2%, rgba(6, 8, 15, .72) 45%, rgba(6, 8, 15, .25) 100%);
}
.detail-hero .back-link {
  position: absolute; z-index: 3; top: 20px; left: 20px;
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px 0 11px;
  border-radius: var(--r-pill);
  background: rgba(6, 8, 15, .62);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
  font-size: 13px;
  color: var(--text);
  transition: .18s;
}
.detail-hero .back-link:hover { border-color: var(--brand); color: var(--brand-hi); }

.detail-head {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 172px 1fr auto;
  gap: 26px;
  align-items: flex-end;
  margin-top: -110px;
  padding: 0 32px;
}
.detail-cover {
  width: 172px; aspect-ratio: 3 / 4;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { padding-bottom: 6px; }
.detail-title { font-size: 36px; margin: 10px 0 8px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.detail-stats { display: flex; flex-wrap: wrap; gap: 26px; }
.detail-stats .k { font-size: 12px; color: var(--text-mute); }
.detail-stats .v { font-family: var(--font-mono); font-size: 19px; font-weight: 700; margin-top: 2px; }
.detail-stats .v.rated { color: var(--warning); }
.detail-actions { padding-bottom: 8px; display: flex; flex-direction: column; gap: 10px; min-width: 190px; }

.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
.panel {
  border-radius: var(--r-lg);
  background: var(--ink-850);
  border: 1px solid var(--line-soft);
  padding: 22px;
}
.panel + .panel { margin-top: 20px; }
.panel-title { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.panel-title .icon { color: var(--brand); }

.prose { font-size: 14px; color: var(--text-sub); line-height: 1.9; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feature {
  display: flex; gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--ink-800);
  border: 1px solid var(--line-soft);
  transition: .2s;
}
.feature:hover { border-color: var(--line); background: var(--ink-750); }
.feature-ico {
  width: 36px; height: 36px;
  flex: none;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.feature h4 { font-size: 13.5px; font-weight: 700; }
.feature p { font-size: 12px; color: var(--text-sub); margin-top: 3px; line-height: 1.55; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 16px; }
.tab {
  position: relative;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 600;
  transition: color .18s;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); }
.tab.is-active::after {
  content: '';
  position: absolute; left: 16px; right: 16px; bottom: -1px;
  height: 2px; border-radius: 2px;
  background: var(--brand);
}

.shot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.shot-grid figure {
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  aspect-ratio: 16 / 10;
  cursor: zoom-in;
}
.shot-grid figure:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.shot-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.shot-grid figure:hover img { transform: scale(1.06); }

.side-list { display: flex; flex-direction: column; gap: 10px; }
.side-item {
  display: flex; gap: 12px; align-items: center;
  padding: 9px;
  border-radius: var(--r-md);
  background: var(--ink-800);
  border: 1px solid var(--line-soft);
  transition: .2s;
}
.side-item:hover { border-color: rgba(255, 92, 53, .45); transform: translateX(3px); }
.side-item .thumb { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; flex: none; }
.side-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-item .t { font-size: 13px; font-weight: 700; }
.side-item .d { font-size: 11.5px; color: var(--text-sub); margin-top: 2px; }

.kv { display: flex; flex-direction: column; gap: 0; }
.kv > div {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13px;
}
.kv > div:last-child { border-bottom: none; }
.kv .k { color: var(--text-mute); }
.kv .v { color: var(--text); font-weight: 600; }

/* ============================================================
 * 9. 页脚
 * ============================================================ */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, transparent, rgba(10, 14, 23, .9));
}
.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 44px 24px 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.footer-inner h4 { font-size: 13px; color: var(--text); margin-bottom: 14px; letter-spacing: .02em; }
.footer-inner li a { font-size: 13px; color: var(--text-sub); line-height: 2.1; transition: color .18s; }
.footer-inner li a:hover { color: var(--brand); }
.footer-about p { font-size: 13px; color: var(--text-sub); margin-top: 12px; max-width: 300px; line-height: 1.8; }
.footer-bottom {
  border-top: 1px solid var(--line-soft);
  /* 底部再让出一条安全区，全面屏手势条不会压住版权行 */
  padding: 18px 24px calc(18px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 12px;
  color: var(--text-mute);
}

/* ============================================================
 * 10. 后台（管理端外壳）
 * ============================================================ */
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--ink-900);
  border-right: 1px solid var(--line-soft);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* 横屏等矮视口下菜单会超出屏幕，允许内部滚动，别让底部菜单项够不到 */
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* 移动端侧边栏展开时的遮罩 */
.admin-scrim {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(3, 5, 10, .62);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s;
}
.admin-scrim.is-open { opacity: 1; pointer-events: auto; }
.admin-sidebar .brand { padding: 20px 20px 16px; }
.admin-menu { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.admin-menu a {
  display: flex; align-items: center; gap: 11px;
  height: 40px; padding: 0 12px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--text-sub);
  transition: .18s;
}
.admin-menu a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.admin-menu a.is-active { background: var(--brand-soft); color: var(--brand-hi); font-weight: 600; }
.admin-menu .menu-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 18px 12px 6px;
}
.admin-sidebar .side-foot { margin-top: auto; padding: 16px 20px 22px; border-top: 1px solid var(--line-soft); }
.admin-user { display: flex; align-items: center; gap: 10px; }
.admin-user .avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(140deg, var(--accent), #6EE7FF);
  color: #04222c;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
}
.admin-user .n { font-size: 13px; font-weight: 600; }
.admin-user .r { font-size: 11px; color: var(--text-mute); }

.admin-content { margin-left: var(--sidebar-w); min-height: 100vh; }
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  gap: 16px;
  padding: env(safe-area-inset-top, 0px) 28px 0;
  background: rgba(6, 8, 15, .82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.admin-topbar h1 { font-size: 17px; }
.admin-topbar .crumb { font-size: 12px; color: var(--text-mute); margin-left: 2px; }
.admin-topbar .spacer { margin-left: auto; }
.admin-main { padding: 28px; max-width: 1400px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--ink-800), var(--ink-850));
  border: 1px solid var(--line);
  transition: .22s;
}
.stat-card:hover { border-color: rgba(255, 92, 53, .4); transform: translateY(-2px); }
.stat-card .top { display: flex; align-items: center; justify-content: space-between; }
.stat-card .k { font-size: 12.5px; color: var(--text-sub); }
.stat-card .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.stat-card .v { font-family: var(--font-mono); font-size: 28px; font-weight: 700; margin: 12px 0 6px; letter-spacing: -.02em; }
.stat-card .v em { font-style: normal; font-size: 13px; color: var(--text-mute); margin-left: 3px; }
.stat-card .d { font-size: 12px; color: var(--text-mute); display: flex; align-items: center; gap: 5px; }
.stat-card .d b { color: var(--success); font-family: var(--font-mono); }

/* 发布排期时间轴 */
.timeline { display: flex; flex-direction: column; }
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 108px 22px 1fr;
  gap: 14px;
  padding-bottom: 20px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-date { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-sub); padding-top: 2px; }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before {
  content: '';
  position: absolute;
  top: 14px; bottom: -20px;
  width: 1px;
  background: var(--line);
}
.tl-item:last-child .tl-rail::before { display: none; }
.tl-dot {
  position: relative;
  z-index: 1;
  width: 11px; height: 11px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--ink-950);
  border: 2px solid var(--text-mute);
}
.tl-item.is-online .tl-dot { border-color: var(--success); background: var(--success); box-shadow: 0 0 0 4px rgba(61, 220, 151, .16); }
.tl-item.is-preorder .tl-dot { border-color: var(--warning); background: var(--warning); box-shadow: 0 0 0 4px rgba(255, 176, 32, .16); }
.tl-item.is-soon .tl-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px rgba(53, 208, 255, .16); }
.tl-body .t { font-size: 14px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tl-body .n { font-size: 12.5px; color: var(--text-sub); margin-top: 4px; }

/* 数据表格 */
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.table-toolbar .search { width: 240px; }
.table-toolbar .search input { height: 36px; }
.table-toolbar .select { width: auto; min-width: 128px; height: 36px; }
.table-toolbar .spacer { margin-left: auto; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.data-table thead th {
  text-align: left;
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
  background: var(--ink-900);
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  vertical-align: middle;
}
.data-table tbody tr { transition: background .16s; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .028); }
.data-table tbody tr:last-child td { border-bottom: none; }
.cell-game { display: flex; align-items: center; gap: 12px; }
.cell-game .thumb { width: 42px; height: 42px; border-radius: 9px; overflow: hidden; flex: none; border: 1px solid var(--line); }
.cell-game .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cell-game .t { font-weight: 600; font-size: 13.5px; }
.cell-game .s { font-size: 11.5px; color: var(--text-mute); margin-top: 1px; }
.cell-num { font-family: var(--font-mono); }
.row-actions { display: flex; align-items: center; gap: 4px; }
.act-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-mute);
  display: grid; place-items: center;
  transition: .16s;
}
.act-btn:hover { color: var(--text); background: rgba(255, 255, 255, .07); border-color: var(--line); }
.act-btn.danger:hover { color: var(--danger); border-color: rgba(255, 77, 109, .4); background: rgba(255, 77, 109, .1); }

/* 面板修饰 / 后台纵向堆叠 */
.panel-flush { padding: 0; overflow: hidden; }
.admin-stack { display: flex; flex-direction: column; gap: 20px; }
.section-head-mini { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; }
.section-head-mini h2 { font-size: 16px; }
.section-head-mini .spacer { margin-left: auto; }
.section-head-mini .hint { font-size: 12.5px; color: var(--text-mute); }

/* 封面选择器 */
.cover-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.cover-opt {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 0;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink-850);
  transition: .18s;
}
.cover-opt img { width: 100%; height: 100%; object-fit: cover; opacity: .6; transition: opacity .18s; }
.cover-opt:hover { border-color: var(--text-mute); }
.cover-opt:hover img { opacity: 1; }
.cover-opt.is-on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.cover-opt.is-on img { opacity: 1; }
.cover-opt.is-on::after {
  content: '';
  position: absolute;
  top: 4px; right: 4px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--ink-950);
}
@media (max-width: 768px) { .cover-picker { grid-template-columns: repeat(4, 1fr); } }

/* 开关 */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-sub);
  cursor: pointer;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  width: 38px; height: 21px;
  border-radius: 999px;
  background: var(--ink-750);
  border: 1px solid var(--line);
  transition: .2s;
  position: relative;
  flex: none;
}
.switch .track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--text-mute);
  transition: .22s var(--ease);
}
.switch input:checked + .track { background: var(--brand-soft); border-color: var(--brand); }
.switch input:checked + .track::after { transform: translateX(17px); background: var(--brand); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--brand-soft); }
/* 表格里这一列很窄，文案不折行，否则一行会被撑成两倍高 */
.switch-label { white-space: nowrap; }

/* ============================================================
 * 11. 抽屉 / 弹窗 / 提示
 * ============================================================ */
.drawer { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.drawer.is-open { pointer-events: auto; }
.drawer-mask {
  position: absolute; inset: 0;
  background: rgba(3, 5, 10, .68);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .28s;
}
.drawer.is-open .drawer-mask { opacity: 1; }
.drawer-panel {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: 540px;
  max-width: 94vw;
  display: flex;
  flex-direction: column;
  background: var(--ink-900);
  border-left: 1px solid var(--line);
  box-shadow: var(--sh-lg);
  transform: translateX(100%);
  transition: transform .34s var(--ease);
}
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-soft);
}
.drawer-head h3 { font-size: 17px; }
.drawer-head .sub { font-size: 12.5px; color: var(--text-mute); margin-top: 3px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.drawer-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-soft);
  background: var(--ink-850);
}
.drawer-foot .spacer { margin-left: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.modal { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; pointer-events: none; }
.modal.is-open { pointer-events: auto; }
.modal-mask {
  position: absolute; inset: 0;
  background: rgba(3, 5, 10, .7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .25s;
}
.modal.is-open .modal-mask { opacity: 1; }
.modal-box {
  position: relative;
  width: 400px;
  max-width: 92vw;
  padding: 26px;
  border-radius: var(--r-lg);
  background: var(--ink-850);
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
  transform: scale(.94) translateY(10px);
  opacity: 0;
  transition: transform .28s var(--ease), opacity .28s;
}
.modal.is-open .modal-box { transform: none; opacity: 1; }
.modal-ico {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(255, 77, 109, .13);
  color: var(--danger);
  margin-bottom: 16px;
}
.modal-box h3 { font-size: 17px; margin-bottom: 8px; }
.modal-box p { font-size: 13.5px; color: var(--text-sub); line-height: 1.75; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 250px;
  max-width: 360px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  background: var(--ink-800);
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
  animation: toastIn .32s var(--ease);
}
.toast.is-out { animation: toastOut .28s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px) scale(.96); } }
.toast .t-ico { margin-top: 1px; }
.toast.success .t-ico { color: var(--success); }
.toast.warning .t-ico { color: var(--warning); }
.toast.danger .t-ico { color: var(--danger); }
.toast.info .t-ico { color: var(--accent); }
.toast .t-title { font-size: 13.5px; font-weight: 600; }
.toast .t-desc { font-size: 12px; color: var(--text-sub); margin-top: 2px; }

/* ============================================================
 * 12. 骨架屏 / 空态
 * ============================================================ */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--ink-800);
  border-radius: var(--r-sm);
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .055), transparent);
  animation: shimmer 1.35s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

.sk-card { border-radius: 16px; overflow: hidden; border: 1px solid var(--line-soft); }
.sk-card .sk-cover { aspect-ratio: 3 / 4; }
.sk-card .sk-body { padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.sk-line { height: 11px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 72px 24px;
  text-align: center;
}
.empty-state .ico {
  width: 62px; height: 62px;
  border-radius: 20px;
  display: grid; place-items: center;
  background: var(--ink-800);
  border: 1px solid var(--line);
  color: var(--text-mute);
  margin-bottom: 12px;
}
.empty-state h3 { font-size: 16px; }
.empty-state p { font-size: 13px; color: var(--text-sub); max-width: 320px; }
.empty-state .btn { margin-top: 16px; }

/* 图片放大预览 */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center;
  background: rgba(3, 5, 10, .9);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 88vw; max-height: 86vh;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
}
.lightbox .close {
  position: absolute; top: 24px; right: 28px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10, 14, 23, .7);
  color: var(--text);
  display: grid; place-items: center;
}

/* ============================================================
 * 13. 触摸反馈（仅触屏设备；桌面已经有 hover 那一套）
 * ============================================================ */
@media (hover: none) {
  .game-card:active { transform: scale(.985); }
  .pick-card:active { transform: scale(.99); }
  .rank-item:active { transform: none; background: var(--ink-800); }
  .side-item:active { transform: none; border-color: rgba(255, 92, 53, .45); }
  .chip:active, .page-btn:active, .icon-btn:active, .tab:active { background: rgba(255, 255, 255, .09); }
}

/* ============================================================
 * 14. 无 JS 静态兜底（搜索引擎 & 关闭脚本的访客可见）
 *     内容由 gen-seo.js 生成写入 index.html / list.html
 * ============================================================ */
.seo-fallback { max-width: var(--page-max); margin: 0 auto; padding: 40px 24px 0; }
.seo-fallback h2 { font-size: 20px; margin-bottom: 10px; }
.seo-fallback > p { font-size: 13.5px; color: var(--text-sub); margin-bottom: 16px; }
.seo-fallback ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 20px; }
.seo-fallback li {
  font-size: 13.5px;
  color: var(--text-sub);
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.seo-fallback a { color: var(--brand-hi); }
.seo-fallback a:hover { text-decoration: underline; }
@media (max-width: 768px) { .seo-fallback ul { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .seo-fallback ul { grid-template-columns: 1fr; } }

/* ============================================================
 * 15. 响应式
 * ============================================================ */
@media (max-width: 1180px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .nav { display: none; }
  .header-search { width: 180px; }
  .split { grid-template-columns: 1fr; }
  .hero-track { height: 340px; }
  .hero-title { font-size: 34px; }
  .detail-head { grid-template-columns: 140px 1fr; }
  .detail-cover { width: 140px; }
  .detail-actions { grid-column: span 2; flex-direction: row; }
  .detail-actions .btn { flex: 1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform .3s var(--ease);
  }
  .admin-sidebar.is-open { transform: none; }
  .admin-content { margin-left: 0; }
  .nav-toggle { display: grid; }
}

@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .wrap, .hero, .section { padding-left: 16px; padding-right: 16px; }
  .header-inner { gap: 12px; padding: 0 16px; }
  .header-search { display: none; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .section { padding-top: 40px; }
  .section-title { font-size: 21px; }
  .hero-track { height: 358px; }
  .stat-strip > div { padding: 13px 15px; }
  .stat-strip .v { font-size: 20px; }
  .hero-copy { left: 22px; right: 22px; bottom: 74px; max-width: none; }
  .hero-lead { font-size: 15px; margin-bottom: 12px; }
  .hero-slide.align-right .hero-copy { left: 22px; right: 22px; text-align: left; }
  .hero-slide.align-right .hero-copy .hero-actions { justify-content: flex-start; }
  .hero-slide::after, .hero-slide.align-right::after {
    background: linear-gradient(to top, rgba(6, 8, 15, .97) 8%, rgba(6, 8, 15, .6) 55%, rgba(6, 8, 15, .2) 100%);
  }
  .hero-title { font-size: 28px; }
  .hero-nav { right: 16px; bottom: 16px; }
  .detail-hero { height: 240px; border-radius: var(--r-lg); }
  .detail-head { grid-template-columns: 96px 1fr; gap: 16px; margin-top: -70px; padding: 0 18px; }
  .detail-cover { width: 96px; }
  .detail-title { font-size: 24px; }
  .detail-stats { gap: 18px; }
  .detail-stats .v { font-size: 16px; }
  .detail-actions { flex-direction: column; }
  .feature-grid { grid-template-columns: 1fr; }
  .shot-grid { grid-template-columns: 1fr 1fr; }
  .shot-grid figure:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 10; }
  .filter-label { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; padding: 32px 16px 26px; }
  .stat-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 18px 16px; }
  .admin-topbar { padding: env(safe-area-inset-top, 0px) 16px 0; }
  .form-row { grid-template-columns: 1fr; }
  .drawer-panel { width: 100%; max-width: 100%; }

  /* ---- 触摸目标：手指点得到的尺寸（桌面保持原样） ---- */
  .chip { height: 40px; }
  .btn-sm { height: 40px; }
  .icon-btn { width: 44px; height: 44px; }
  .page-btn { min-width: 42px; height: 42px; }
  .act-btn { width: 40px; height: 40px; }
  .hero-arrow { width: 40px; height: 40px; }
  .tab { padding: 12px 14px; }
  .switch { min-height: 40px; gap: 6px; }
  .footer-inner li a { display: block; padding: 8px 0; }
  .footer-inner h4 { margin-bottom: 6px; }

  /* ---- 页脚：两列，别把手机屏幕拉成一条长长的清单 ---- */
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 22px 20px; }
  .footer-about { grid-column: 1 / -1; }
  .footer-about p { max-width: none; }

  /* ---- 筛选：每组一行横向滑动，首屏不再被筛选器占满 ---- */
  .filter-bar { padding: 12px; gap: 8px; }
  .filter-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-row .chip { flex: none; }
  .filter-label {
    display: block;
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 42px;
    padding-right: 8px;
    background: var(--ink-850);
    box-shadow: 10px 0 10px -8px rgba(0, 0, 0, .8);
  }
  .filter-foot { padding-top: 10px; }
  .filter-foot .select { min-width: 118px; height: 40px; }

  /* ---- 详情页：按钮不再被 flex 压扁；封面与文字顶对齐 ---- */
  .detail-head { align-items: start; }
  .detail-actions .btn { flex: 0 0 auto; }
  .rank-name { flex-wrap: nowrap; }

  /* ---- 后台：顶栏、工具栏、时间轴 ---- */
  .admin-topbar h1 { font-size: 16px; white-space: nowrap; }
  .admin-topbar .crumb { display: none; }
  .admin-topbar .btn-sm { padding: 0 12px; }
  .table-toolbar { padding: 12px 14px; gap: 8px; }
  .table-toolbar .search { width: 100%; }
  .table-toolbar .select { flex: 1 1 40%; min-width: 0; }
  .table-toolbar .spacer { display: none; }
  .table-toolbar .btn { width: 100%; }
  .section-head-mini { flex-wrap: wrap; gap: 6px; }
  .section-head-mini h2 { font-size: 15px; }
  .stat-card .v { font-size: 24px; }
  /* 时间轴：日期挪到内容上方，正文不再只剩 139px */
  .tl-item {
    grid-template-columns: 22px 1fr;
    grid-template-areas: "rail date" "rail body";
    column-gap: 12px;
    row-gap: 2px;
  }
  .tl-date { grid-area: date; padding-top: 0; }
  .tl-rail { grid-area: rail; }
  .tl-body { grid-area: body; }

  /* ---- 阅读型文字稍微放大 ---- */
  .prose { font-size: 15px; }
  .kv > div { font-size: 14px; }
  .feature p { font-size: 12.5px; }

  /* ---- 表单控件字号不小于 16px：iOS 聚焦输入框时不会自动放大整页 ---- */
  .input, .select, .textarea, .search input { font-size: 16px; }

  /* ---- Hero：两个按钮并排放不下时换行，别被挤出屏幕 ---- */
  .hero-actions { flex-wrap: wrap; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* 窄屏：区块标题改为纵向堆叠，避免被挤成"全部游 / 戏" */
@media (max-width: 640px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 18px; }
  .section-sub { padding-bottom: 0; }
  .section-more { margin-left: 0; padding-bottom: 0; }
  .hero-title { font-size: 26px; }
  .pick-foot { flex-wrap: wrap; row-gap: 4px; }
}

@media (max-width: 768px) {
  .pick-list { grid-template-columns: 1fr; }
  .pick-card { grid-template-columns: 108px 1fr; gap: 14px; padding: 13px; }
  .pick-body h3 { font-size: 16px; margin-top: 4px; }
}

@media (max-width: 480px) {
  .game-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .game-body { padding: 10px 11px 12px; }
  .game-title { font-size: 13.5px; }
  .game-tagline { font-size: 11px; }
  /* 卡片只有 163px 宽时装不下平台，收掉它保住评分和人气 */
  .game-meta { gap: 4px 10px; }
  .game-meta > span.plat { display: none; }
  .pick-card { grid-template-columns: 96px 1fr; }
  .pick-foot span:nth-child(2) { display: none; }
  .filter-foot { flex-wrap: wrap; }
  .filter-foot .select { margin-left: 0; flex: 1 1 auto; }
  .hero-track { height: 340px; }
  .hero-sub { font-size: 14px; }
  .rank-item { grid-template-columns: 30px 46px 1fr; gap: 10px; padding: 8px 12px 8px 8px; }
  .rank-right { display: none; }
  .rank-thumb { width: 46px; height: 46px; }
  .toast-stack { left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .toast { min-width: 0; }
  .shot-grid { grid-template-columns: 1fr; }
  .shot-grid figure:first-child { grid-column: auto; }
}

/* 超小屏（320～360px，老款 iPhone SE 等）：再收一档，确保不出现横向滚动 */
@media (max-width: 360px) {
  .wrap, .hero, .section { padding-left: 13px; padding-right: 13px; }
  .header-inner { padding: 0 13px; }
  .game-grid { gap: 10px; }
  .hero-track { height: 320px; }
  .hero-title { font-size: 23px; }
  .detail-head { grid-template-columns: 84px 1fr; }
  .detail-cover { width: 84px; }
  .detail-title { font-size: 21px; }
  .detail-stats { gap: 12px 20px; }
}
