/* ============================================================
 * all-games.css
 * 「全部游戏」专页样式 - 暗黑霓虹 + 玻璃拟态
 * 复用 style.css 基础规则；本页专属样式以 .ag- 前缀命名隔离
 * ============================================================ */

/* ========== 全局变量与重置 ========== */
.ag-page {
  --ag-bg-0: #080808;          /* 最深底色：纯黑街机感 */
  --ag-bg-1: #0e0e0e;          /* 次深背景 */
  --ag-bg-2: #161616;          /* 卡片深色面 */
  --ag-border: rgba(255, 204, 0, 0.22);  /* 黄色玻璃描边 */
  --ag-border-strong: rgba(255, 204, 0, 0.55);
  --ag-yellow: #ffcc00;        /* 主黄 */
  --ag-yellow-soft: #f0c34d;
  --ag-pink: #ff4d8d;          /* 霓虹粉（hero 暗部） */
  --ag-green: #4dff9b;         /* 霓虹绿（数字 / 装饰） */
  --ag-text: #f5f5f5;
  --ag-text-dim: #b8b0c4;
  --ag-text-mute: #6f6478;

  /* ===== 图标尺寸刻度（全站唯一来源，新图标一律走这里）=====
   * 注意：--ico-lg 是"图片高度"，不是内容高度。
   * 分类图标源图统一按"内容高 56 / 画布高 64"归一化，故 32px 图片 = 28px 内容，
   * 6 个图标的内容高度完全一致，这才解决了过去一大一小的根因。
   * 不要再用 object-fit:contain + 方形盒去放这套图标矩形画布，会被压缩。 */
  --ico-xs: 12px;      /* 统计行内小图标（点赞数爱心） */
  --ico-sm: 18px;      /* 栏目标题图标（星/火/手柄/奖杯） */
  --ico-md: 22px;      /* 标签卡图标 / 冠军皇冠 */
  --ico-lg: 32px;      /* 分类图标图片高度 */
  --ico-box-h: 42px;   /* 分类图标容器高度 */
  --ico-box-w: 52px;   /* 分类图标容器宽度（容纳最宽的横幅图标 48.5px） */

  background: var(--ag-bg-0);
  color: var(--ag-text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 整页背景：渐变 + 噪点（CSS-only 微妙纹理） */
.ag-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(255, 77, 141, 0.05), transparent 50%),
    radial-gradient(ellipse at 85% 100%, rgba(77, 255, 155, 0.04), transparent 50%),
    linear-gradient(180deg, #080808, #0c0c0c 60%, #080808);
  z-index: -2;
  pointer-events: none;
}

/* ============================================================
 * 1. 顶部导航
 * ============================================================ */
.ag-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 7, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ag-border);
}

.ag-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.ag-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.ag-logo img {
  height: 38px;
}
.ag-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.ag-logo-cn {
  font-size: 18px;
  color: var(--ag-yellow);
  font-weight: 700;
  letter-spacing: 1px;
}
.ag-logo-en {
  font-size: 10px;
  color: var(--ag-text-dim);
  letter-spacing: 2.5px;
  font-family: 'Press Start 2P', monospace, sans-serif;
}

/* 主导航 5 个 */
.ag-nav {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: center;
}
.ag-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  min-width: 86px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--ag-text-dim);
  transition: 0.2s;
  line-height: 1.2;
  position: relative;
}
.ag-nav-item .cn {
  font-size: 15px;
  font-weight: 600;
}
.ag-nav-item .en {
  font-size: 10px;
  letter-spacing: 1.5px;
  margin-top: 2px;
  opacity: 0.7;
}
.ag-nav-item:hover {
  color: var(--ag-yellow);
  background: rgba(255, 204, 0, 0.06);
}
.ag-nav-item.active {
  color: var(--ag-yellow);
  border-color: var(--ag-border-strong);
  background: rgba(255, 204, 0, 0.08);
  box-shadow: 0 0 14px rgba(255, 204, 0, 0.18) inset;
}

/* 顶栏右侧搜索 */
.ag-search {
  display: flex;
  align-items: center;
  background: rgba(31, 23, 48, 0.7);
  border: 1px solid var(--ag-border);
  border-radius: 10px;
  padding: 4px 4px 4px 14px;
  width: 280px;
  flex-shrink: 0;
}
.ag-search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ag-text);
  font-size: 13px;
  padding: 6px 0;
}
.ag-search input::placeholder {
  color: var(--ag-text-mute);
}
#agSearchBtn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: var(--ag-yellow);
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
 * 2. 三栏主区
 * ============================================================ */
