/* ==========================================================================
   通千算智游戏门户 —— 主样式
   设计基调：深色科幻 + 电光青/琥珀点缀，贴合策略/工业题材游戏
   ========================================================================== */

:root {
  /* 背景层次 */
  --bg: #0a0e14;
  --bg-soft: #0f151d;
  --bg-panel: #141b26;
  --bg-panel-2: #1a2331;
  --bg-hover: #1e2836;

  /* 文字 */
  --fg: #e6edf5;
  --fg-muted: #9aa8ba;
  --fg-dim: #6b7a8f;

  /* 主题色 */
  --accent: #2ee6c5;
  --accent-dim: #1cb39a;
  --accent-glow: rgba(46, 230, 197, 0.15);
  --amber: #ffb545;
  --blue: #4d9bff;
  --red: #ff6b6b;
  --green: #52d98a;

  /* 边框 */
  --border: #1f2b3a;
  --border-strong: #2c3d52;

  /* 尺寸 */
  --radius: 12px;
  --radius-lg: 18px;
  --radius-sm: 8px;
  --container: 1200px;
  --header-h: 68px;

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Source Han Sans SC', 'Noto Sans CJK SC', sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', monospace;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--accent);
  color: #04120e;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s, box-shadow 0.18s;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #04120e;
  box-shadow: 0 2px 14px rgba(46, 230, 197, 0.22);
}
.btn--primary:hover { box-shadow: 0 4px 22px rgba(46, 230, 197, 0.35); }
.btn--outline {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.btn--ghost {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg-muted);
}
.btn--ghost:hover { background: var(--bg-hover); color: var(--fg); }
.btn--lg { padding: 14px 30px; font-size: 15px; }
.btn--sm { padding: 8px 16px; font-size: 13px; }

/* ==========================================================================
   徽章 / 标签
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge--ok { background: rgba(82, 217, 138, 0.16); color: var(--green); border: 1px solid rgba(82, 217, 138, 0.3); }
.badge--warn { background: rgba(255, 181, 69, 0.15); color: var(--amber); border: 1px solid rgba(255, 181, 69, 0.28); }
.badge--muted { background: rgba(154, 168, 186, 0.12); color: var(--fg-muted); border: 1px solid var(--border); }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}
.chip--sm { padding: 2px 9px; font-size: 11px; }
.chip--ghost { background: rgba(255, 255, 255, 0.04); color: var(--fg-dim); border: 1px solid var(--border); }

/* ==========================================================================
   头部导航
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(46, 230, 197, 0.16), rgba(77, 155, 255, 0.12));
  border: 1px solid rgba(46, 230, 197, 0.28);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 16px; font-weight: 800; letter-spacing: 0.01em; white-space: nowrap; }
.brand-text small { font-size: 11px; color: var(--fg-dim); white-space: nowrap; }

.site-nav ul { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  display: block;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color 0.16s, background 0.16s;
}
.site-nav a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); }
.site-nav a.is-active { color: var(--accent); background: var(--accent-glow); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.22s, opacity 0.22s;
}
.nav-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: saturate(0.7);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 100% at 15% 0%, rgba(46, 230, 197, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(10, 14, 20, 0.55) 0%, rgba(10, 14, 20, 0.92) 60%, var(--bg) 100%);
}
.hero-inner { padding: 88px 24px 72px; max-width: var(--container); }
.hero-eyebrow {
  display: inline-block;
  padding: 5px 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(46, 230, 197, 0.3);
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.hero-title {
  font-size: clamp(36px, 6vw, 62px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(120deg, #ffffff 20%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-tagline {
  margin-top: 14px;
  font-size: clamp(16px, 2.2vw, 21px);
  font-weight: 600;
  color: var(--fg);
}
.hero-desc {
  margin-top: 14px;
  max-width: 620px;
  font-size: 15px;
  color: var(--fg-muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  margin-top: 52px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero-stats dt { font-size: 12px; color: var(--fg-dim); letter-spacing: 0.04em; }
.hero-stats dd { font-size: 28px; font-weight: 800; color: var(--accent); line-height: 1.2; margin-top: 4px; }

/* ==========================================================================
   区块
   ========================================================================== */
