/* ===== 设计令牌 ===== */
:root {
  --bg-deep: #0c0e12;
  --bg-elevated: #12151c;
  --bg-card: #161a22;
  --bg-card-hover: #1c212c;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaef;
  --text-muted: #8b93a7;
  --accent: #3d8bfd;
  --accent-soft: rgba(61, 139, 253, 0.15);
  --accent-glow: rgba(61, 139, 253, 0.35);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --header-h: 64px;
  --container: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-deep);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

/* ===== 顶栏 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(12, 14, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #6b5cff);
  box-shadow: 0 0 20px var(--accent-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 1px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-search input {
  width: 180px;
  max-width: 28vw;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 0.8125rem;
}

.header-search input::placeholder {
  color: var(--text-muted);
}

.header-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.nav-buttons {
  display: flex;
  gap: 8px;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 0.9375rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.08);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Hero ===== */
.hero {
  padding: 56px 0 64px;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, var(--accent-soft), transparent),
    linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-deep) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-sub {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 1rem;
}

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-search-input {
  flex: 1;
  min-width: 200px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  box-shadow: var(--shadow-card);
}

.hero-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-card);
}

.hero-search-btn {
  padding-inline: 24px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ===== 区块通用 ===== */
.section {
  padding: 48px 0;
}

.section--alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.section-head {
  margin-bottom: 28px;
}

.section-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}

.section-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ===== 热门游戏卡片 ===== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-card);
}

.game-card:hover {
  border-color: rgba(61, 139, 253, 0.35);
  transform: translateY(-2px);
}

.game-cover {
  aspect-ratio: 16 / 10;
  background: linear-gradient(
    145deg,
    hsl(var(--cover-hue, 210), 45%, 22%) 0%,
    hsl(calc(var(--cover-hue, 210) + 40), 35%, 12%) 100%
  );
  position: relative;
}

.game-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent 45%);
}

/* 首页 / 游戏库 封面：可选真实图片 + 占位渐变 */
.game-cover-wrap {
  overflow: hidden;
}

.game-cover-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  display: none;
}

.game-cover-wrap--has-img .game-cover-photo {
  display: block;
}

.game-cover-wrap--has-img.game-cover::after,
.game-cover-wrap--has-img.games-card-cover::after {
  z-index: 1;
  pointer-events: none;
}

.game-body {
  padding: 16px 18px 18px;
}

.game-name {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
}

