:root {
  --bg: #101014;
  --surface: #1b1b22;
  --surface-2: #24242e;
  --text: #f2f3f7;
  --text-dim: #9aa0ad;
  --primary: #ff7847;
  --primary-soft: rgba(255, 120, 71, .15);
  --violet: #6c5ce7;
  --border: #2c2c38;
  --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 16, 20, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: none;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-left { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-right: auto; }
.menu-btn { display: none; }
@media (max-width: 1023px) { .menu-btn { display: flex; } }

.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-icon { display: block; border-radius: 9px; }
.logo-text { font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.logo-text em { font-style: normal; color: var(--primary); }

.searchbox {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text-dim);
  transition: border-color .15s;
}
.searchbox:focus-within { border-color: var(--primary); }
.searchbox input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  min-width: 0;
}

.topbar-btn {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 17px;
  flex-shrink: 0;
}
.topbar-btn:active { border-color: var(--primary); color: var(--primary); }

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

/* 桌面/平板：三栏网格，搜索框绝对居中 */
@media (min-width: 641px) {
  .topbar-inner {
    display: grid;
    grid-template-columns: 1fr minmax(0, 520px) 1fr;
    align-items: center;
  }
  .topbar-left { justify-self: start; margin-right: 0; }
  .searchbox { width: 100%; max-width: none; justify-self: center; }
  .topbar-actions { justify-self: end; }
}

.lang-select {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  border-radius: 10px;
  padding: 7px 8px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}
.lang-select:hover, .lang-select:focus { border-color: var(--primary); color: var(--text); }

/* ---------- 导航 tab ---------- */
.tabs {
  max-width: none;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dim);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- 分类 chips ---------- */