.section { padding: 72px 0; }
.section--alt { background: var(--bg-soft); border-block: 1px solid var(--border); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 0.86em;
  margin-right: 12px;
  vertical-align: -1px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
}
.section-sub { margin-top: 8px; font-size: 14px; color: var(--fg-dim); padding-left: 16px; }
.section-more {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-muted);
  transition: color 0.16s, gap 0.16s;
}
.section-more:hover { color: var(--accent); }

/* ==========================================================================
   游戏卡片
   ========================================================================== */
.grid--cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.game-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.game-card--featured:hover { border-color: rgba(46, 230, 197, 0.4); }

.game-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-panel-2);
}
.game-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.game-card-media img.is-broken { opacity: 0; }
.game-card:hover .game-card-media img { transform: scale(1.05); }
.game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 14, 20, 0.75) 100%);
}
.game-card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
}

.game-card-body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.game-card-title { font-size: 18px; font-weight: 700; }
.game-card-title a { transition: color 0.16s; }
.game-card-title a:hover { color: var(--accent); }
.game-card-sub { margin-top: 3px; font-size: 13px; color: var(--accent); font-weight: 500; }
.game-card-desc {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--fg-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.game-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.game-card-date { font-size: 12px; color: var(--fg-dim); margin-left: auto; }
.game-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ==========================================================================
   特色卡 / 空状态
   ========================================================================== */
.hl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.hl-card {
  padding: 26px 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}
.hl-card:hover { border-color: rgba(46, 230, 197, 0.32); transform: translateY(-2px); }
.hl-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(46, 230, 197, 0.18), rgba(77, 155, 255, 0.12));
  border: 1px solid rgba(46, 230, 197, 0.24);
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}
.hl-card h4 { font-size: 16px; font-weight: 700; }
.hl-card p { margin-top: 8px; font-size: 13.5px; color: var(--fg-muted); }

.empty {
  grid-column: 1 / -1;
  padding: 64px 24px;
  text-align: center;
  background: var(--bg-panel);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.empty-title { font-size: 17px; font-weight: 700; }
.empty-desc { margin-top: 8px; font-size: 14px; color: var(--fg-dim); }

/* ==========================================================================
   CTA
   ========================================================================== */
.section--cta { background: linear-gradient(135deg, rgba(46, 230, 197, 0.08), rgba(77, 155, 255, 0.06)); border-top: 1px solid var(--border); }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta h2 { font-size: clamp(20px, 2.6vw, 28px); font-weight: 800; }
.cta p { margin-top: 10px; font-size: 15px; color: var(--fg-muted); max-width: 560px; }

/* ==========================================================================
   内页头
   ========================================================================== */
.page-head {
  padding: 48px 0 40px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.page-title { font-size: clamp(26px, 4vw, 38px); font-weight: 900; letter-spacing: -0.015em; }
.page-sub { margin-top: 10px; font-size: 15px; color: var(--fg-muted); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; font-size: 13px; color: var(--fg-dim); }
.breadcrumb a { color: var(--fg-muted); transition: color 0.16s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span[aria-hidden] { color: var(--fg-dim); }

/* ==========================================================================
   筛选栏 / 锚点栏
   ========================================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-panel);
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.16s;
}
.filter:hover { border-color: var(--border-strong); color: var(--fg); }
.filter.is-active { background: var(--accent-glow); border-color: rgba(46, 230, 197, 0.36); color: var(--accent); }
.filter-num { font-size: 11px; color: var(--fg-dim); }
.filter.is-active .filter-num { color: var(--accent); opacity: 0.75; }

.anchor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.anchor-label { font-size: 13px; color: var(--fg-dim); margin-right: 4px; }
.anchor-bar a {
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  transition: all 0.16s;
}
.anchor-bar a:hover { background: var(--accent-glow); color: var(--accent); }

/* ==========================================================================
   游戏详情
   ========================================================================== */
.game-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.game-hero-bg { position: absolute; inset: 0; z-index: -2; }
.game-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.14; filter: saturate(0.6) blur(2px); }
.game-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.72), rgba(10, 14, 20, 0.94) 70%, var(--bg));
}
.game-hero-inner { padding: 36px 24px 44px; max-width: var(--container); }
.game-hero-main { display: flex; gap: 24px; align-items: flex-start; margin-top: 20px; }
.game-hero-icon {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 20px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-strong);
  object-fit: cover;
}
.game-hero-text { min-width: 0; }
.game-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.game-hero-title { margin-top: 12px; font-size: clamp(28px, 4.4vw, 44px); font-weight: 900; letter-spacing: -0.02em; }
.game-hero-sub { margin-top: 6px; font-size: 17px; color: var(--accent); font-weight: 600; }
.game-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.game-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  padding-top: 48px;
  padding-bottom: 72px;
  align-items: start;
}
.game-main { min-width: 0; display: flex; flex-direction: column; gap: 40px; }