.ag-main {
  max-width: 1400px;
  margin: 18px auto 32px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: flex-start;
}

/* ===== 2.1 左侧栏 ===== */
.ag-sidebar {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== 侧栏顶部品牌区（复古游戏 RETRO GAME HALL） ===== */
.ag-side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
}
.ag-side-brand-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 10px rgba(255, 204, 0, 0.35));
}
.ag-side-brand-icon svg {
  display: block;
}
.ag-side-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.ag-side-brand-text .cn {
  font-size: 20px;
  font-weight: 800;
  color: var(--ag-yellow);
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(255, 204, 0, 0.45);
}
.ag-side-brand-text .en {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--ag-text-dim);
  margin-top: 2px;
  font-family: 'Press Start 2P', monospace, sans-serif;
}

/* 玻璃拟态卡片基础 */
.ag-card {
  background: rgba(31, 23, 48, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--ag-border);
  border-radius: 12px;
  padding: 14px 12px 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}
.ag-card-cat {
  background: rgba(10, 10, 10, 0.85);
  border: 1.5px solid var(--ag-border-strong);
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(255, 204, 0, 0.08),
    0 4px 18px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(255, 204, 0, 0.03);
}

.ag-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 12px;
  border-bottom: 1px dashed var(--ag-border-strong);
  margin: 0 0 10px;        /* 标题语义升级为 h2/h3，默认有 margin，这里清零 */
  font-weight: normal;
  font-size: inherit;
  white-space: nowrap;
}
.ag-card-title .ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--ico-sm);
  height: var(--ico-sm);
  flex-shrink: 0;
  color: var(--ag-yellow);
}
.ag-card-title .ico svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* 「热门标签」卡标题图标用火焰橙，与标签卡的语义一致 */
.ag-card-tag .ag-card-title .ico { color: #ff6633; }
.ag-card-title .cn {
  font-size: 15px;
  font-weight: 700;
  color: var(--ag-yellow);
  flex-shrink: 0;
}
.ag-card-title .en {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--ag-text-mute);
  margin-left: auto;
  flex-shrink: 0;
}

/* 分类列表 */
.ag-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ag-cat-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 13px;
  color: var(--ag-text-dim);
  user-select: none;
  position: relative;
}
.ag-cat-list li:hover {
  background: rgba(255, 204, 0, 0.08);
  color: var(--ag-text);
}
.ag-cat-list li.active {
  background: linear-gradient(90deg, rgba(255, 204, 0, 0.22), rgba(255, 204, 0, 0.06));
  color: var(--ag-yellow);
  border: 1px solid var(--ag-border-strong);
  font-weight: 600;
}
.ag-cat-list li .ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--ico-box-w);
  height: var(--ico-box-h);
  flex-shrink: 0;
}
/* SVG 图标：撑满 42px 高的方盒，实际图形内容约 28px 高，
   与下方 PNG 图标的归一化内容高度（28px）对齐 —— 保持同一视觉重量 */
.ag-cat-list li .ico svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 2px rgba(255, 204, 0, 0.15));
}
/* PNG 图标：按高度定尺寸、宽度自适应。
   源图已按"内容高度统一 56/64"归一化，故所有图标内容高度恒等 28px，
   不再受 object-fit:contain 的"按最长边缩放"影响（那正是过去一大一小的根因） */
.ag-cat-list li .ico img {
  height: var(--ico-lg);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}
.ag-cat-list li .label {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.ag-cat-list li .label .cn {
  font-size: 14px;
  font-weight: 600;
  color: #f5e6a3;
}
.ag-cat-list li .label .en {
  font-size: 10px;
  color: #b0a4c4;
  letter-spacing: 1px;
  margin-top: 2px;
}
.ag-cat-list li .arrow {
  color: var(--ag-yellow);
  font-size: 16px;
  opacity: 1;
  transition: 0.2s;
}
.ag-cat-list li:hover .arrow {
  transform: translateX(2px);
}
.ag-cat-list li.more .label .cn,
.ag-cat-list li.more .label .en {
  color: var(--ag-text-dim);
}
.ag-cat-list li.more:hover .label .cn {
  color: var(--ag-yellow);
}

/* 热门标签 4×2 网格 */
.ag-tag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ag-tag {
  padding: 10px 6px;
  border: 1px solid var(--ag-border);
  border-radius: 8px;
  background: rgba(11, 7, 16, 0.6);
  color: var(--ag-text);
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  font-family: inherit;
}
.ag-tag .en {
  font-size: 10px;
  color: var(--ag-text-mute);
  letter-spacing: 1.5px;
  margin-top: 3px;
}
.ag-tag:hover {
  border-color: var(--ag-border-strong);
  background: rgba(255, 204, 0, 0.1);
  color: var(--ag-yellow);
}
.ag-tag.active {
  background: var(--ag-yellow);
  color: #000;
  border-color: var(--ag-yellow);
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.4);
}
.ag-tag.active .en {
  color: rgba(0, 0, 0, 0.6);
}