.chips-wrap { border-top: 1px solid var(--border); }
.chips {
  max-width: none;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 主体 ---------- */
.container {
  flex: 1;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 16px 20px 40px;
}

/* 游戏详情页保持窄栏居中（阅读体验），首页通栏 */
.game-page { max-width: 1200px; }

/* 游戏页双栏：桌面端左侧评论区 + 右侧主内容，移动端评论区排在主内容之后 */
.game-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
.game-main { min-width: 0; }
@media (min-width: 1280px) {
  /* 桌面端通栏：游戏内容在左、评论区在右，游戏在自己的列里居中 */
  .game-page { max-width: none; }
  .game-layout { grid-template-columns: minmax(0, 2.5fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
  .game-main { grid-column: 1; grid-row: 1; }
  .comments-col { grid-column: 2; grid-row: 1; position: sticky; top: 66px; max-height: calc(100vh - 86px); overflow-y: auto; }
}

/* ---------- 游戏赞/踩条（游戏标题下方，全端显示） ---------- */
.gv-bar { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; }
.gv-label { font-size: 13px; color: var(--text-dim); }
.gv-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-dim); font-size: 13px; font-weight: 700;
  padding: 7px 14px; cursor: pointer; transition: all .15s;
}
.gv-btn:hover { color: var(--text); border-color: var(--text-dim); }
.gv-btn.on { color: #fff; background: var(--primary); border-color: var(--primary); }
#gv-down.on { background: #b33939; border-color: #b33939; }

/* ---------- 评论区 ---------- */
/* 顶栏评论入口按钮（桌面端左栏常驻，无需入口） */
.cm-open-btn span { font-size: 11px; margin-left: 3px; }
.cm-open-btn span:empty { display: none; }
@media (min-width: 1280px) {
  .cm-open-btn { display: none; }
}
.cm-close { display: none; }
.cm-mask { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 1000; }

/* 移动端/窄屏：评论面板收进底部抽屉，点顶栏评论按钮弹出 */
@media (max-width: 1279.98px) {
  .comments-col { display: none; }
  .comments-col.open {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; top: 12%;
    z-index: 1001; margin: 0; border-radius: 16px 16px 0 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .cm-mask.open { display: block; }
  .comments-col.open .cm-close {
    display: flex; align-items: center; justify-content: center;
    position: fixed; top: calc(12% + 10px); right: 12px; z-index: 2;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--surface-2); border: 1px solid var(--border);
    color: var(--text-dim); font-size: 14px; cursor: pointer;
  }
}

.cm-title { font-size: 16px; margin: 0 0 10px; }
.cm-title #cm-count { color: var(--text-dim); font-weight: 400; font-size: 13px; }
#cm-input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); padding: 10px 12px;
  font-size: 14px; font-family: inherit; resize: vertical; outline: none;
}
#cm-input:focus { border-color: var(--primary); }
.cm-composer-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cm-hint { font-size: 12px; color: var(--text-dim); margin-right: auto; }

/* emoji 选择器 */
.emoji-wrap { position: relative; }
.cm-reply-row .emoji-wrap { margin-right: auto; }
.emoji-btn {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; line-height: 1; padding: 5px 9px; cursor: pointer;
}
.emoji-btn:hover { border-color: var(--text-dim); }
.emoji-pop {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 30;
  width: 268px; max-height: 208px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.emoji-pop button {
  background: none; border: none; font-size: 18px; line-height: 1.35;
  padding: 3px 0; cursor: pointer; border-radius: 6px;
}
.emoji-pop button:hover { background: var(--surface-2); }

.cm-list { list-style: none; margin-top: 12px; }
.cm-list > li { padding: 12px 0; border-top: 1px solid var(--border); }
.cm-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cm-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.cm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cm-head strong { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-date { margin-left: auto; color: var(--text-dim); font-size: 12px; flex: none; }
.cm-body { margin: 6px 0 8px 34px; font-size: 14px; color: var(--text-dim); line-height: 1.6; overflow-wrap: anywhere; }
.cm-actions { display: flex; align-items: center; gap: 4px; margin-left: 30px; }
.cm-act {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; border-radius: 6px;
  color: var(--text-dim); font-size: 12px; font-weight: 600;
  padding: 4px 8px; cursor: pointer;
}
.cm-act:hover { background: var(--surface-2); color: var(--text); }
.cm-act.on { color: var(--primary); }
.cm-act.on-down { color: #e66; }
.cm-replies { list-style: none; margin: 10px 0 0 34px; }
.cm-replies li { padding: 10px 0 0; border-top: 1px dashed var(--border); margin-top: 10px; }
.cm-replies li:first-child { border-top: none; margin-top: 0; }
.cm-reply-box { margin: 8px 0 0 34px; }
.cm-reply-box textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 8px 10px;
  font-size: 13px; font-family: inherit; resize: vertical; outline: none;
}
.cm-reply-box textarea:focus { border-color: var(--primary); }
.cm-reply-row { display: flex; gap: 8px; margin-top: 6px; justify-content: flex-end; }
.cm-btn-sm {
  background: var(--primary); border: none; border-radius: 8px; color: #fff;
  font-size: 12px; font-weight: 700; padding: 6px 14px; cursor: pointer;
}
.cm-btn-sm.ghost { background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border); }
.cm-empty { color: var(--text-dim); font-size: 13px; padding: 14px 0; }

.section-title {
  font-size: 20px;
  font-weight: 800;
  margin: 26px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title:first-child { margin-top: 4px; }

.empty-tip {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 0;
  font-size: 15px;
}

/* 无限滚动哨兵：滚动接近时自动加载下一批 */
.load-sentinel {
  text-align: center;
  padding: 20px 0 8px;
  color: var(--text-dim);
  font-size: 20px;
  letter-spacing: 4px;
  user-select: none;
}

/* ---------- 左滑抽屉菜单 ---------- */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 99;
}
.drawer-mask.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 272px;
  max-width: 82vw;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 100;
  transform: translateX(-105%);
  transition: transform .25s ease;
  overflow-y: auto;
  padding: 14px 12px 20px;
  scrollbar-width: none;
}
.drawer::-webkit-scrollbar { display: none; }
.drawer.open { transform: translateX(0); }
body.drawer-lock { overflow: hidden; }

.drawer-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 11px 10px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  text-align: left;
  transition: background .15s;
}
.drawer-item svg { color: var(--primary); flex-shrink: 0; }
.drawer-item:hover, .drawer-item:active { background: var(--surface-2); }
.drawer-item.active { color: var(--primary); }
.drawer-item .cnt { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-dim); }