.panel-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.prose { color: var(--fg-muted); font-size: 15px; }
.prose p + p { margin-top: 14px; }
.prose h2 { margin: 32px 0 14px; font-size: 20px; font-weight: 800; color: var(--fg); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 26px 0 12px; font-size: 17px; font-weight: 700; color: var(--fg); }
.prose ul, .prose ol { margin: 14px 0; padding-left: 22px; }
.prose ul li { list-style: disc; }
.prose ol li { list-style: decimal; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--fg); font-weight: 700; }
.prose a { color: var(--accent); border-bottom: 1px solid rgba(46, 230, 197, 0.3); transition: border-color 0.16s; }
.prose a:hover { border-bottom-color: var(--accent); }
.prose code {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--amber);
}
.prose-wrap { max-width: 820px; }

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.shot { margin: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-panel-2); }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.35s; }
.shot:hover img { transform: scale(1.04); }

/* 下载 */
.dl-list { display: flex; flex-direction: column; gap: 14px; }
.dl-item {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.dl-item:hover { border-color: var(--border-strong); }
.dl-info { flex: 1; min-width: 260px; }
.dl-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dl-title { font-size: 16px; font-weight: 700; }
.dl-desc { margin-top: 6px; font-size: 13.5px; color: var(--fg-muted); }
.dl-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--fg-dim); }
.dl-notes { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.dl-notes li { position: relative; padding-left: 16px; font-size: 12.5px; color: var(--fg-dim); }
.dl-notes li::before { content: '·'; position: absolute; left: 5px; color: var(--accent); }
.dl-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.dl-sum { font-family: var(--mono); font-size: 11px; color: var(--fg-dim); }

.dl-group + .dl-group { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--border); }
.dl-group-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.dl-group-icon { width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--border); object-fit: cover; background: var(--bg-panel-2); flex-shrink: 0; }
.dl-group-head h2 { font-size: 19px; font-weight: 800; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dl-group-head h2 a:hover { color: var(--accent); }
.dl-group-head p { margin-top: 3px; font-size: 13.5px; color: var(--fg-muted); }
.dl-group-version { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--fg-dim); }

/* 更新日志 */
.changelog { display: flex; flex-direction: column; gap: 18px; }
.changelog-item { padding: 18px 20px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); }
.changelog-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.changelog-version { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--accent); }
.changelog-date { font-size: 12px; color: var(--fg-dim); }
.changelog-item ul { display: flex; flex-direction: column; gap: 7px; }
.changelog-item li { position: relative; padding-left: 18px; font-size: 13.5px; color: var(--fg-muted); }
.changelog-item li::before { content: ''; position: absolute; left: 4px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-dim); }