.game-genre {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.game-meta {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.game-meta span {
  color: var(--accent);
  font-weight: 600;
}

.game-btn {
  width: 100%;
}

/* ===== 分类 ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  min-height: 108px;
}

.category-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(61, 139, 253, 0.4);
  color: var(--text);
}

.category-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.category-name {
  font-size: 0.875rem;
  font-weight: 500;
}

/* ===== 最新 + 热门 两栏 ===== */
.guides-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

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

.guides-aside {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.aside-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
}

.aside-desc {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.guide-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.guide-row:last-child {
  border-bottom: 0;
}

.guide-row-main {
  min-width: 0;
}

.guide-title {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.guide-title:hover {
  color: var(--accent);
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.guide-game {
  color: var(--text);
  font-weight: 500;
}

.guide-views {
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rank-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.rank-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.rank-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.rank-num--top {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0c0e12;
}

.rank-num--rest {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.rank-body {
  min-width: 0;
}

.rank-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
}

.rank-title:hover {
  color: var(--accent);
}

.rank-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rank-heat {
  color: var(--accent);
}

/* ===== 新手专区 ===== */
.section--beginner {
  padding-block: 40px;
}

.beginner-card {
  background: linear-gradient(135deg, rgba(61, 139, 253, 0.12), var(--bg-card) 45%);
  border: 1px solid rgba(61, 139, 253, 0.25);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-card);
}

.beginner-head {
  margin-bottom: 20px;
}

.beginner-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 10px;
}

.beginner-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
}

.beginner-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.beginner-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.beginner-item {
  margin: 0;
}

.beginner-link {
  display: block;
  padding: 14px 16px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, background 0.15s;
}

.beginner-link:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.beginner-item-title {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 6px;
}

.beginner-item-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.beginner-tag {
  color: var(--accent);
}

/* ===== CTA 横幅 ===== */
.cta-banner {
  padding: 40px 0 56px;
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.cta-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
}

.cta-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 28px 24px;
  padding-bottom: 32px;
}

.footer-col--wide {
  grid-column: 1 / -1;
}

.footer-brand .brand-text {
  font-weight: 700;
  font-size: 1.125rem;
}

.footer-tagline {
  margin: 8px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-heading {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-disclaimer {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 720px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}

.footer-bottom-inner {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-bottom-inner p {
  margin: 0;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .guides-layout {
    grid-template-columns: 1fr;
  }

  .guides-aside {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: rgba(12, 14, 18, 0.97);
    border-bottom: 1px solid var(--border);
    gap: 16px;
    display: none;
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links a {
    padding: 12px;
  }

  .nav-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .header-search input {
    width: 100%;
    max-width: none;
  }

  .nav-buttons {
    justify-content: stretch;
  }

  .nav-buttons .btn {
    flex: 1;
  }

  .hero {
    padding: 40px 0 48px;
  }

  .guide-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 攻略文章页 ===== */
.article-page {
  padding: 28px 0 56px;
}

.article-shell {
  max-width: min(100%, calc(var(--container) + 40px));
}

.article-hero {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.article-hero-inner {
  max-width: 52rem;
}

.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-game {
  color: var(--accent);
  font-weight: 600;
}

.article-breadcrumb a.article-game {
  text-decoration: none;
}

.article-breadcrumb a.article-game:hover {
  text-decoration: underline;
}

.article-breadcrumb-sep {
  opacity: 0.45;
}

.article-category {
  color: var(--text-muted);
}

.article-title {
  margin: 0 0 18px;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.article-lead {
  margin: -8px 0 18px;
  max-width: 48rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin: 0;
}

.article-meta > div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 0.875rem;
}

.article-meta dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.article-meta dt::after {
  content: "：";
}

.article-meta dd {
  margin: 0;
  color: var(--text);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 36px 32px;
  align-items: start;
}

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

.article-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.article-toc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
}

.article-toc-title {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.toc-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  list-style: decimal;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.toc-list li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.toc-link {
  color: var(--text);
  text-decoration: none;
}

.toc-link:hover {
  color: var(--accent);
}

.prose {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 42rem;
}

.prose-section {
  scroll-margin-top: calc(var(--header-h) + 12px);
  padding-bottom: 8px;
  margin-bottom: 2.25rem;
}

.prose-section:last-child {
  margin-bottom: 0;
}

.prose p {
  margin: 0 0 1.1em;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose-h2 {
  margin: 0 0 0.85em;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--text);
}

.prose-h3 {
  margin: 1.5em 0 0.65em;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
}

.prose-h3:first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  margin: 0 0 1.15em;
  padding-left: 1.35em;
  color: var(--text-muted);
}

.prose li {
  margin-bottom: 0.45em;
}

.prose li::marker {
  color: var(--accent);
}

.prose-tip {
  margin: 1.35em 0;
  padding: 14px 16px 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(61, 139, 253, 0.28);
  background: linear-gradient(90deg, var(--accent-soft), transparent 55%);
}

.prose-tip-title {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  color: var(--accent);
}

.prose-tip p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.65;
}

.prose-code-wrap {
  margin: 1.35em 0;
}

.prose-code-wrap figcaption {
  margin-bottom: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.prose-pre {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #0a0c10;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #c9d1d9;
}

.prose-pre code {
  font: inherit;
  white-space: pre;
}

.article-related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.article-related-title {
  margin: 0 0 20px;
  font-size: 1.2rem;
  font-weight: 700;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.related-card {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
  box-shadow: var(--shadow-card);
}

.related-card:hover {
  border-color: rgba(61, 139, 253, 0.35);
  transform: translateY(-2px);
}

.related-card-link {
  display: block;
  padding: 16px 18px;
  height: 100%;
  color: inherit;
}

.related-card-link:hover {
  color: inherit;
}

.related-card-title {
  margin: 0 0 8px;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
}

.related-card-link:hover .related-card-title {
  color: var(--accent);
}

.related-card-meta {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.related-card-excerpt {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
    order: -1;
  }

  .prose {
    max-width: none;
  }
}

/* ===== 游戏库页 ===== */
.games-page {
  padding: 28px 0 56px;
}

.games-hero {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.games-title {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.games-subtitle {
  margin: 0;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.games-toolbar {
  margin-bottom: 28px;
}

.games-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
}

.games-search-field {
  flex: 1 1 220px;
  min-width: 0;
}

.games-search-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
}

.games-search-input::placeholder {
  color: var(--text-muted);
}

.games-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.games-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 2 1 320px;
  justify-content: flex-start;
}

.games-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.games-chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.games-chip.is-active {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.games-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s, transform 0.15s;
}

.games-card:hover {
  border-color: rgba(61, 139, 253, 0.35);
  transform: translateY(-2px);
}

.games-card-cover {
  aspect-ratio: 16 / 9;
  background: linear-gradient(
    145deg,
    hsl(var(--cover-hue, 210), 45%, 22%) 0%,
    hsl(calc(var(--cover-hue, 210) + 40), 35%, 12%) 100%
  );
  position: relative;
}

.games-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 50%);
}

.games-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px 18px;
}

.games-card-name {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 700;
}

.games-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.games-card-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(61, 139, 253, 0.25);
}

.games-card-desc {
  margin: 0 0 14px;
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.games-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 0 0 14px;
  font-size: 0.8125rem;
}

.games-card-stats > div {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.games-card-stats dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.games-card-stats dt::after {
  content: "：";
}

.games-card-stats dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.games-card-btn {
  width: 100%;
  margin-top: auto;
}

.games-empty {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  margin-bottom: 24px;
}

.games-empty[hidden] {
  display: none !important;
}

.games-empty-text {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .games-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .games-type-chips {
    flex: none;
  }
}

/* ===== 游戏攻略专题页 ===== */
.game-topic-page {
  padding: 28px 0 56px;
}

.game-topic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px 28px;
  align-items: start;
}

.game-topic-main {
  min-width: 0;
}

.game-topic-hero {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.game-topic-hero-top {
  margin-bottom: 12px;
}

.game-topic-back {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
}

.game-topic-back:hover {
  color: var(--accent);
  text-decoration: underline;
}

.game-topic-name {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 2.8vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.game-topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.game-topic-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(61, 139, 253, 0.28);
}

.game-topic-desc {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
  max-width: 48rem;
}

.game-topic-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  margin: 0;
  font-size: 0.875rem;
}

.game-topic-stats > div {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.game-topic-stats dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.game-topic-stats dt::after {
  content: "：";
}

.game-topic-stats dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.game-topic-toolbar {
  margin-bottom: 20px;
}

.game-topic-chips {
  flex: none;
  width: 100%;
}

.game-topic-empty {
  text-align: center;
  padding: 36px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  margin-bottom: 20px;
}

.game-topic-empty[hidden] {
  display: none !important;
}

.game-topic-empty-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.game-topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.game-guide-item {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.game-guide-item:last-child {
  border-bottom: 0;
}

.game-guide-main {
  min-width: 0;
}

.game-guide-title {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text);
}

.game-guide-title:hover {
  color: var(--accent);
}

.game-guide-summary {
  margin: 0 0 10px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.game-guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.game-guide-cat {
  color: var(--accent);
  font-weight: 500;
}

.game-guide-diff {
  color: var(--text-muted);
}

.game-guide-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #0c0e12;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.game-guide-views {
  margin-left: auto;
}

.game-guide-btn {
  flex-shrink: 0;
  align-self: center;
}

.game-topic-aside {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.game-aside-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
}

.game-aside-title {
  margin: 0 0 14px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.game-aside-ol {
  margin: 0;
  padding: 0 0 0 1.15rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.game-aside-ol li {
  margin-bottom: 8px;
}

.game-aside-link {
  color: var(--text);
}

.game-aside-link:hover {
  color: var(--accent);
}

.game-aside-idx {
  margin-right: 6px;
  color: var(--accent);
  font-weight: 600;
}

.game-hot-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.game-hot-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.game-hot-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.game-hot-rank {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.game-hot-item:nth-child(-n + 3) .game-hot-rank {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0c0e12;
  border-color: transparent;
}

.game-hot-body {
  min-width: 0;
}

.game-hot-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
}

.game-hot-title:hover {
  color: var(--accent);
}

.game-hot-views {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.game-meta-dl {
  margin: 0;
  font-size: 0.8125rem;
}

.game-meta-dl > div {
  margin-bottom: 12px;
}

.game-meta-dl > div:last-child {
  margin-bottom: 0;
}

.game-meta-dl dt {
  margin: 0 0 4px;
  color: var(--text-muted);
  font-weight: 500;
}

.game-meta-dl dd {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .game-topic-layout {
    grid-template-columns: 1fr;
  }

  .game-topic-aside {
    position: static;
  }

  .game-guide-item {
    flex-direction: column;
    align-items: stretch;
  }

  .game-guide-views {
    margin-left: 0;
  }

  .game-guide-btn {
    align-self: flex-start;
  }
}

/* ===== 攻略分类列表页 ===== */
.category-page {
  padding: 28px 0 56px;
}

.category-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px 28px;
  align-items: start;
}

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

.category-hero {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.category-title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.8vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.category-subtitle {
  margin: 0;
  max-width: 40rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.category-toolbar {
  margin-bottom: 20px;
}

.category-chips {
  width: 100%;
}

.category-empty {
  text-align: center;
  padding: 36px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  margin-bottom: 20px;
}

.category-empty[hidden] {
  display: none !important;
}

.category-empty-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.category-guide-item {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.category-guide-item:last-child {
  border-bottom: 0;
}

.category-guide-main {
  min-width: 0;
}

.category-guide-title {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text);
}

.category-guide-title:hover {
  color: var(--accent);
}

.category-guide-summary {
  margin: 0 0 10px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.category-guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.category-guide-game {
  color: var(--text);
  font-weight: 500;
}

.category-guide-cat {
  color: var(--accent);
  font-weight: 500;
}

.category-guide-views {
  margin-left: auto;
}

.category-guide-btn {
  flex-shrink: 0;
  align-self: center;
}

.category-aside {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category-aside-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
}

.category-aside-title {
  margin: 0 0 14px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.category-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-side-list li {
  margin-bottom: 8px;
}

.category-side-list li:last-child {
  margin-bottom: 0;
}

.category-side-hot-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.category-side-hot-btn:hover {
  border-color: rgba(61, 139, 253, 0.4);
  background: var(--bg-card-hover);
}

.category-side-hot-count {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.category-side-simple {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
}

.category-side-simple li {
  margin-bottom: 10px;
}

.category-side-simple li:last-child {
  margin-bottom: 0;
}

.category-side-link {
  color: var(--text);
  line-height: 1.45;
}

.category-side-link:hover {
  color: var(--accent);
}

.category-side-recent {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-side-recent li {
  margin-bottom: 12px;
}

.category-side-recent li:last-child {
  margin-bottom: 0;
}

.category-side-recent-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8125rem;
  color: var(--text);
}

.category-side-recent-link:hover .category-side-recent-title {
  color: var(--accent);
}

.category-side-recent-title {
  font-weight: 600;
  line-height: 1.35;
}

.category-side-recent-link time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .category-layout {
    grid-template-columns: 1fr;
  }

  .category-aside {
    position: static;
  }

  .category-guide-item {
    flex-direction: column;
    align-items: stretch;
  }

  .category-guide-views {
    margin-left: 0;
  }

  .category-guide-btn {
    align-self: flex-start;
  }
}

/* ===== 搜索攻略页 ===== */
.search-page {
  padding: 28px 0 56px;
}

.search-hero {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.search-title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.8vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.search-subtitle {
  margin: 0;
  max-width: 38rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.search-panel {
  margin-bottom: 20px;
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.search-page-input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  box-shadow: var(--shadow-card);
}

.search-page-input::placeholder {
  color: var(--text-muted);
}

.search-page-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-card);
}

.search-page-btn {
  padding-inline: 22px;
}

.search-toolbar {
  margin-bottom: 16px;
}

.search-type-chips {
  width: 100%;
}

.search-count {
  margin: 0 0 14px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.search-empty {
  text-align: center;
  padding: 40px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  margin-bottom: 20px;
}

.search-empty[hidden] {
  display: none !important;
}

.search-empty-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.search-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.search-item {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.search-item:last-child {
  border-bottom: 0;
}

.search-item-main {
  min-width: 0;
}

.search-item-title {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text);
}

.search-item-title:hover {
  color: var(--accent);
}

.search-item-summary {
  margin: 0 0 10px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.search-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.search-item-game {
  color: var(--text);
  font-weight: 500;
}

.search-item-cat {
  color: var(--accent);
  font-weight: 500;
}

.search-item-kind {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.search-item-views {
  margin-left: auto;
}

.search-item-btn {
  flex-shrink: 0;
  align-self: center;
}

@media (max-width: 768px) {
  .search-item {
    flex-direction: column;
    align-items: stretch;
  }

  .search-item-views {
    margin-left: 0;
  }

  .search-item-btn {
    align-self: flex-start;
  }
}