/* INSERT COIN */
.ag-coin {
  background: rgba(31, 23, 48, 0.55);
  border: 1px solid var(--ag-border);
  border-radius: 12px;
  padding: 18px 12px 14px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}
.ag-coin-btn {
  font-size: 18px;
  font-weight: 700;
  color: var(--ag-green);
  letter-spacing: 2px;
  padding: 10px 18px;
  border: 1.5px solid var(--ag-green);
  border-radius: 8px;
  text-shadow: 0 0 8px rgba(77, 255, 155, 0.6);
  box-shadow: 0 0 16px rgba(77, 255, 155, 0.2) inset;
  animation: agBlink 1.6s steps(2) infinite;
}
@keyframes agBlink {
  50% { opacity: 0.7; }
}
.ag-coin-meta {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ag-text-dim);
  letter-spacing: 1px;
  display: flex;
  justify-content: center;
  gap: 6px;
  align-items: center;
}
.ag-coin-meta .dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ag-yellow);
  display: inline-block;
  margin: 0 2px;
}

/* ============================================================
 * 2.2 Hero Banner（经典怀旧游戏像素场景，源自目标稿裁切图）
 * ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.ag-hero {
  position: relative;
  height: 240px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--ag-border-strong);
  background: #0a0710;
  margin-bottom: 18px;
  box-shadow: 0 0 30px rgba(255, 204, 0, 0.1);
}
.ag-hero.ag-hero-classic {
  height: auto;
  min-height: 120px;
  aspect-ratio: 1823 / 322;
  background: url('../images/common/hero-classic.jpg') center / cover no-repeat #10142e;
  border-color: rgba(255, 204, 0, 0.45);
  box-shadow: 0 0 26px rgba(255, 204, 0, 0.18);
}

/* 噪点 + 复古街机厅氛围 */
.ag-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 25% 40%, rgba(255, 77, 141, 0.4), transparent 45%),
    radial-gradient(circle at 78% 55%, rgba(77, 255, 155, 0.25), transparent 40%),
    radial-gradient(circle at 50% 30%, rgba(255, 204, 0, 0.3), transparent 50%),
    linear-gradient(135deg, #2a0a1f 0%, #0d0717 100%);
}

/* 模拟复古霓虹招牌 */
.ag-hero-overlay::before,
.ag-hero-overlay::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 110px;
  background: rgba(255, 204, 0, 0.18);
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.3);
  transform: skewX(-15deg);
}
.ag-hero-overlay::before {
  left: 60px;
  top: 60px;
}
.ag-hero-overlay::after {
  right: 60px;
  top: 60px;
}

.ag-hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 16px;
}
.ag-hero-title {
  font-size: 56px;
  font-weight: 800;
  color: var(--ag-yellow);
  letter-spacing: 8px;
  text-shadow:
    0 0 12px rgba(255, 204, 0, 0.65),
    0 0 28px rgba(255, 204, 0, 0.35),
    2px 2px 0 rgba(255, 77, 141, 0.4);
  margin: 0;
  animation: agHeroPulse 3s ease-in-out infinite;
}
@keyframes agHeroPulse {
  0%, 100% { text-shadow: 0 0 12px rgba(255, 204, 0, 0.65), 0 0 28px rgba(255, 204, 0, 0.35), 2px 2px 0 rgba(255, 77, 141, 0.4); }
  50% { text-shadow: 0 0 18px rgba(255, 204, 0, 0.85), 0 0 38px rgba(255, 204, 0, 0.55), 2px 2px 0 rgba(255, 77, 141, 0.4); }
}
.ag-hero-en {
  font-size: 16px;
  letter-spacing: 6px;
  color: var(--ag-green);
  margin-top: 6px;
  font-family: 'Press Start 2P', monospace, sans-serif;
}
.ag-hero-stat {
  margin-top: 14px;
  font-size: 16px;
  color: var(--ag-text);
  letter-spacing: 1px;
}
.ag-hero-stat .num {
  color: var(--ag-green);
  font-size: 22px;
  font-weight: 700;
  margin: 0 4px;
}