.drawer-sep { height: 1px; background: var(--border); margin: 10px 6px; }
.drawer-copy { padding: 12px 10px 4px; font-size: 11px; color: var(--text-dim); }

/* ---------- 左侧分类栏（桌面端） ---------- */
.side-nav { display: none; }

@media (min-width: 1024px) {
  body { padding-left: 60px; }
  .chips-wrap { display: none; }

  /* 悬停自动展开：60px 图标栏 → 236px 图标+分类名（覆盖在内容上方） */
  .side-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    padding: 10px 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow: hidden;
    z-index: 60;
    transition: width .22s ease;
  }
  .side-nav:hover {
    width: 236px;
    box-shadow: 10px 0 30px rgba(0, 0, 0, .5);
  }

  .side-cats {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
  }
  .side-cats::-webkit-scrollbar { display: none; }

  .side-item {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    height: 44px;
    padding: 0 12px 0 19px; /* 19px 左距使图标中心与收起态 60px 栏居中一致 */
    border: none;
    background: transparent;
    color: var(--text-dim);
    white-space: nowrap;
    transition: background .15s, color .15s;
  }
  .side-item svg { display: block; flex-shrink: 0; }
  .side-item[hidden] { display: none; }
  .side-item:hover { background: var(--surface-2); color: var(--text); }
  .side-item.active {
    color: var(--primary);
    background: var(--primary-soft);
    box-shadow: inset 3px 0 0 var(--primary);
  }

  .side-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: opacity .18s;
  }
  .side-nav:hover .side-label { opacity: 1; }
  .side-label .cnt { font-size: 12px; font-weight: 600; color: var(--text-dim); }

  .side-bottom {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 8px;
  }
  .side-copy {
    padding: 10px 0 4px 19px;
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    opacity: 0;
    transition: opacity .18s;
  }
  .side-nav:hover .side-copy { opacity: 1; }
}

/* ---------- 精选大卡横滑区 ---------- */
.feature-carousel {
  position: relative;
}

.feature-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 8px;
}
.feature-strip::-webkit-scrollbar { display: none; }

.feature-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 44px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  background: rgba(16, 16, 20, .78);
  color: #fff;
  font-size: 38px;
  line-height: 1;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .18s, background .18s, transform .18s;
  backdrop-filter: blur(6px);
}
.feature-prev { left: 10px; }
.feature-next { right: 10px; }
.feature-carousel:hover .feature-nav,
.feature-nav:focus-visible { opacity: 1; }
.feature-nav:hover {
  background: rgba(255, 120, 71, .92);
  transform: translateY(-50%) scale(1.05);
}

.feature-card {
  position: relative;
  flex: 0 0 auto;
  width: 380px;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.feature-card .feature-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.feature-card:hover .feature-bg { transform: scale(1.04); }

.feature-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 30px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .82));
}
.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .25);
  flex-shrink: 0;
}
.feature-title {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feature-count { margin-top: 1px; font-size: 12px; font-weight: 700; color: var(--primary); }
.feature-bar > div { min-width: 0; }

.view-more {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
}
.view-more:hover { color: var(--primary); }

/* ---------- 快捷横滑条 ---------- */
.quick-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 14px;
}
.quick-strip::-webkit-scrollbar { display: none; }

.quick-tile {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
}
.quick-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