/* 链接卡 */
.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.18s;
}
.link-card:hover { border-color: rgba(46, 230, 197, 0.34); transform: translateY(-2px); }
.link-title { font-size: 15px; font-weight: 700; }
.link-desc { font-size: 12.5px; color: var(--fg-dim); }
.link-arrow { position: absolute; top: 18px; right: 20px; color: var(--fg-dim); transition: transform 0.18s, color 0.18s; }
.link-card:hover .link-arrow { transform: translateX(4px); color: var(--accent); }

/* 侧栏 */
.game-side { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 20px; }
.side-card { padding: 22px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); }
.side-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.side-card--cta { background: linear-gradient(135deg, rgba(46, 230, 197, 0.08), transparent); border-color: rgba(46, 230, 197, 0.24); }
.side-card--cta p { font-size: 13.5px; color: var(--fg-muted); margin-bottom: 14px; }

.info-list { display: flex; flex-direction: column; gap: 11px; }
.info-list > div { display: flex; justify-content: space-between; gap: 16px; font-size: 13.5px; }
.info-list dt { color: var(--fg-dim); flex-shrink: 0; }
.info-list dd { color: var(--fg); text-align: right; word-break: break-word; }

.mini-list { display: flex; flex-direction: column; gap: 10px; }
.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.16s;
}
.mini-card:hover { background: var(--bg-panel-2); border-color: var(--border); }
.mini-card img { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; flex-shrink: 0; background: var(--bg-panel-2); }
.mini-card span { display: flex; flex-direction: column; min-width: 0; }
.mini-card strong { font-size: 14px; font-weight: 700; }
.mini-card small {
  font-size: 12px;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notice-box { padding: 28px 30px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.notice-box h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.notice-box ul { display: flex; flex-direction: column; gap: 10px; }
.notice-box li { position: relative; padding-left: 20px; font-size: 13.5px; color: var(--fg-muted); }
.notice-box li::before { content: '!'; position: absolute; left: 0; top: 0; color: var(--amber); font-weight: 800; }

/* ==========================================================================
   404
   ========================================================================== */
.nf { text-align: center; padding: 96px 24px; }
.nf-code { font-size: 92px; font-weight: 900; line-height: 1; color: var(--accent); opacity: 0.2; letter-spacing: -0.04em; }
.nf-title { margin-top: 12px; font-size: 28px; font-weight: 800; }
.nf-desc { margin-top: 12px; font-size: 15px; color: var(--fg-muted); }
.nf-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }
.nf-suggest { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border); text-align: left; }
.nf-suggest h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; text-align: center; }

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 56px 0 28px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
}
.footer-slogan { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--accent); }
.footer-desc { margin-top: 8px; font-size: 13px; color: var(--fg-dim); max-width: 380px; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--fg-dim); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13.5px; color: var(--fg-muted); transition: color 0.16s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--fg-dim);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-legal a:hover { color: var(--accent); }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1000px) {
  .game-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .game-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .container { padding: 0 18px; }
  .section { padding: 52px 0; }
  .hero-inner { padding: 56px 18px 48px; }
  .hero-stats { gap: 28px; margin-top: 36px; }
  .hero-stats dd { font-size: 23px; }
  .page-head { padding: 32px 0 28px; }

  .nav-toggle { display: flex; }
  .site-nav ul {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 18px 18px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open ul { display: flex; }
  .site-nav a { padding: 12px 14px; font-size: 15px; }

  .brand-text small { display: none; }
  .grid--cards { grid-template-columns: 1fr; gap: 18px; }
  .game-hero-main { flex-direction: column; gap: 18px; }
  .game-hero-icon { width: 76px; height: 76px; border-radius: 16px; }
  .game-hero-actions .btn { flex: 1; min-width: 140px; }
  .dl-item { flex-direction: column; align-items: stretch; }
  .dl-actions { flex-direction: row; align-items: center; justify-content: flex-start; width: 100%; }
  .dl-info { min-width: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .nf-code { font-size: 68px; }
}

@media (max-width: 420px) {
  .hero-actions .btn { width: 100%; }
  .dl-group-head { flex-wrap: wrap; }
  .dl-group-version { margin-left: 0; }
}

/* ==========================================================================
   灯箱（JS 注入）
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 5vh 5vw;
  background: rgba(4, 8, 12, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lbIn 0.2s ease;
}
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
  color: var(--fg-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.16s, background 0.16s, transform 0.16s;
}
.lightbox-close:hover { color: var(--fg); background: rgba(255, 255, 255, 0.12); transform: rotate(90deg); }

/* ==========================================================================
   滚动淡入
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* 打印样式：去掉装饰，保留内容 */
@media print {
  .site-header, .site-footer, .hero-bg, .game-hero-bg, .section--cta, .dl-actions, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .game-layout { grid-template-columns: 1fr; }
  .panel, .side-card { border: 1px solid #ccc; background: #fff; }
}

/* ==========================================================================
   官方服务器卡片
   ========================================================================== */
.server-list { display: flex; flex-direction: column; gap: 14px; }
.server-card {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.server-card:hover { border-color: rgba(46, 230, 197, 0.3); }
.server-main { flex: 1; min-width: 260px; }
.server-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.server-title-row h4 { font-size: 16px; font-weight: 700; }

.server-addr {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 12px;
  padding: 9px 14px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.16s;
  user-select: all;
}
.server-addr:hover { border-color: var(--accent); background: var(--accent-glow); }
.server-port { color: var(--fg-muted); }
.copy-hint {
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(46, 230, 197, 0.14);
  font-family: var(--font);
  font-size: 11px;
  color: var(--accent);
  transition: all 0.16s;
}
.server-addr:hover .copy-hint { background: var(--accent); color: #04120e; }
.server-addr.is-copied { border-color: var(--green); }

.server-note { margin-top: 10px; font-size: 13px; color: var(--fg-muted); }

.server-side { text-align: center; min-width: 96px; }
.server-players { display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.server-players strong { font-size: 26px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.server-players span { font-size: 14px; color: var(--fg-dim); }
.server-players-label { margin-top: 3px; font-size: 11px; color: var(--fg-dim); }

.server-help {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(46, 230, 197, 0.05);
  border-left: 2px solid var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  color: var(--fg-muted);
}

/* ---- 服务器实时状态 ---- */

/* 实时数据格：地图 / 波次 / 模式 / 版本 */
.server-live {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(46, 230, 197, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  list-style: none;
}
.server-live li { display: flex; flex-direction: column; gap: 2px; min-width: 62px; }
.server-live span { font-size: 11px; color: var(--fg-dim); letter-spacing: 0.03em; }
.server-live strong { font-size: 14px; font-weight: 700; color: var(--fg); }

.server-names { margin-top: 8px; font-size: 12px; color: var(--fg-muted); }
.server-waiting { margin-top: 12px; font-size: 12px; color: var(--fg-dim); }
.server-heartbeat { margin-top: 6px; font-size: 11px; color: var(--fg-dim); }

/* 离线卡片整体降饱和，避免被误认为可进 */
.server-card.is-offline { border-color: var(--border); background: rgba(20, 27, 38, 0.6); }
.server-card.is-offline .server-players strong { color: var(--fg-dim); }

/* 首页实时状态条 */
.hero-live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 26px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 21, 29, 0.72);
  font-size: 13px;
  color: var(--fg-muted);
  backdrop-filter: blur(6px);
}
.hero-live strong { color: var(--accent); font-weight: 700; }
.hero-live--idle { opacity: 0.72; }
.hero-live--down { color: var(--fg-dim); }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg-dim);
  flex: none;
}
.dot--ok {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(82, 217, 138, 0.6);
  animation: live-pulse 2s ease-out infinite;
}
.dot--off { background: var(--red); }

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(82, 217, 138, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(82, 217, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(82, 217, 138, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .dot--ok { animation: none; }
}

@media (max-width: 760px) {
  .server-card { flex-direction: column; align-items: stretch; }
  .server-side { text-align: left; }
  .server-players { justify-content: flex-start; }
  .server-addr { width: 100%; justify-content: space-between; }
  .server-live { gap: 10px 18px; }
}