/* ============================================================
 * 2.3 平台 Tab
 * ============================================================ */
.ag-platforms {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: rgba(31, 23, 48, 0.5);
  border: 1px solid var(--ag-border);
  border-radius: 12px;
  margin-bottom: 14px;
}
.ag-platform {
  padding: 10px 20px;
  border-radius: 10px;
  background: rgba(13, 10, 22, 0.65);
  border: 1px solid var(--ag-border);
  color: var(--ag-text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: inherit;
  transition: 0.2s;
  min-width: 116px;
  position: relative;
  line-height: 1.2;
  text-align: left;
}
.ag-platform .ico {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ag-platform .ico svg { width: 34px; height: 34px; }
.ag-platform .ico img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
  display: block;
}
.ag-platform .label {
  display: flex;
  flex-direction: column;
}
.ag-platform .cn {
  font-size: 14px;
  font-weight: 600;
}
.ag-platform .en {
  font-size: 10px;
  letter-spacing: 1.5px;
  margin-top: 3px;
  opacity: 0.7;
}
.ag-platform:hover {
  color: var(--ag-text);
  border-color: var(--ag-border-strong);
  background: rgba(255, 204, 0, 0.05);
}
.ag-platform.active {
  color: #241a00;
  border-color: rgba(255, 204, 0, 0.8);
  background: linear-gradient(160deg, #ffe08a, #ffc21d);
  box-shadow: 0 0 16px rgba(255, 204, 0, 0.4);
}
.ag-platform.active .en {
  color: rgba(0, 0, 0, 0.55);
  opacity: 1;
}

/* ============================================================
 * 2.4 排序 + 筛选
 * ============================================================ */
.ag-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 2px 2px 0;
  margin-bottom: 16px;
  background: transparent;
  border: none;
  flex-wrap: wrap;
}
.ag-sorts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ag-sort {
  padding: 7px 14px;
  border-radius: 8px;
  background: rgba(13, 10, 22, 0.65);
  border: 1px solid var(--ag-border);
  color: var(--ag-text-dim);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ag-sort .fire {
  display: inline-flex;
}
.ag-sort .fire svg { width: 14px; height: 14px; }
.ag-sort:hover {
  border-color: var(--ag-border-strong);
  color: var(--ag-text);
}
.ag-sort.active {
  color: var(--ag-yellow);
  border-color: rgba(255, 204, 0, 0.75);
  background: rgba(255, 204, 0, 0.07);
  font-weight: 700;
}
.ag-toolbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
#agTypeSelect {
  background: rgba(11, 7, 16, 0.7);
  border: 1px solid var(--ag-border);
  border-radius: 8px;
  color: var(--ag-text);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 10px;
  cursor: pointer;
  outline: none;
}
#agTypeSelect:hover { border-color: var(--ag-border-strong); }
#agTypeSelect option { background: #140e1e; color: var(--ag-text); }
.ag-toolbar-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  background: rgba(11, 7, 16, 0.7);
  border: 1px solid var(--ag-border);
  border-radius: 8px;
  padding: 2px 6px;
  width: 240px;
}
.ag-toolbar-search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ag-text);
  font-size: 13px;
  padding: 8px 6px;
}
.ag-toolbar-search input::placeholder {
  color: var(--ag-text-mute);
}
.ag-icon-btn {
  background: transparent;
  border: 0;
  color: var(--ag-text-dim);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ag-icon-btn:hover { color: var(--ag-yellow); }

/* 分页栏：编号分页 + 右侧总数 */
.ag-pagebar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.ag-pagebar .pg-pagination { margin: 0; }
.ag-page-total {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--ag-text-dim);
  letter-spacing: 0.5px;
}

/* ============================================================
 * 2.5 游戏卡片网格
 * ============================================================ */
.ag-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  min-height: 240px;
}

.ag-card-game {
  min-width: 0;
  background: #0c0a13;
  border: 1px solid rgba(96, 116, 168, 0.35);
  border-radius: 10px;
  padding: 8px 8px 10px;
  cursor: pointer;
  transition: 0.25s;
  position: relative;
}
.ag-card-game:hover {
  transform: translateY(-4px);
  border-color: var(--ag-yellow);
  box-shadow: 0 6px 20px rgba(255, 204, 0, 0.25);
}