.quick-my {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px 9px;
  background: linear-gradient(135deg, var(--primary), #ffb347);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  border: none;
  text-align: left;
}

/* ---------- 游戏卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.grid.featured { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.game-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .15s ease, border-color .15s ease;
  display: block;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: #3a3a48;
}

.game-card .thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}

.game-card .card-body { padding: 10px 12px; }
.game-card .card-title {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-card .card-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-sub .dot { width: 6px; height: 6px; border-radius: 50%; background: #34c759; display: inline-block; flex-shrink: 0; }

.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.badge.new { background: #34c759; }
.card-thumb-wrap { position: relative; }

/* ---------- 游戏详情页 ---------- */
.game-page .player-wrap { margin-bottom: 20px; }

.player-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.player-head h1 { font-size: 20px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.back-btn {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  flex-shrink: 0;
  white-space: nowrap;
}
.back-btn:hover { color: var(--primary); }

.player-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 17px;
  color: var(--text-dim);
  transition: all .15s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn.fav-on { color: #ff4757; border-color: #ff4757; }

.player-frame {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  box-shadow: var(--shadow);
}
/* 竖屏游戏：按游戏自身比例（--ar 由 JS 设置），以高度为基准居中，桌面/移动视觉一致 */
.player-frame.portrait {
  aspect-ratio: var(--ar, 9 / 16);
  width: auto;
  height: min(78vh, 760px);
  max-width: 100%;
  margin: 0 auto;
}
.player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 2;
}
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) brightness(.45);
}
.play-btn {
  position: relative;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 38px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(255, 120, 71, .45);
  transition: transform .15s;
}
.play-btn:hover { transform: scale(1.06); }

.card-panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px 22px;
  margin-bottom: 10px;
}
.card-panel h2 { font-size: 16px; margin: 16px 0 6px; }
.card-panel h2:first-of-type { margin-top: 12px; }
.card-panel p { font-size: 14px; color: var(--text-dim); line-height: 1.7; overflow-wrap: anywhere; }

.game-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-tag {
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------- 游戏反馈 ---------- */
.feedback-panel { margin-top: 20px; }
.fb-summary { font-size: 14px; color: var(--primary); font-weight: 700; margin: 8px 0 4px; }

.fb-stars { display: flex; gap: 4px; margin: 10px 0; }
.fb-stars button {
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--border);
  padding: 2px;
  transition: color .12s, transform .12s;
}
.fb-stars button:hover { transform: scale(1.15); }
.fb-stars button.on { color: #ffb400; }

#fb-message {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  resize: vertical;
  outline: none;
}
#fb-message:focus { border-color: var(--primary); }

.fb-row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
#fb-name {
  flex: 1;
  min-width: 160px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  padding: 9px 12px;
  outline: none;
}
#fb-name:focus { border-color: var(--primary); }
#fb-name:disabled { opacity: .7; }

.fb-submit {
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 26px;
  border-radius: 999px;
  transition: transform .12s;
}
.fb-submit:hover { transform: scale(1.04); }

.fb-status { font-size: 13px; color: var(--text-dim); margin-top: 8px; min-height: 18px; }

.fb-list { list-style: none; margin-top: 14px; }
.fb-list li { padding: 12px 0; border-top: 1px solid var(--border); }
.fb-head { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.fb-head strong { color: var(--text); }
.fb-item-stars { color: #ffb400; font-size: 12px; letter-spacing: 1px; }
.fb-date { margin-left: auto; color: var(--text-dim); font-size: 12px; }
.fb-list p { margin-top: 4px; font-size: 14px; color: var(--text-dim); line-height: 1.6; overflow-wrap: anywhere; }
.fb-empty { color: var(--text-dim); font-size: 14px; padding: 14px 0; border-top: 1px solid var(--border); }

/* ---------- 原创编辑内容 ---------- */
.cat-intro {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: 900px;
  margin: -4px 0 16px;
}

.category-guide {
  padding-top: 0;
  padding-bottom: 34px;
}
.category-guide h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 16px 0 4px;
  color: var(--text);
}
.category-guide p {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: 900px;
}

#editorial p {
  border-left: 3px solid var(--primary);
  padding-left: 12px;
}

