/* ===========================================================
  CC 520 · 全局样式
   配色参考原站的深色蓝黑主题
   =========================================================== */

:root {
  --bg: #0b0f19;
  --bg-soft: #101625;
  --card: #151b2b;
  --card-hover: #1c2436;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --fg: #f4f7f9;
  --muted: #99a1af;
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

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

/* 保证 hidden 属性永远生效（否则会被 .btn 等 display 规则覆盖） */
[hidden] { display: none !important; }

/* ---------------- 白色外观（点右上角按钮切换） ---------------- */

:root[data-theme="light"] {
  --bg: #f5f6fa;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-hover: #f1f3f9;
  --border: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.22);
  --fg: #111827;
  --muted: #6b7280;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

:root[data-theme="light"] .app-header { background: rgba(255, 255, 255, 0.92); }
:root[data-theme="light"] .nav a:hover { background: rgba(15, 23, 42, 0.06); }
:root[data-theme="light"] .nav a.active { color: #4338ca; background: rgba(99, 102, 241, 0.14); }
:root[data-theme="light"] .hero {
  background:
    radial-gradient(900px 260px at 12% -30%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(700px 220px at 92% 0%, rgba(34, 211, 238, 0.18), transparent 60%),
    linear-gradient(180deg, #eef1fb, #ffffff);
}
:root[data-theme="light"] input,
:root[data-theme="light"] textarea,
:root[data-theme="light"] select { background: rgba(15, 23, 42, 0.035); }
:root[data-theme="light"] .btn { background: rgba(15, 23, 42, 0.05); }
:root[data-theme="light"] .btn:hover { background: rgba(15, 23, 42, 0.1); }
:root[data-theme="light"] .btn-primary { background: var(--primary); color: #fff; }
:root[data-theme="light"] .tag { background: rgba(99, 102, 241, 0.12); color: #4338ca; }
:root[data-theme="light"] .chip { background: rgba(15, 23, 42, 0.04); }
:root[data-theme="light"] .chip.active { background: rgba(99, 102, 241, 0.16); color: #4338ca; }
:root[data-theme="light"] .card-cover .badge { background: rgba(255, 255, 255, 0.85); color: #4338ca; }
:root[data-theme="light"] .card:hover .card-title { color: var(--primary); }
:root[data-theme="light"] .rank-list a { color: #374151; }
:root[data-theme="light"] .rank-list a:hover { background: rgba(15, 23, 42, 0.05); color: #111827; }
:root[data-theme="light"] .mini-title { color: #1f2937; }
:root[data-theme="light"] .article { color: #1f2937; }
:root[data-theme="light"] .comment .text { color: #1f2937; }
:root[data-theme="light"] .comment .who { color: #4338ca; }
:root[data-theme="light"] .pager button { background: #fff; color: #374151; }
:root[data-theme="light"] table.data th { background: rgba(15, 23, 42, 0.035); }
:root[data-theme="light"] table.data tr:hover td { background: rgba(15, 23, 42, 0.03); }
:root[data-theme="light"] .modal { background: #fff; }
:root[data-theme="light"] .toast { background: #fff; }
:root[data-theme="light"] .download-box { background: linear-gradient(180deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.02)); }
:root[data-theme="light"] .download-box .row .value { color: #3730a3; }
:root[data-theme="light"] .skeleton { background: linear-gradient(90deg, #eef1f7, #e2e8f0, #eef1f7); background-size: 200% 100%; }

/* 主题切换按钮 */
.theme-toggle {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px; cursor: pointer; font-size: 15px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border); color: var(--fg);
  transition: all 0.16s;
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.14); }
:root[data-theme="light"] .theme-toggle { background: rgba(15, 23, 42, 0.05); }
:root[data-theme="light"] .theme-toggle:hover { background: rgba(15, 23, 42, 0.12); }

/* ---------------- 热门月榜 ---------------- */

/* ---------------- 后台：标签页 / 未读标记 / 评论消息 ---------------- */

/* 后台：从 Steam 自动填写 */
.steam-autofill {
  border: 1px solid rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.09);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 16px;
}
.steam-autofill-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 9px;
}
.steam-autofill-head b { font-size: 14px; }
.steam-autofill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.steam-autofill-row input { flex: 1; min-width: 220px; }
/* 一次列 5 个候选，高度放宽到全都看得见（超了再滚） */
.steam-results { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.steam-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px; border-radius: 9px; cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  color: var(--fg); font-family: inherit; font-size: 13.5px;
}
.steam-item:hover { background: rgba(99, 102, 241, 0.18); border-color: rgba(99, 102, 241, 0.5); }
.steam-item img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; }
.steam-item-name { flex: 1; }

/* ---------------- 下载区：电脑扫码 / 手机直达 ---------------- */

/* 游戏视频 */
.video-list { display: grid; gap: 14px; }
.video-slot { display: block; }
.video-placeholder {
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  border: 1px dashed var(--border-strong); border-radius: 14px;
  color: var(--muted); font-size: 13px; background: rgba(255, 255, 255, 0.03);
}
:root[data-theme="light"] .video-placeholder { background: rgba(15, 23, 42, 0.03); }
@media (max-width: 560px) { .video-placeholder { border-radius: 10px; } }

/* 电脑端：网盘选择列表 */
.pan-list { display: grid; gap: 10px; }
.pan-option {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  color: var(--fg); font-size: 15px; font-family: inherit; text-align: left;
  transition: all 0.16s;
}
.pan-option:hover {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateX(2px);
}
:root[data-theme="light"] .pan-option { background: rgba(15, 23, 42, 0.035); }
:root[data-theme="light"] .pan-option:hover { background: rgba(99, 102, 241, 0.1); }
.pan-option-name { font-weight: 700; }
.pan-option-arrow { margin-left: auto; font-size: 13px; color: var(--muted); }
.pan-option:hover .pan-option-arrow { color: #c7d2fe; }
:root[data-theme="light"] .pan-option:hover .pan-option-arrow { color: var(--primary); }

/* 评论区：身份提示 */
.comment-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.comment-tip {
  font-size: 13px; color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 10px; padding: 8px 12px;
}
.comment-del {
  margin-left: auto; font-size: 12px; color: var(--muted);
  background: none; border: none; cursor: pointer; padding: 0 2px;
}
.comment-del:hover { color: #ef4444; }
.comment-identity { font-size: 12.5px; color: var(--muted); }
.comment-identity b { color: var(--fg); }
.comment-identity a { color: var(--primary); margin-left: 2px; }

@media (max-width: 560px) {
  .pan-option { padding: 12px 14px; font-size: 14px; }
  .comment-actions { gap: 10px; }
}

.game-video {
  width: 100%; aspect-ratio: 16 / 9; display: block;
  border-radius: 14px; border: 1px solid var(--border);
  background: #000; overflow: hidden;
}
@media (max-width: 560px) {
  .game-video { border-radius: 10px; }
}

.dl-scan-hint {
  display: flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 600; color: var(--fg); margin-bottom: 14px;
}
.qr-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.qr-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 14px 14px; text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.qr-img { width: 152px; height: 152px; }
.qr-img svg { width: 100%; height: 100%; display: block; }
.qr-name { margin-top: 9px; font-size: 13.5px; font-weight: 700; color: #111827; }
.qr-code { margin-top: 3px; font-size: 12.5px; color: #6b7280; }
.qr-code b { color: #111827; font-family: Consolas, monospace; letter-spacing: 0.5px; }

.dl-mobile { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.dl-mobile:last-child { border-bottom: none; padding-bottom: 0; }
.dl-mobile-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px; font-size: 14px;
}
.dl-mobile-head .name { font-weight: 700; }
.dl-mobile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-mobile-actions .btn-primary { box-shadow: none; }

@media (max-width: 560px) {
  .qr-grid { gap: 12px; }
  .qr-card { flex: 1 1 140px; padding: 10px; }
  .qr-img { width: 100%; max-width: 150px; height: auto; aspect-ratio: 1; margin: 0 auto; }
}

.admin-tabs { display: flex; gap: 8px; margin: 4px 0 16px; }
.admin-tabs .chip { cursor: pointer; position: relative; padding: 7px 16px; font-size: 14px; }
.unread-badge {
  display: inline-block; margin-left: 6px;
  min-width: 18px; padding: 1px 5px; border-radius: 999px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 700;
  line-height: 16px; text-align: center; vertical-align: 1px;
}

.comment-card {
  background: var(--card); border: 1px solid var(--border);
  border-left: 3px solid transparent; border-radius: var(--radius);
  padding: 13px 15px; margin-bottom: 10px;
}
.comment-card.is-new { border-left-color: var(--primary); background: rgba(99, 102, 241, 0.07); }
:root[data-theme="light"] .comment-card.is-new { background: rgba(99, 102, 241, 0.06); }

.comment-card-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); margin-bottom: 8px;
}
.comment-card-head .who { color: #c7d2fe; font-weight: 600; }
:root[data-theme="light"] .comment-card-head .who { color: var(--primary); }
.comment-card-head .mail { color: var(--muted); }
.comment-card-head .spacer { flex: 1; }
.comment-card-head .game-link { font-size: 13px; color: var(--muted); }
.comment-card-head .game-link:hover { color: var(--primary); }
.new-tag {
  background: #ef4444; color: #fff; font-size: 11px;
  padding: 1px 6px; border-radius: 999px;
}
.comment-card-body { font-size: 14px; line-height: 1.7; color: var(--fg); white-space: pre-wrap; }

@media (max-width: 560px) {
  .comment-card { padding: 11px 12px; }
  .comment-card-head { gap: 8px; font-size: 12.5px; }
  .comment-card-head .spacer { display: none; }
  .comment-card-body { font-size: 13.5px; }
  .admin-tabs { margin-bottom: 12px; }
}

.rank-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 10px;
  border-bottom: 1px solid var(--border);
  transition: background 0.16s;
}
.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background: rgba(255, 255, 255, 0.05); }
:root[data-theme="light"] .rank-row:hover { background: rgba(15, 23, 42, 0.04); }

.rank-no {
  flex: none; width: 26px; text-align: center;
  font-size: 15px; font-weight: 800; font-style: italic;
  color: var(--muted);
}
.rank-no.top { color: #f59e0b; }
.rank-row:nth-child(2) .rank-no.top { color: #94a3b8; }
.rank-row:nth-child(3) .rank-no.top { color: #f97316; }

.rank-row img {
  width: 76px; height: 43px; object-fit: cover; border-radius: 8px;
  flex: none; border: 1px solid var(--border);
}
.rank-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rank-title {
  font-size: 13.5px; font-weight: 600; color: var(--fg); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rank-row:hover .rank-title { color: #c7d2fe; }
:root[data-theme="light"] .rank-row:hover .rank-title { color: var(--primary); }
.rank-meta { font-size: 11.5px; color: var(--muted); }
.rank-score {
  flex: none; font-size: 15px; font-weight: 700; color: #c7d2fe;
  min-width: 42px; text-align: right;
}
:root[data-theme="light"] .rank-score { color: var(--primary); }

@media (max-width: 560px) {
  .rank-row { gap: 9px; padding: 8px 6px; }
  .rank-row img { width: 62px; height: 35px; }
  .rank-title { font-size: 12.5px; }
  .rank-score { font-size: 14px; min-width: 34px; }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* 宽屏上两边别空太多：内容区放宽，右侧那一栏自然就跟着往右靠了 */
.container { width: 100%; max-width: 1460px; margin: 0 auto; padding: 0 20px; }

/* ---------------- 顶部导航 ---------------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.app-header .inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 62px;
}

.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; white-space: nowrap; }

.brand .logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff; letter-spacing: 0.5px;
}

.brand > span:last-child { min-width: 0; }
.brand small {
  display: block; font-size: 11px; color: var(--muted); font-weight: 400;
  letter-spacing: 0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 7px 13px; border-radius: 9px; color: var(--muted);
  font-size: 14px; transition: all 0.16s;
}
.nav a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.06); }
.nav a.active { color: #fff; background: rgba(99, 102, 241, 0.22); }

.header-search { flex: 1; max-width: 340px; margin-left: auto; }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* ---------------- 搜索框 / 输入框 ---------------- */

input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.16s, background 0.16s;
  width: 100%;
}

input:focus, textarea:focus, select:focus { border-color: var(--primary); background: rgba(99, 102, 241, 0.08); }
input::placeholder, textarea::placeholder { color: #6b7280; }
select option { background: var(--card); color: var(--fg); }
textarea { resize: vertical; min-height: 90px; line-height: 1.7; }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.06);
  color: var(--fg); font-size: 14px; cursor: pointer;
  transition: all 0.16s; white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); }
.btn-primary { background: var(--primary); border-color: transparent; color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); border-color: transparent; color: #04231a; font-weight: 600; }
.btn-danger { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.28); }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------- 首页头图 ---------------- */

.hero {
  margin: 22px 0 8px;
  border-radius: var(--radius);
  padding: 26px 28px;
  background:
    radial-gradient(900px 260px at 12% -30%, rgba(99, 102, 241, 0.45), transparent 60%),
    radial-gradient(700px 220px at 92% 0%, rgba(34, 211, 238, 0.28), transparent 60%),
    linear-gradient(180deg, #161d2f, #121826);
  border: 1px solid var(--border);
}
.hero h1 { margin: 0 0 8px; font-size: 26px; letter-spacing: 0.5px; }
.hero p { margin: 0 0 18px; color: var(--muted); max-width: 640px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- 区块标题 ---------------- */

.section { margin: 28px 0; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 14px; flex-wrap: wrap;
}
.section-head h2 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.section-head h2::before {
  content: ""; width: 4px; height: 17px; border-radius: 2px;
  background: linear-gradient(180deg, #6366f1, #22d3ee);
}
.section-head .more { color: var(--muted); font-size: 13px; }
.section-head .more:hover { color: var(--primary); }

/* ---------------- 游戏卡片 ---------------- */

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

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.18s, border-color 0.18s, background 0.18s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--card-hover); }
.card-cover { position: relative; aspect-ratio: 16 / 9; background: #0d1220; }
.card-cover img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.card-cover img.is-portrait-cover { object-fit: cover; }
.card-cover .badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(11, 15, 25, 0.78); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 999px; font-size: 11px; color: #c7d2fe;
}
.card-cover .hot {
  position: absolute; top: 8px; right: 8px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.card-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title {
  font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--fg);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin: 0;
}
.card:hover .card-title { color: #c7d2fe; }
.card-desc {
  color: var(--muted); font-size: 12.5px; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 12px; margin-top: auto; padding-top: 4px;
  border-top: 1px solid var(--border);
}

/* ---------------- 标签 ---------------- */

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  background: rgba(99, 102, 241, 0.14); border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe; font-size: 11.5px;
}
a.tag:hover { background: rgba(99, 102, 241, 0.3); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 5px 13px; border-radius: 999px; font-size: 13px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; transition: all 0.16s;
}
.chip:hover { color: var(--fg); border-color: var(--border-strong); }
.chip.active { background: rgba(99, 102, 241, 0.24); border-color: rgba(99, 102, 241, 0.55); color: #fff; font-weight: 600; }

/* ---------------- 两栏布局 ---------------- */

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

/*
 * 右侧那一栏（首页的热门推荐 / 本周好评 / 搜索热榜，详情页的猜你喜欢 / 使用须知）
 * 跟着页面一起滚：滑下去的时候它停在顶部不动，不用来回滚上去看。
 * 顶栏是 62px 高的 sticky，所以这里留 76px 的余量。
 */
.layout > aside {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.panel h3 { margin: 0 0 12px; font-size: 15px; }
.panel + .panel { margin-top: 16px; }

.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; counter-reset: rank; }
.rank-list li { counter-increment: rank; }
.rank-list a {
  display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; border-radius: 8px;
  font-size: 13px; color: #d1d5db; line-height: 1.45;
}
.rank-list a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.rank-list a::before {
  content: counter(rank); flex: none; width: 18px; text-align: center;
  font-weight: 700; font-style: italic; color: var(--muted); font-size: 13px;
}
.rank-list li:nth-child(1) a::before { color: #fbbf24; }
.rank-list li:nth-child(2) a::before { color: #cbd5e1; }
.rank-list li:nth-child(3) a::before { color: #f97316; }

/* ---------------- 小卡片（侧栏列表） ---------------- */

.mini {
  display: flex; gap: 10px; align-items: center;
  padding: 7px 8px; border-radius: 10px; transition: background 0.16s;
}
.mini:hover { background: rgba(255, 255, 255, 0.06); }
.mini img {
  width: 66px; height: 38px; border-radius: 8px; object-fit: cover; flex: none;
  border: 1px solid var(--border);
}
.mini-title {
  font-size: 13px; line-height: 1.4; color: #dbe1ea;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mini:hover .mini-title { color: #c7d2fe; }
.mini-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------------- 分页 ---------------- */

.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 26px 0 10px; flex-wrap: wrap; }
.pager button {
  min-width: 36px; height: 34px; padding: 0 10px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  border-radius: 9px; color: var(--muted); cursor: pointer; font-size: 13px;
}
.pager button:hover:not(:disabled) { color: var(--fg); border-color: var(--border-strong); }
.pager button.active { background: var(--primary); border-color: transparent; color: #fff; font-weight: 600; }
.pager button:disabled { opacity: 0.4; cursor: not-allowed; }
.pager .info { color: var(--muted); font-size: 13px; margin: 0 6px; }
.pager-jump { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.pager-jump-input {
  width: 72px; height: 34px; padding: 0 8px; text-align: center;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  border-radius: 9px; color: var(--fg); font: inherit; outline: none;
}
.pager-jump-input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.pager-jump-input::-webkit-inner-spin-button,
.pager-jump-input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.pager-jump-input:focus { border-color: var(--primary); }
.pager-jump-input::placeholder { color: var(--muted); }

/* ---------------- 详情页 ---------------- */

.breadcrumb { color: var(--muted); font-size: 13px; margin: 18px 0 14px; }
.breadcrumb a:hover { color: var(--primary); }

.detail-head { display: grid; grid-template-columns: 480px minmax(0, 1fr); gap: 26px; }
.detail-cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16/9; background: #0d1220; }
.detail-cover img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.detail-cover img.is-portrait-cover { object-fit: cover; }

.detail-title { margin: 0 0 10px; font-size: 21px; line-height: 1.45; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; margin: 12px 0; }

.author-row { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 14px;
}

.download-box {
  margin-top: 16px; padding: 16px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.14), rgba(99, 102, 241, 0.04));
  border: 1px solid rgba(99, 102, 241, 0.35);
}
.download-box .row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px dashed var(--border); flex-wrap: wrap;
}
.download-box .row:last-child { border-bottom: none; }
.download-box .row .name { width: 78px; color: var(--muted); font-size: 13px; flex: none; }
.download-box .row .value {
  flex: 1; min-width: 200px; font-family: Consolas, monospace; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #dbeafe;
}
.code-pill {
  font-family: Consolas, monospace; background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4); color: #6ee7b7;
  padding: 2px 10px; border-radius: 6px; font-size: 13px;
}

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.gallery img { border-radius: var(--radius-sm); border: 1px solid var(--border); aspect-ratio: 16/9; object-fit: cover; width: 100%; }

.article { white-space: pre-wrap; color: #d5dbe5; line-height: 1.9; font-size: 14px; }

/* Steam 风格的图文正文：小标题 + 整宽插图（从 Steam 抓来的简介就是这种排版） */
.article-html { white-space: normal; }
.article-html > :first-child { margin-top: 0; }
.article-html h1, .article-html h2, .article-html h3, .article-html h4 {
  margin: 26px 0 10px; font-size: 17px; font-weight: 600; line-height: 1.5; color: #6cb6ff;
}
.article-html p { margin: 12px 0; }
.article-html ul, .article-html ol { margin: 12px 0; padding-left: 22px; }
.article-html li { margin: 6px 0; list-style: disc; }
.article-html img {
  display: block; width: 100%; height: auto; margin: 16px 0;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.article-html a { color: #7fb2ff; }
.article-html blockquote { margin: 14px 0; padding: 10px 14px; border-left: 3px solid var(--border-strong); color: var(--muted); }
.article-html hr { border: none; border-top: 1px solid var(--border); margin: 22px 0; }
.article-html table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13.5px; }
.article-html td, .article-html th { border: 1px solid var(--border); padding: 6px 10px; }
:root[data-theme="light"] .article-html h1, :root[data-theme="light"] .article-html h2,
:root[data-theme="light"] .article-html h3, :root[data-theme="light"] .article-html h4 { color: #1a6fb5; }
:root[data-theme="light"] .article-html a { color: var(--primary); }

/* Steam 好评率徽章 */
.review-badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 2px; padding: 5px 12px;
  border-radius: 999px; font-size: 13px; border: 1px solid var(--border);
  background: rgba(99, 102, 241, 0.1); color: var(--fg);
}
.review-badge b { color: var(--primary); font-weight: 600; }
.review-badge .review-count, .review-badge-count { color: var(--muted); font-size: 12.5px; }
.review-badge.review-good { border-color: rgba(16, 185, 129, 0.45); background: rgba(16, 185, 129, 0.12); }
.review-badge.review-ok { border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.12); }
.review-badge.review-bad { border-color: rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.12); }

/* 列表卡片封面上的好评率（右下角，紧凑版：只显示标签和百分比） */
.card-cover .card-review { position: absolute; left: 8px; bottom: 8px; z-index: 1; }
.card-review {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; line-height: 1.6; background: rgba(11, 15, 25, 0.78);
  border: 1px solid var(--border); color: #e5e7eb;
}
.card-review b { font-weight: 600; color: #fff; }
.card-review.card-review-good { border-color: rgba(16, 185, 129, 0.6); }
.card-review.card-review-ok { border-color: rgba(245, 158, 11, 0.6); }
.card-review.card-review-bad { border-color: rgba(239, 68, 68, 0.6); }
:root[data-theme="light"] .card-review { background: rgba(255, 255, 255, 0.92); color: #374151; }
:root[data-theme="light"] .card-review b { color: #111827; }

.req-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.req-table th, .req-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.req-table th { color: var(--muted); font-weight: 500; width: 130px; background: rgba(255, 255, 255, 0.03); }
.req-col-title { font-weight: 600; color: #c7d2fe; margin: 0 0 8px; }

/* ---------------- 评论 ---------------- */

.comment { display: flex; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment .who { font-size: 13px; color: #c7d2fe; font-weight: 600; }
.comment .when { font-size: 12px; color: var(--muted); }
.comment .text { margin: 4px 0 0; color: #d5dbe5; font-size: 13.5px; white-space: pre-wrap; }

/* ---------------- 提示 & 状态 ---------------- */

.empty { text-align: center; color: var(--muted); padding: 46px 20px; }
.empty .big { font-size: 34px; margin-bottom: 8px; }
.loading { text-align: center; color: var(--muted); padding: 40px; }

.toast-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: rgba(21, 27, 43, 0.97); border: 1px solid var(--border-strong);
  border-left: 3px solid var(--primary);
  padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13.5px;
  animation: slideIn 0.2s ease;
}
.toast.ok { border-left-color: var(--success); }
.toast.err { border-left-color: var(--danger); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.skeleton { background: linear-gradient(90deg, #151b2b, #1e2637, #151b2b); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------------- 后台编辑界面（仅内部使用） ---------------- */

.login-wrap { max-width: 380px; margin: 80px auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 17px; }
.stat .num { font-size: 24px; font-weight: 700; letter-spacing: 0.5px; }
.stat .label { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .grow { flex: 1; min-width: 180px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 780px; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { color: var(--muted); font-weight: 500; background: rgba(255, 255, 255, 0.03); white-space: nowrap; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: rgba(255, 255, 255, 0.03); }
table.data .title-cell { max-width: 340px; }
table.data .title-cell a { color: #c7d2fe; }
table.data .title-cell a:hover { text-decoration: underline; }
/* 按钮多了要能换行（后台那排有新增/导入/导出/一键清空/删除选中…） */
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 评论区：主楼 + 回复（2026-10-15 新增） ---------- */
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.comment-head .reply-to { font-size: 12.5px; color: var(--muted); }
.comment-head .reply-to b { color: var(--primary); font-weight: 600; }
.comment-tools { margin-left: auto; display: flex; gap: 10px; }
.comment-reply {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--muted); font-size: 12.5px; font-family: inherit;
}
.comment-reply:hover { color: var(--primary); }
.comment-replies {
  margin-top: 10px; padding-left: 12px;
  border-left: 2px solid var(--border-strong);
  display: flex; flex-direction: column; gap: 10px;
}
.comment.is-reply { border-bottom: none; padding: 0; }
.comment.is-reply .avatar { width: 26px; height: 26px; font-size: 12px; }
.reply-slot:empty { display: none; }
.reply-form { margin-top: 10px; display: grid; gap: 8px; }
.reply-form textarea { min-height: 62px; }
.reply-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reply-actions .hint { margin-right: auto; }
:root[data-theme="light"] .comment .text { color: #374151; }
:root[data-theme="light"] .comment .who { color: var(--primary); }

/* 后台评论列表：标出这是一条回复 */
.comment-card-head .reply-tag { font-size: 12.5px; color: var(--primary); }

/* ============================================================
   前台账号：登录 / 注册 / 个人中心 / 评论头像 / 收藏
   ============================================================ */

/* 顶栏用户区 */
.header-user { display: flex; align-items: center; gap: 8px; }
.header-user-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px;
  border-radius: 10px; color: var(--fg); font-size: 13px;
}
.header-user-link:hover { background: var(--card-hover); }
.header-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.header-user-name { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: #fff; font-weight: 700; border-radius: 50%; flex: none;
}
.admin-badge {
  font-size: 11px; line-height: 1.6; padding: 1px 7px; border-radius: 999px;
  background: rgba(99, 102, 241, 0.14); color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.35); white-space: nowrap; font-weight: 600;
}

/* 登录 / 注册页 */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 28px 16px; }
.auth-wrap { width: 100%; max-width: 430px; }
.auth-brand {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 20px; font-weight: 700; margin-bottom: 18px; color: var(--fg);
}
.auth-brand .logo {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  display: grid; place-items: center; font-size: 16px; font-weight: 800; color: #fff;
}
.auth-brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 24px; box-shadow: var(--shadow);
}
.auth-tabs {
  display: flex; gap: 6px; background: var(--bg-soft); border: 1px solid var(--border);
  padding: 4px; border-radius: 12px; margin-bottom: 18px;
}
.auth-tab {
  flex: 1; padding: 9px; border: none; border-radius: 9px; background: none;
  color: var(--muted); font-size: 14px; font-family: inherit; cursor: pointer;
}
.auth-tab.active {
  background: var(--card); color: var(--fg); font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.auth-form { display: grid; gap: 14px; }
.auth-error { color: #ef4444; font-size: 13px; }
.auth-submit { width: 100%; }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--primary); }
.auth-foot {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted); text-align: center; line-height: 1.7;
}
.auth-back { display: block; text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted); }
.auth-back:hover { color: var(--primary); }

/* 个人中心 */
.account-page { padding: 24px 20px 44px; }
.account-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.account-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 16px; text-align: center;
}
.account-avatar {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.account-nick { font-size: 16px; font-weight: 600; }
.account-username { font-size: 13px; color: var(--muted); margin-top: 2px; }
.account-since { font-size: 12px; color: var(--muted); margin-top: 8px; }
.account-menu {
  margin-top: 14px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 4px;
}
.account-menu button {
  text-align: left; padding: 10px 12px; border: none; border-radius: 8px;
  background: none; color: var(--fg); font-size: 14px; font-family: inherit; cursor: pointer;
}
.account-menu button:hover { background: var(--card-hover); }
.account-menu button.active { background: rgba(99, 102, 241, 0.12); color: var(--primary); font-weight: 600; }
.account-pane { padding: 22px; }
.account-pane-title { font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.account-actions { display: flex; justify-content: flex-end; margin-top: 16px; }

/* 评论头像 / 登录提示 */
.comment-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; font-size: 13px; }
.comment.is-reply .comment-avatar { width: 26px; height: 26px; font-size: 12px; }
.comment-avatar-sm { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: -6px; margin-right: 4px; font-size: 11px; }
.author-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.comment-login-tip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 16px; border: 1px dashed var(--border-strong);
  border-radius: 12px; color: var(--muted);
}

@media (max-width: 860px) {
  .account-layout { grid-template-columns: 1fr; }
  .header-user-name { display: none; }
  .header-user .btn-sm { padding: 5px 10px; font-size: 12.5px; }
}

/* ---------- 视觉美化（2026-10-20） ---------- */

/* 登录页：渐变背景 + 顶部彩条 + 更饱满的输入框和按钮 */
.auth-page {
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(99, 102, 241, 0.22), transparent 65%),
    radial-gradient(820px 460px at 105% 108%, rgba(34, 211, 238, 0.18), transparent 62%),
    var(--bg);
}
.auth-card {
  position: relative; overflow: hidden;
  border-color: rgba(99, 102, 241, 0.22);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.16);
}
.auth-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #6366f1, #22d3ee 55%, #6366f1);
}
.auth-hero { text-align: center; margin: 6px 0 18px; }
.auth-hero-title { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.auth-hero-sub { margin-top: 6px; font-size: 13px; color: var(--muted); }
.auth-card .field input { height: 44px; }
.auth-card .field input:focus {
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}
.auth-submit {
  height: 44px; border-radius: 11px; font-size: 15px; font-weight: 600;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.28);
  transition: transform 0.15s, box-shadow 0.15s;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(79, 70, 229, 0.32); }

/* 个人中心：顶部渐变横幅 + 头像浮在上面 */
.account-card { position: relative; overflow: hidden; padding-top: 54px; }
.account-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 92px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.92), rgba(34, 211, 238, 0.75));
}
.account-avatar {
  position: relative; margin-top: -46px;
  border: 4px solid var(--card);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}
.account-menu button { transition: background 0.15s, color 0.15s, transform 0.15s; }
.account-menu button:hover { transform: translateX(2px); }
.account-pane { animation: paneIn 0.22s ease-out; }
@keyframes paneIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.account-pane-title { display: flex; align-items: center; gap: 8px; }
.account-pane-title::before {
  content: ''; width: 4px; height: 18px; border-radius: 2px;
  background: linear-gradient(180deg, #6366f1, #22d3ee);
}
.avatar-row .profile-avatar { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12); }
#favorites-grid .card { animation: paneIn 0.25s ease-out; }

/* 顶栏头像 / 管理员标识 / 评论头像 */
.header-avatar { box-shadow: 0 0 0 2px var(--card), 0 0 0 3px rgba(99, 102, 241, 0.35); }
.header-user .btn-primary { box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25); }
.comment-avatar { border: 2px solid var(--border); }
.admin-badge {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(34, 211, 238, 0.18));
  border-color: rgba(99, 102, 241, 0.45);
}
.comment-login-tip {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(34, 211, 238, 0.06));
  border-color: rgba(99, 102, 241, 0.35);
}
.comment-login-tip::before { content: '🔒'; font-size: 18px; }

/* 收藏按钮 */
#btn-fav { transition: all 0.18s; }
#btn-fav.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: transparent;
}

@media (max-width: 860px) {
  .auth-card { padding: 20px 16px; }
  .account-card { padding-top: 48px; }
  .account-menu { flex-direction: row; flex-wrap: wrap; }
  .account-menu button { flex: 1 1 45%; text-align: center; }
}

/* 后台：注册用户表格 */
.table-avatar {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
}
.table-avatar-fallback {
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: #fff; font-weight: 700; font-size: 13px;
}
#tab-users .data td { vertical-align: middle; }

/* ============================================================
   常见问题页
   ============================================================ */

.faq-page { padding: 18px 20px 46px; }
.faq-hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 34px 30px;
  background: linear-gradient(120deg, rgba(99, 102, 241, 0.16), rgba(34, 211, 238, 0.12));
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.faq-hero::after {
  content: 'FAQ'; position: absolute; right: 24px; bottom: -30px;
  font-size: 120px; font-weight: 800; letter-spacing: 4px; color: rgba(99, 102, 241, 0.08);
  pointer-events: none;
}
.faq-kicker { font-size: 12px; letter-spacing: 2px; color: var(--primary); font-weight: 700; }
.faq-hero h1 { margin: 8px 0; font-size: 30px; letter-spacing: -0.5px; }
.faq-hero p { color: var(--muted); max-width: 620px; line-height: 1.8; }
.faq-search { position: relative; margin-top: 18px; max-width: 560px; }
.faq-search input {
  width: 100%; height: 46px; padding: 0 16px 0 42px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--card); color: var(--fg);
  font-size: 14px; font-family: inherit;
}
.faq-search input:focus {
  outline: none; border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}
.faq-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); opacity: 0.6; }
.faq-stats { display: flex; gap: 18px; margin-top: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.faq-stats b { color: var(--primary); font-size: 15px; }

.faq-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; margin-top: 22px; align-items: start; }
.faq-toc {
  position: sticky; top: 78px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px;
}
.faq-toc-title { font-weight: 700; padding: 4px 10px 8px; font-size: 14px; }
.faq-toc a { padding: 9px 10px; border-radius: 9px; color: var(--muted); font-size: 13.5px; transition: background 0.15s, color 0.15s; }
.faq-toc a:hover { background: var(--card-hover); color: var(--fg); }
.faq-toc a.active { background: rgba(99, 102, 241, 0.12); color: var(--primary); font-weight: 600; }
.faq-toc-actions { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.faq-toc-actions button {
  flex: 1; padding: 7px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--muted); font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.faq-toc-actions button:hover { border-color: rgba(99, 102, 241, 0.5); color: var(--primary); }

.faq-section {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; margin-bottom: 20px; scroll-margin-top: 90px;
}
.faq-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.faq-section-head h2 { font-size: 19px; display: flex; align-items: center; gap: 9px; margin: 0; }
.faq-section-icon { font-size: 20px; }
.faq-section-count {
  font-size: 12px; color: var(--muted); background: var(--bg-soft);
  border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}

.faq-item {
  border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px;
  overflow: hidden; background: var(--bg-soft); transition: border-color 0.15s, background 0.15s;
}
.faq-item:hover { border-color: rgba(99, 102, 241, 0.35); }
.faq-item[open] { border-color: rgba(99, 102, 241, 0.4); background: var(--card); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; font-size: 14.5px; font-weight: 600; color: var(--fg);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-num {
  flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #6366f1, #22d3ee);
}
.faq-q { flex: 1; }
.faq-arrow { color: var(--muted); transition: transform 0.18s; }
.faq-item[open] .faq-arrow { transform: rotate(180deg); color: var(--primary); }
.faq-a { padding: 0 16px 16px 58px; color: var(--muted); font-size: 13.8px; line-height: 1.8; }
.faq-a p { margin: 8px 0; }
.faq-a ul, .faq-a ol { margin: 8px 0; padding-left: 20px; }
.faq-a li { margin: 5px 0; }
.faq-a b { color: var(--fg); }
.faq-a a { color: var(--primary); }
.faq-a code {
  background: var(--bg); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px;
  font-size: 12.5px; color: var(--primary); word-break: break-all;
}
.faq-note {
  margin: 10px 0; padding: 10px 12px; border-left: 3px solid var(--warning);
  background: rgba(245, 158, 11, 0.08); border-radius: 8px; color: var(--fg); font-size: 13px;
}
.faq-note-strong { border-left-color: var(--danger); background: rgba(239, 68, 68, 0.08); margin-top: 14px; }

.faq-checklist { display: grid; gap: 10px; }
.faq-check {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft);
  font-size: 13.8px; color: var(--fg);
}
.faq-check span {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--primary); background: rgba(99, 102, 241, 0.12);
}
.faq-intro {
  padding: 12px 14px; margin-bottom: 14px; border-radius: 10px; background: var(--bg-soft);
  border: 1px dashed var(--border-strong); color: var(--muted); font-size: 13.5px; line-height: 1.8;
}

.faq-contact {
  text-align: center; padding: 34px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(34, 211, 238, 0.08));
  border-color: rgba(99, 102, 241, 0.25);
}
.faq-contact-icon { font-size: 34px; }
.faq-contact h2 { font-size: 20px; margin: 8px 0; }
.faq-contact p { color: var(--muted); max-width: 520px; margin: 0 auto 16px; line-height: 1.8; }
.faq-contact-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.faq-empty { padding: 30px; text-align: center; color: var(--muted); }
.faq-item[hidden], .faq-section[hidden] { display: none; }

@media (max-width: 900px) {
  .faq-layout { grid-template-columns: 1fr; }
  .faq-toc { position: static; flex-direction: row; flex-wrap: wrap; }
  .faq-toc-title { width: 100%; }
  .faq-toc a { flex: 1 1 45%; text-align: center; }
  .faq-toc-actions { width: 100%; }
  .faq-a { padding-left: 16px; }
  .faq-hero { padding: 26px 20px; }
  .faq-hero h1 { font-size: 24px; }
}

.modal-mask {
  position: fixed; inset: 0; background: rgba(4, 7, 14, 0.72);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 30px 16px; z-index: 150; overflow-y: auto;
}
.modal {
  width: 100%; max-width: 860px; background: var(--bg-soft);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 18px 20px; display: grid; gap: 14px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.close-x { background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; }
.close-x:hover { color: #fff; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--muted); }
.hint { color: var(--muted); font-size: 12.5px; }

/* ---------------- 页脚 ---------------- */

.site-footer {
  margin-top: 46px; padding: 26px 0 34px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px;
}
.site-footer .inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a:hover { color: var(--primary); }

/* ---------------- 响应式 ---------------- */

/* ===========================================================
   视觉优化：卡片质感、按钮渐变、Hero 层次、访问趋势图
   =========================================================== */

/* 卡片：封面底部加渐变，悬停更立体 */
.card { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); }
.card-cover::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 45%;
  background: linear-gradient(180deg, transparent, rgba(6, 10, 18, 0.55));
  transition: opacity 0.18s;
}
.card:hover { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); }
:root[data-theme="light"] .card { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); }
:root[data-theme="light"] .card:hover { box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12); }
:root[data-theme="light"] .card-cover::after { background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.16)); }

/* 主按钮：加一点渐变和投影 */
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}
.btn-primary:hover { background: linear-gradient(135deg, #7c7ff5, #4338ca); }
:root[data-theme="light"] .btn-primary { background: linear-gradient(135deg, #6366f1, #4f46e5); }

/* 面板与区块 */
.panel { border-radius: 16px; }
.section-head { margin-bottom: 16px; }
.section-head h2 { letter-spacing: 0.3px; }

/* Hero 首屏 */
.hero-inner { display: flex; align-items: center; gap: 18px; }
.hero-avatar {
  width: 86px; height: 86px; flex: none;
  border-radius: 22px; object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}
:root[data-theme="light"] .hero-avatar { border-color: rgba(15, 23, 42, 0.12); box-shadow: 0 10px 22px rgba(15, 23, 42, 0.15); }
@media (max-width: 860px) {
  .hero-inner { gap: 14px; }
  .hero-avatar { width: 64px; height: 64px; border-radius: 16px; }
}

.hero { position: relative; overflow: hidden; border-radius: 18px; }
.hero::before {
  content: ''; position: absolute; top: -45%; right: -8%; width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.38), transparent 70%);
  pointer-events: none;
}
.hero h1 { font-size: 28px; letter-spacing: 0.5px; }
.hero-stats {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 18px; color: var(--muted); font-size: 13px;
}
.hero-stats b { color: var(--fg); font-size: 16px; font-weight: 700; margin: 0 2px; }
.hero-stats .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); }

/* 详情页封面投影 */
.detail-cover { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
:root[data-theme="light"] .detail-cover { box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12); }

/* 后台：最近 7 天访问趋势 */
.visit-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 20px; }
.visit-bar {
  flex: 1; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
}
.visit-bar-count { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.visit-bar-fill {
  width: 100%; max-width: 48px; min-height: 3px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #6366f1, #22d3ee);
  transition: height 0.3s;
}
.visit-bar-day { font-size: 11.5px; color: var(--muted); margin-top: 8px; }

/* 细一点的滚动条（桌面浏览器） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.35); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .detail-head { grid-template-columns: minmax(0, 1fr); }
  /* 窄屏下右侧栏会掉到正文下面，就不用"跟着滚"了 */
  .layout > aside { position: static; max-height: none; overflow: visible; }
}

@media (max-width: 860px) {
  /* 手机/平板：品牌和按钮占一行，导航可横向滑动，搜索框独占一行 */
  .app-header .inner {
    height: auto; padding: 10px 0; flex-wrap: wrap; gap: 10px 12px; align-items: center;
  }
  .brand { order: 1; flex: 1 1 auto; min-width: 0; gap: 8px; font-size: 16px; }
  .brand .logo { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
  .brand small { font-size: 10px; letter-spacing: 0.2px; }
  .header-actions { order: 2; margin-left: auto; gap: 8px; }
  .header-actions .btn-sm { padding: 6px 12px; font-size: 13px; }
  .theme-toggle { width: 32px; height: 32px; font-size: 14px; }
  .nav {
    order: 3; flex-basis: 100%; width: 100%;
    overflow-x: auto; white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding: 2px 0;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 11px; font-size: 13.5px; }
  .header-search { order: 4; flex-basis: 100%; max-width: none; margin: 0; }
  .hero { padding: 20px; margin-top: 16px; }
  .hero h1 { font-size: 23px; }
  .hero p { font-size: 13.5px; }
  .hero-stats { gap: 9px; font-size: 12.5px; margin-bottom: 14px; }
  .hero-stats b { font-size: 15px; }
  .visit-chart { gap: 6px; height: 130px; }
  .visit-bar-fill { max-width: 32px; }
  .visit-bar-day { font-size: 10.5px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .container { padding: 0 14px; }
  .section { margin: 20px 0; }
  .section-head h2 { font-size: 16px; }
  .hero { padding: 16px 15px; }
  .hero h1 { font-size: 19px; }
  .hero p { font-size: 13px; margin-bottom: 14px; }
  .hero-stats { flex-wrap: wrap; gap: 7px; font-size: 12px; }
  .hero-stats b { font-size: 14px; }
  .hero-stats .dot { display: none; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { padding: 8px 14px; font-size: 13px; }
  .detail-title { font-size: 18px; }
  .detail-meta { gap: 10px; font-size: 12.5px; }
  .download-box { padding: 13px; }
  .download-box .row .name { width: 64px; font-size: 12.5px; }
  .download-box .row .value { font-size: 12px; min-width: 140px; }
  .modal-mask { padding: 14px 10px; }
  .modal-body { padding: 15px; }
  .modal-foot { padding: 12px 15px; }
  .pager button { min-width: 32px; height: 32px; font-size: 12.5px; }
  .panel { padding: 13px; }
  .req-table th, .req-table td { padding: 7px 9px; font-size: 12.5px; }
  .site-footer .inner { flex-direction: column; gap: 8px; }
}

/* ---------------- 点图看大图 ---------------- */

.zoomable { cursor: zoom-in; }
.detail-cover img.zoomable:hover,
.gallery img.zoomable:hover { filter: brightness(1.06); }

.lightbox {
  position: fixed; inset: 0; z-index: 220;
  background: rgba(3, 6, 12, 0.93);
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  animation: lb-in 0.16s ease-out;
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox .lb-img {
  max-width: min(1500px, 94vw);
  max-height: 88vh;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 10px;
  background: #0b0f19;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.65);
  cursor: zoom-out;
}

.lightbox .lb-btn {
  position: fixed;
  display: grid; place-items: center;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.lightbox .lb-btn:hover { background: rgba(99, 102, 241, 0.42); border-color: rgba(99, 102, 241, 0.7); }

.lightbox .lb-close {
  top: 16px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 22px; line-height: 1;
}
.lightbox .lb-prev,
.lightbox .lb-next {
  top: 50%; transform: translateY(-50%);
  width: 46px; height: 68px; border-radius: 12px;
  font-size: 30px; line-height: 1;
}
.lightbox .lb-prev { left: 18px; }
.lightbox .lb-next { right: 18px; }

.lightbox .lb-count {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: #cbd5e1; font-size: 13px; letter-spacing: 0.5px;
  background: rgba(15, 23, 42, 0.6); padding: 4px 12px; border-radius: 999px;
}
.lightbox .lb-count:empty { display: none; }

@media (max-width: 560px) {
  .lightbox { padding: 12px; }
  .lightbox .lb-img { max-width: 96vw; max-height: 82vh; }
  .lightbox .lb-prev, .lightbox .lb-next { width: 38px; height: 56px; font-size: 24px; }
  .lightbox .lb-prev { left: 8px; }
  .lightbox .lb-next { right: 8px; }
  .lightbox .lb-close { top: 10px; right: 12px; width: 36px; height: 36px; }
}

/* 导航加到 6 项后，中等宽度的电脑上收一点间距，避免挤到搜索框 */
@media (min-width: 861px) and (max-width: 1200px) {
  .nav a { padding: 7px 9px; font-size: 13.5px; }
  .nav { gap: 2px; }
  .header-search { max-width: 240px; }
}

/* ---------------- 图片悬停反馈（鼠标放上去有动静） ---------------- */

.card-cover { overflow: hidden; }
.card-cover img { transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1); }
.card:hover .card-cover img { transform: none; }

.detail-cover img { transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1); }
.detail-cover:hover img { transform: none; }

.gallery img {
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 0.25s, box-shadow 0.25s, filter 0.25s;
}
.gallery img:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.32);
}
:root[data-theme="light"] .gallery img:hover { box-shadow: 0 14px 24px rgba(15, 23, 42, 0.14); }

.mini img { transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.25s; }
.mini:hover img { transform: scale(1.06); border-color: rgba(99, 102, 241, 0.55); }

/* 触屏设备没有 hover，关掉放大避免点完"卡住" */
@media (hover: none) {
  .card:hover .card-cover img,
  .detail-cover:hover img,
  .gallery img:hover,
  .mini:hover img { transform: none; }
}

/* ---------------- 详情页右侧：使用须知（必看） ---------------- */

.guide-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.guide-head h3 { margin: 0; font-size: 15px; }
.guide-badge {
  flex: none;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  padding: 2px 8px; border-radius: 999px;
}

.guide-meta {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px; padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.guide-meta > div { display: flex; gap: 8px; font-size: 12.5px; }
.guide-key { color: var(--muted); flex: none; }
.guide-val { color: #dbe1ea; word-break: break-all; }
:root[data-theme="light"] .guide-val { color: #1f2937; }

.guide-item + .guide-item { margin-top: 13px; }
.guide-item-title { font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #c7d2fe; }
:root[data-theme="light"] .guide-item-title { color: #4338ca; }
.guide-item p { margin: 0; font-size: 12.5px; line-height: 1.75; color: var(--muted); }

/* 列表页：「最新发布 / 热门推荐」两个快捷按钮（虚线框，和分类区分开） */
.chip-quick {
  border-style: dashed;
  border-color: rgba(99, 102, 241, 0.5);
  color: #c7d2fe;
}
.chip-quick::before { margin-right: 5px; font-size: 12px; }
.chip-quick[data-order="update"]::before { content: '🕒'; }
.chip-quick[data-order="score"]::before { content: '🔥'; }
.chip-quick:hover { border-style: solid; }
.chip-quick.active { border-style: solid; }
:root[data-theme="light"] .chip-quick { color: #4338ca; }

/* ---------------- 首页信息层级与分类入口 ---------------- */

.home-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas:
    "hero community"
    "gacha gacha";
  gap: 16px;
  align-items: stretch;
  margin: 22px 0 8px;
}
.home-overview > .home-hero { grid-area: hero; margin: 0; }
.home-overview > .gacha { grid-area: gacha; margin: 0; }
.home-overview > .community-panel { grid-area: community; height: 100%; margin: 0; }

.home-hero {
  padding: 26px 30px;
  border-radius: 20px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}
.home-hero .hero-inner { align-items: center; }
.home-hero .hero-avatar { width: 96px; height: 96px; border-radius: 22px; }
.home-hero h1 { font-size: 30px; }
.hero-kicker,
.list-kicker {
  display: inline-block;
  color: #a5b4fc;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.7px;
}
.hero-kicker { margin-bottom: 12px; }
.hero-lead {
  max-width: 720px;
  margin: 16px 0 12px !important;
  color: #cbd5e1 !important;
  font-size: 14.5px;
  line-height: 1.85;
}
.home-hero .hero-stats { margin-bottom: 20px; }
.home-hero .hero-actions .btn { min-width: 150px; }

.category-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 6px;
}
.category-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.category-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.45);
  background: var(--card-hover);
}
.category-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.category-icon-pc { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.category-icon-mobile { background: linear-gradient(135deg, #0ea5e9, #22d3ee); }
.category-icon-tool { background: linear-gradient(135deg, #f59e0b, #f97316); }
.category-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.category-copy strong { font-size: 14.5px; }
.category-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.category-count { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.category-count b { color: var(--primary); font-size: 16px; }

.section-heading { display: flex; flex-direction: column; gap: 1px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12.5px; }

/* ---------------- 列表页标题与筛选区 ---------------- */

.list-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(620px 180px at 0% 0%, rgba(99, 102, 241, 0.2), transparent 70%),
    linear-gradient(135deg, var(--card), var(--bg-soft));
}
.list-hero h1 { margin: 5px 0; font-size: 27px; line-height: 1.3; }
.list-subtitle { margin: 0; color: var(--muted); font-size: 13.5px; }
.list-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: none;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
}
.list-count b { color: var(--fg); font-size: 24px; line-height: 1; }
.filter-panel { display: flex; flex-direction: column; gap: 12px; padding: 15px 18px; margin: 14px 0 18px; }
.filter-group { display: flex; align-items: flex-start; gap: 12px; }
.filter-label {
  flex: none;
  width: 38px;
  padding-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
}
.filter-group .chips { flex: 1; }

.site-footer .footer-brand { display: flex; flex-direction: column; gap: 2px; }
.site-footer .footer-brand strong { color: var(--fg); font-size: 14px; }
.site-footer .footer-brand span { color: var(--muted); font-size: 12px; }
.site-footer .footer-links { align-self: center; }

:root[data-theme="light"] .hero-kicker,
:root[data-theme="light"] .list-kicker { color: #4338ca; }
:root[data-theme="light"] .hero-lead { color: #475569 !important; }
:root[data-theme="light"] .list-count { background: rgba(15, 23, 42, 0.035); }

@media (max-width: 760px) {
  .home-hero { padding: 20px 18px; }
  .home-hero h1 { font-size: 24px; }
  .home-hero .hero-avatar { width: 76px; height: 76px; border-radius: 18px; }
  .hero-lead { font-size: 13.5px; }
  .category-strip { grid-template-columns: 1fr; gap: 8px; }
  .category-card { padding: 12px 13px; }
  .category-icon { width: 40px; height: 40px; border-radius: 11px; }
  .list-hero { align-items: flex-start; flex-direction: column; padding: 20px 18px; gap: 14px; }
  .list-hero h1 { font-size: 22px; }
  .list-count { align-self: flex-start; }
  .filter-group { display: block; }
  .filter-label { display: block; width: auto; padding: 0 0 6px; }
  .site-footer .footer-links { align-self: flex-start; line-height: 1.9; }
}

/* ---------------- 首页资源扭蛋 ---------------- */

.gacha {
  display: grid;
  grid-template-columns: minmax(280px, 0.6fr) minmax(0, 1.4fr);
  margin: 20px 0 10px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 20px;
  background:
    radial-gradient(700px 260px at 15% 20%, rgba(99, 102, 241, 0.18), transparent 70%),
    radial-gradient(520px 220px at 95% 85%, rgba(34, 211, 238, 0.13), transparent 70%),
    var(--card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}
.gacha-control { padding: 26px; }
.gacha-eyebrow,
.gacha-reveal-label {
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
}
.gacha-control h2 { margin: 8px 0 6px; font-size: 25px; }
.gacha-control > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.gacha-select-label { display: block; margin-top: 20px; color: var(--muted); font-size: 12px; font-weight: 600; }
#gacha-category { margin-top: 7px; cursor: pointer; }
.gacha-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  padding: 13px 18px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28);
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
}
.gacha-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(79, 70, 229, 0.36); }
.gacha-button:disabled { opacity: 0.65; cursor: wait; }
.gacha-button-icon { font-size: 24px; line-height: 1; }
.gacha-button b,
.gacha-button small { display: block; }
.gacha-button b { font-size: 15px; }
.gacha-button small { margin-top: 2px; color: rgba(255, 255, 255, 0.72); font-size: 11px; }
.gacha-status { min-height: 20px; margin-top: 12px !important; font-size: 11.5px !important; }
.gacha-result {
  position: relative;
  min-height: 430px;
  padding: 20px;
  border-left: 1px solid var(--border);
  background: rgba(11, 15, 25, 0.22);
}
.gacha-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  height: 100%;
  min-height: 290px;
  text-align: center;
}
.gacha-placeholder h3 { margin: 0 0 4px; font-size: 17px; }
.gacha-placeholder p { margin: 0; color: var(--muted); font-size: 12.5px; }
.gacha-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 112px;
  border: 1px solid rgba(165, 180, 252, 0.55);
  border-radius: 48% 48% 44% 44%;
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.34), transparent 22%),
    linear-gradient(145deg, #6366f1, #3730a3);
  box-shadow:
    inset -10px -12px 24px rgba(15, 23, 42, 0.28),
    inset 8px 10px 20px rgba(255, 255, 255, 0.08),
    0 18px 32px rgba(49, 46, 129, 0.32);
  animation: gacha-float 3.2s ease-in-out infinite;
}
.gacha-orb::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.75);
}
.gacha-result.is-drawing .gacha-orb {
  animation: gacha-roll 0.55s linear infinite;
}
.gacha-result.is-drawing::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 360px;
  height: 360px;
  margin: -180px 0 0 -180px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(165, 180, 252, 0.22), transparent 30%);
  animation: gacha-spin 1.15s linear infinite;
  pointer-events: none;
}
@keyframes gacha-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}
@keyframes gacha-roll {
  0% { transform: rotate(0deg) scale(1); }
  40% { transform: rotate(9deg) scale(1.08); }
  70% { transform: rotate(-7deg) scale(0.96); }
  100% { transform: rotate(360deg) scale(1); }
}
@keyframes gacha-spin {
  to { transform: rotate(360deg); }
}
@keyframes gacha-reveal {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.gacha-game {
  display: grid;
  grid-template-columns: minmax(300px, 52%) minmax(0, 1fr);
  gap: 18px;
  height: 100%;
  animation: gacha-reveal 0.42s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.gacha-cover {
  display: block;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0d1220;
}
.gacha-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.gacha-game-body { display: flex; flex-direction: column; min-width: 0; }
.gacha-game-body h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 8px;
  font-size: 19px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.gacha-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.gacha-meta { display: flex; gap: 12px; margin-top: auto; padding-top: 10px; color: var(--muted); font-size: 11.5px; }
.gacha-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.gacha-actions .btn { padding: 7px 13px; font-size: 12.5px; }
:root[data-theme="light"] .gacha-eyebrow,
:root[data-theme="light"] .gacha-reveal-label { color: #4338ca; }
:root[data-theme="light"] .gacha-result { background: rgba(99, 102, 241, 0.035); }

/* 首页侧栏：交流群、会员入口与本周口碑 */
.community-panel { overflow: hidden; }
.community-panel-head { margin-bottom: 13px; }
.community-kicker {
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}
.community-panel-head h3 { margin: 4px 0 0; }
.home-overview .community-panel { display: flex; flex-direction: column; justify-content: center; }
.community-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s, border-color 0.16s, background 0.16s;
}
.community-action:hover {
  transform: translateX(2px);
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.08);
}
.community-action + .community-action { margin-top: 8px; }
.community-action-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(99, 102, 241, 0.14);
}
.community-action > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.community-action b { font-size: 13px; }
.community-action small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.community-action-group { background: linear-gradient(135deg, rgba(99, 102, 241, 0.17), rgba(34, 211, 238, 0.06)); }
.week-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.week-panel-head h3 { margin: 0; }
.week-panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 11.5px; }
.week-panel-head a { flex: none; padding-top: 2px; color: var(--muted); font-size: 11px; }
.week-panel-head a:hover { color: var(--primary); }
.week-list { display: flex; flex-direction: column; }
.week-item {
  display: grid;
  grid-template-columns: 24px 70px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--border);
  transition: background 0.16s;
}
.week-item:last-child { border-bottom: 0; }
.week-item:hover { background: rgba(99, 102, 241, 0.06); }
.week-rank { color: var(--muted); font-size: 12px; font-weight: 800; font-style: italic; text-align: center; }
.week-item:nth-child(1) .week-rank { color: #f59e0b; }
.week-item:nth-child(2) .week-rank { color: #94a3b8; }
.week-item:nth-child(3) .week-rank { color: #f97316; }
.week-item img { width: 70px; height: 43px; border: 1px solid var(--border); border-radius: 7px; object-fit: cover; }
.week-info { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.week-info strong {
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.week-info > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.week-tags { display: none; }
.week-tags span { color: var(--muted); font-size: 10px; }
.week-tags span + span::before { content: " · "; }
.week-score { display: flex; flex-direction: column; align-items: flex-end; }
.week-score b { color: var(--primary); font-size: 13px; }
.week-score small { color: var(--muted); font-size: 9.5px; }
:root[data-theme="light"] .community-action:hover { background: rgba(99, 102, 241, 0.06); }

@media (max-width: 900px) {
  .home-overview {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "gacha"
      "community";
    gap: 14px;
  }
  .home-overview > .community-panel { height: auto; }
  .gacha { grid-template-columns: 1fr; }
  .gacha-result { border-top: 1px solid var(--border); border-left: 0; }
}
@media (max-width: 760px) {
  .home-overview { margin-top: 16px; }
  .gacha-game { grid-template-columns: 1fr; }
  .gacha-cover { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  .gacha { margin-top: 14px; border-radius: 16px; }
  .gacha-control { padding: 19px 16px; }
  .gacha-control h2 { font-size: 21px; }
  .gacha-result { min-height: 0; padding: 16px; }
  .gacha-placeholder { min-height: 220px; }
  .week-item { grid-template-columns: 22px 62px minmax(0, 1fr); }
  .week-item img { width: 62px; height: 38px; }
  .week-score { grid-column: 3; grid-row: 2; flex-direction: row; gap: 3px; align-items: baseline; }
}

/* ---------------- 会员中心 ---------------- */

.member-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 26px 28px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 20px;
  background:
    radial-gradient(700px 220px at 0% 0%, rgba(99, 102, 241, 0.2), transparent 70%),
    radial-gradient(500px 180px at 100% 100%, rgba(34, 211, 238, 0.12), transparent 70%),
    var(--card);
}
.member-kicker {
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.7px;
}
.member-hero h1 { margin: 6px 0 4px; font-size: 28px; }
.member-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.member-hero-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex: none;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}
.member-hero-status span { color: var(--muted); font-size: 10.5px; }
.member-hero-status strong { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.member-hero-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.7);
}
.account-role {
  display: inline-flex;
  margin-top: 10px;
  padding: 3px 10px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 999px;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  font-size: 11px;
  font-weight: 700;
}
.account-bio {
  display: -webkit-box;
  overflow: hidden;
  min-height: 38px;
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.account-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 14px 0 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--border);
}
.account-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 6px;
  background: var(--card);
}
.account-stats b { color: var(--primary); font-size: 20px; line-height: 1.2; }
.account-stats span { color: var(--muted); font-size: 10.5px; }
.account-last-login {
  margin-top: 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.member-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.member-quick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s, border-color 0.16s, background 0.16s;
}
.member-quick-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.42);
  background: var(--card-hover);
}
.member-quick-card > span { font-size: 21px; line-height: 1; }
.member-quick-card b { margin-top: 11px; font-size: 13.5px; }
.member-quick-card small { margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
:root[data-theme="light"] .member-hero-status { background: rgba(15, 23, 42, 0.035); }

@media (max-width: 860px) {
  .member-hero { align-items: flex-start; flex-direction: column; padding: 22px 20px; gap: 14px; }
  .member-hero-status { align-items: flex-start; }
  .member-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .member-hero h1 { font-size: 23px; }
  .member-quick-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .member-quick-card { min-height: 102px; padding: 13px; }
}

/* ---------------- 首页最终布局与动效 ---------------- */

.home-overview {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 22px 0 8px;
}
.home-overview > .home-hero {
  min-height: 236px;
  padding: 26px min(550px, 45%) 26px 30px;
  background-size: 160% 160%;
  animation: hero-aurora 12s ease-in-out infinite alternate, home-rise 0.55s ease-out both;
}
.home-overview > .gacha {
  margin: 0;
  animation: home-rise 0.55s 0.12s ease-out both;
}
.home-overview > .community-panel {
  position: absolute;
  top: 25px;
  right: 26px;
  bottom: auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(480px, 41%);
  height: auto;
  margin: 0;
  padding: 0 0 0 25px;
  border: 0;
  border-left: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: home-rise 0.55s 0.08s ease-out both;
}
.home-overview > .community-panel .community-panel-head { margin-bottom: 10px; }
.home-overview > .community-panel .community-action {
  border-color: rgba(99, 102, 241, 0.22);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
}
.home-overview > .community-panel .community-action:hover {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.48);
}
:root[data-theme="light"] .home-overview > .community-panel .community-action {
  background: rgba(255, 255, 255, 0.56);
}
.home-hero .hero-inner { animation: home-rise 0.5s 0.06s ease-out both; }
.community-action-icon { transition: transform 0.2s ease; }
.community-action:hover .community-action-icon { transform: rotate(-5deg) scale(1.08); }
.card-cover img { transition: transform 0.35s ease, filter 0.35s ease; }
.card:hover .card-cover img { transform: scale(1.035); filter: brightness(1.04); }

@keyframes hero-aurora {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}
@keyframes home-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .home-overview > .home-hero {
    min-height: 0;
    padding: 20px 18px;
  }
  .home-overview > .community-panel {
    position: static;
    width: auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: none;
  }
  .home-overview > .community-panel .community-action {
    background: rgba(99, 102, 241, 0.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-overview > .home-hero,
  .home-overview > .gacha,
  .home-overview > .community-panel,
  .home-hero .hero-inner,
  .gacha-orb,
  .gacha-game,
  .card-cover img,
  .community-action-icon {
    animation: none !important;
    transition: none !important;
  }
}

/* 首页右侧栏一屏内完整展示，不使用内部滚动 */
body.home-page .layout > aside {
  max-height: none;
  overflow: visible;
}