.ag-card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: linear-gradient(135deg, #1f1730, #100820);
  overflow: hidden;
}
.ag-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}
.ag-card-fav {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(160deg, #ffe08a, #ffc21d);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #241a00;
  font-size: 13px;
}
.ag-card-fav:hover { filter: brightness(1.12); }
.ag-card-fav.active {
  background: linear-gradient(160deg, #ffe08a, #ffc21d);
  color: #241a00;
}

.ag-card-meta {
  padding: 10px 4px 0;
}
.ag-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ag-text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ag-card-tag-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ag-text-dim);
  margin-bottom: 8px;
}
.type-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.type-fc     { color: #ffc21d; }
.type-sfc    { color: #ffc21d; }
.type-arcade { color: #e8edf5; }
.type-gba    { color: #8f7bff; }
.type-nds    { color: #35e0a1; }
.ag-card-tag-line .tag {
  color: var(--ag-text-dim);
}
.ag-card-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--ag-text-dim);
  flex-wrap: wrap;
}
.ag-card-stats .stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
/* 点赞数图标（像素 SVG）：统一 12×12 方盒 —— 全站所有 .stat .ic 共用
   （原来用 font-size 控制 ❤ emoji，与 ★ 文本星号混排时基线/宽度都不一致） */
.stat .ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ico-xs);
  height: var(--ico-xs);
  flex-shrink: 0;
}
.stat .ic svg {
  display: block;
  width: 100%;
  height: 100%;
}
.ag-card-stats .stat .like { color: var(--ag-pink); }
.ag-card-stats .stat .play { color: var(--ag-green); }
.ag-card-stats .stat strong {
  color: var(--ag-text);
  font-weight: 600;
  margin-left: 2px;
}

/* 加载/无结果 */
.ag-loading,
.ag-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--ag-text-mute);
  font-size: 14px;
}

/* ============================================================
 * 2.6 编号分页已迁移到全站共用组件 styles/pagination-common.css（.pg-* 前缀）
 * ============================================================ */

/* ============================================================
 * 3. 底部
 * ============================================================ */
.ag-footer {
  text-align: center;
  padding: 32px 16px 40px;
  border-top: 1px solid var(--ag-border);
  background: rgba(11, 7, 16, 0.5);
  margin-top: 30px;
}
.ag-footer-icon {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 24px;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.4));
}
.ag-footer-title {
  font-size: 18px;
  color: var(--ag-yellow);
  letter-spacing: 4px;
  font-weight: 600;
}
.ag-footer-meta {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ag-text-mute);
  letter-spacing: 1px;
}

/* ============================================================
 * 4. 响应式
 * ============================================================ */