/* ---------- 静态内容页 ---------- */
.static-page { max-width: 860px; }
.static-page .card-panel { padding: 30px 34px; }
.static-page h1 { font-size: 26px; margin-bottom: 10px; }
.static-page h2 { font-size: 17px; margin: 22px 0 8px; }
.static-page p { margin-bottom: 10px; }
.static-page a { color: var(--primary); }
.page-updated { font-size: 12px !important; opacity: .8; }

@media (max-width: 640px) {
  .static-page .card-panel { padding: 20px 18px; }
  .static-page h1 { font-size: 21px; }
}

/* ---------- 页脚 ---------- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 26px 16px;
}
.footer-links { display: flex; justify-content: center; gap: 22px; margin-bottom: 10px; }
.footer-links a { font-size: 13px; color: var(--text-dim); }
.footer-links a:hover { color: var(--primary); }
.footer-note, .footer-copy { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* ---------- Static SEO landing pages / raw-HTML discovery content ---------- */
.seo-static-home { padding: 8px 0 28px; }
.seo-hub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 22px;
}
.seo-hub-links a,
.seo-top-links a,
.seo-pagination a {
  color: var(--primary);
  text-decoration: none;
}
.seo-hub-links a {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
}
.seo-listing-page { min-height: 100vh; }
.seo-listing { padding-top: 88px; padding-bottom: 48px; }
.seo-listing h1 { margin: 14px 0 8px; }
.seo-listing-intro {
  max-width: 850px;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 24px;
}
.seo-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13px;
  margin: 8px 0 14px;
}
.seo-breadcrumb a { color: var(--primary); text-decoration: none; }
.seo-top-links { display: flex; gap: 18px; margin-left: auto; }
.seo-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 30px 0;
  color: var(--text-dim);
}
.seo-pagination > :last-child { justify-self: end; }
.seo-category-nav { margin-top: 40px; }
.seo-category-nav h2 { font-size: 20px; }
.seo-listing-page .footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}
.seo-listing-page .footer a { color: var(--text-dim); text-decoration: none; }

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

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .topbar-inner { gap: 8px; padding: 10px 12px; }
  .logo-icon { width: 30px; height: 30px; }
  .logo-text { font-size: 17px; }

  /* 搜索框收进图标，点击展开成整行 */
  .searchbox {
    display: none;
    order: 10;
    flex-basis: 100%;
    max-width: none;
  }
  .topbar.search-open .topbar-inner { flex-wrap: wrap; }
  .topbar.search-open .searchbox { display: flex; }
  .topbar-btn { display: flex; }

  .tab { padding: 9px 11px; font-size: 14px; }
  .container { padding: 12px 12px 32px; }

  .quick-tile { width: 76px; height: 76px; border-radius: 14px; }

  .feature-card { width: 82vw; }
  .feature-nav { display: none; }

  .grid, .grid.featured {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .game-card { border-radius: 12px; }
  .game-card .thumb { aspect-ratio: 1 / 1; }
  .game-card .card-body { padding: 7px 8px; }
  .game-card .card-title { font-size: 12px; }
  .game-card .card-sub { font-size: 10px; }
  .badge { font-size: 9px; padding: 2px 6px; top: 6px; left: 6px; }

  .section-title { font-size: 16px; margin: 20px 0 10px; }

  .player-head { flex-wrap: wrap; gap: 8px; }
  .player-head h1 { font-size: 16px; flex-basis: 100%; order: 3; white-space: normal; }
  .player-frame { border-radius: 12px; }
  /* 移动端竖屏游戏满宽显示，贴近原生 App 观感 */
  .player-frame.portrait {
    width: 100%;
    height: auto;
    aspect-ratio: var(--ar, 9 / 16);
    max-height: 76vh;
  }
  .card-panel { padding: 14px 16px; }
  .footer-links { gap: 14px; flex-wrap: wrap; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .grid.featured { grid-template-columns: repeat(3, 1fr); }
}