@media (max-width: 1200px) {
  .ag-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 960px) {
  .ag-main { grid-template-columns: 1fr; }
  .ag-sidebar { position: static; }
  .ag-grid { grid-template-columns: repeat(3, 1fr); }
  .ag-nav { gap: 4px; }
  .ag-nav-item { min-width: 64px; padding: 8px 10px; }
}
@media (max-width: 720px) {
  .ag-header-inner { flex-wrap: wrap; gap: 12px; }
  .ag-search { width: 100%; }
  .ag-nav { order: 3; width: 100%; justify-content: center; }
  .ag-hero:not(.ag-hero-classic) { height: 180px; }
  .ag-hero.ag-hero-classic { min-height: 0; }
  .ag-hero-title { font-size: 38px; letter-spacing: 4px; }
  .ag-grid { grid-template-columns: repeat(2, 1fr); }
  .ag-toolbar-search { width: 100%; }
}
@media (max-width: 460px) {
  /* 保底 2 列：一列会把 151 个游戏拉成无限长单列，翻页体验极差 */
  .ag-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ============================================================
 * 移动端专项（≤720px）
 * 背景：<960px 时 .ag-sidebar 由 220px 侧栏变为通栏堆叠，
 *       侧栏里 7 个分类 + 8 个标签 + INSERT COIN 会吃掉约 60% 首屏，
 *       用户要滚很久才看到游戏内容。这里把分类列表改为横向滑动快捷条。
 * 说明：只改布局方向，不改 DOM 结构、不动 JS。
 * ============================================================ */
@media (max-width: 720px) {
  /* 关键修复：横向滑动列表是块级滚动容器，它的 min-content 宽度（7 项 × 82px ≈ 574px）
     会顺着 .ag-card -> .ag-sidebar -> .ag-main(grid 1fr) 一路把布局撑爆，
     导致 390px 视口出现整页横向溢出、右侧内容被裁。这里逐层放开 min-width。 */
  .ag-main > * { min-width: 0; }
  .ag-card { min-width: 0; }

  /* 顶栏导航：390px 下 5 项并排，原 min-width:64px 装不下四字标题导致文字折行 */
  .ag-nav { gap: 2px; }
  .ag-nav-item { flex: 1 1 0; min-width: 0; padding: 6px 2px; }
  .ag-nav-item .cn { font-size: 12px; white-space: nowrap; }
  .ag-nav-item .en { font-size: 9px; letter-spacing: 0.5px; }

  .ag-sidebar { gap: 10px; }
  .ag-card { padding: 12px 10px 14px; }

  /* 分类列表：纵向 7 行 -> 横向滑动（图标在上、中英文标签在下） */
  .ag-cat-list {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding: 0 0 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .ag-cat-list::-webkit-scrollbar { display: none; }
  .ag-cat-list li {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 82px;
    padding: 8px 6px;
    text-align: center;
  }
  /* 图标等比缩小，但宽/高按同一比例收，保证 6 个图标内容高度仍然一致 */
  .ag-cat-list li .ico { height: 36px; }
  .ag-cat-list li .ico img { height: 28px; }
  .ag-cat-list li .label { align-items: center; }
  .ag-cat-list li .label .cn { font-size: 12px; }
  .ag-cat-list li .label .en { display: none; }
  .ag-cat-list li .arrow { display: none; }

  /* 装饰块在移动端无导航价值，隐藏以让出首屏 */
  .ag-coin { display: none; }

  /* 热门标签压缩为 3 列 */
  .ag-tag-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .ag-tag { padding: 8px 4px; }
}

@media (max-width: 460px) {
  .ag-cat-list li { width: 72px; }
  .ag-cat-list li .ico { height: 32px; }
  .ag-cat-list li .ico img { height: 24px; }
  .ag-cat-list li .label .cn { font-size: 11px; }
}

/* ============================================================
 * 全站统一 Footer（紧凑单条）— 唯一样式来源
 * 结构：版权 | 免责声明 | 友情链接 | 社交图标 + 备案号
 * ============================================================ */
.game-footer {
  max-width: 1400px;
  margin: 28px auto 22px;
  padding: 0 24px;
}
.game-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 22px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border: 1px solid var(--ag-border-strong);
  border-radius: 10px;
  background: rgba(8, 7, 11, 0.96);
  box-shadow:
    inset 0 0 22px rgba(255, 204, 0, 0.03),
    0 4px 16px rgba(0, 0, 0, 0.4);
}

.gf-copy {
  font-size: 12px;
  color: var(--ag-text-dim);
  white-space: nowrap;
}
.gf-note {
  font-size: 12px;
  color: var(--ag-text-mute);
  white-space: nowrap;
}

/* ---- 友情链接 ---- */
.gf-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gf-links-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ag-yellow);
  letter-spacing: 1px;
}
.gf-links-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.gf-links-list a {
  font-size: 12px;
  color: var(--ag-text-dim);
  text-decoration: none;
  transition: 0.2s;
}
.gf-links-list a:hover { color: var(--ag-yellow); }
.gf-links-list a + a::before {
  content: "|";
  margin-right: 10px;
  color: rgba(255, 204, 0, 0.22);
}

/* ---- 社交 + 备案号 ---- */
.gf-social {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.gf-soc-row { display: flex; gap: 8px; }
.gf-soc {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: 0.2s;
}
.gf-soc svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: currentColor;
}
.soc-x  { background: #0f0f12; color: #fff; border: 1px solid rgba(255, 255, 255, 0.18); }
.soc-fb { background: #1877f2; color: #fff; }
.soc-yt { background: #ff0000; color: #fff; }
.soc-tw { background: #9146ff; color: #fff; }
.gf-soc:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.gf-icp {
  font-size: 11px;
  color: var(--ag-text-mute);
  white-space: nowrap;
}

/* Footer 响应式（桌面不受影响） */
@media (max-width: 1180px) {
  .game-footer-inner { justify-content: flex-start; }
  .gf-note { margin-left: auto; }
}
@media (max-width: 900px) {
  .game-footer-inner { gap: 14px 20px; }
  .gf-note { margin-left: 0; }
  .gf-copy { flex-basis: 100%; }
}
@media (max-width: 720px) {
  .game-footer { padding: 0 16px; margin: 22px auto 16px; }
  .game-footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .gf-social { align-items: flex-start; }
  .gf-links-list a { font-size: 12px; }
}
