:root {
  --bg: #222529;
  --bg-soft: #2a2d33;
  --card: #2b2e34;
  --card-hover: #33363e;
  --border: #3a3e46;
  --text: #ececf1;
  --muted: #a1a5af;
  --purple: #a78bfa;
  --purple-2: #c4b5fd;
  --accent: #8b7cf6;
  --green: #6cc47a;
  --shadow: 0 8px 30px rgba(0, 0, 0, .4);
  --radius: 10px;
  --glass: rgba(43, 46, 52, .62);
  --glass-border: rgba(255, 255, 255, .11);
  /* 四大分类卡片（深色磨砂） */
  --cat-bg: rgba(38, 42, 50, .93);
  --cat-border: rgba(255, 255, 255, .14);
  --cat-title: #ececf1;
  --cat-desc: #9aa1ad;
  --cat-active-bg: linear-gradient(135deg, rgba(107,168,232,.28), rgba(38,42,50,.95));
}
html[data-theme="light"] {
  --bg: #f5f6f8;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-hover: #f0f1f5;
  --border: #dfe2e8;
  --text: #1f2430;
  --muted: #6b7280;
  --purple: #7c3aed;
  --purple-2: #6d28d9;
  --accent: #7c3aed;
  --green: #3f9145;
  --shadow: 0 8px 30px rgba(0, 0, 0, .1);
  --glass: rgba(255, 255, 255, .7);
  --glass-border: rgba(255, 255, 255, .6);
  /* 四大分类卡片（浅色磨砂） */
  --cat-bg: rgba(255, 255, 255, .9);
  --cat-border: rgba(255, 255, 255, .85);
  --cat-title: #1f2430;
  --cat-desc: #7b8698;
  --cat-active-bg: linear-gradient(135deg, rgba(107,168,232,.2), rgba(255,255,255,.96));
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh;
  -webkit-font-smoothing: antialiased; transition: background .25s, color .25s;
}
.glass { background: var(--glass); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border: 1px solid var(--glass-border); }

/* ---------- 顶部导航（浮在幻灯片上，滚动后毛玻璃） ---------- */
.topnav { position: fixed; top: 0; left: 0; right: 0; z-index: 30; background: transparent; transition: background .3s, box-shadow .3s; }
.topnav.scrolled { background: var(--glass); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.topnav-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; font-weight: 600; font-size: 15px; flex-shrink: 0; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.brand-logo { font-size: 20px; }
.nav-links { display: flex; gap: 22px; flex: 1; }
.nav-link { color: rgba(255,255,255,.9); text-decoration: none; font-size: 13px; padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.nav-link:hover, .nav-link.active { color: #fff; border-bottom-color: rgba(255,255,255,.9); }
.topnav.scrolled .nav-link { color: var(--muted); text-shadow: none; }
.topnav.scrolled .nav-link:hover, .topnav.scrolled .nav-link.active { color: var(--purple-2); border-bottom-color: var(--accent); }
.topnav.scrolled .brand { color: var(--text); text-shadow: none; }
/* 合集页/帮助中心等完整页面：无幻灯片，导航用毛玻璃底 + 主题文字 */
body.view-collection .topnav, body.view-help .topnav { background: var(--glass); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 2px 12px rgba(0,0,0,.12); }
body.view-collection .nav-link, body.view-help .nav-link { color: var(--muted); text-shadow: none; }
body.view-collection .nav-link:hover, body.view-help .nav-link:hover,
body.view-collection .nav-link.active, body.view-help .nav-link.active { color: var(--purple-2); border-bottom-color: var(--accent); }
body.view-collection .brand, body.view-help .brand { color: var(--text); text-shadow: none; }
body.view-collection .theme-toggle, body.view-help .theme-toggle { background: var(--glass); border-color: var(--glass-border); color: var(--text); }
.theme-toggle { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.15); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.topnav.scrolled .theme-toggle { background: var(--glass); border-color: var(--glass-border); color: var(--text); }
.theme-toggle svg { width: 18px; height: 18px; }
.icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }
html[data-theme="light"] .icon-moon { display: block; }
@media (max-width: 640px) { .nav-links { gap: 12px; overflow-x: auto; } .brand-name { display: none; } }

/* ---------- 幻灯片 Hero（全宽铺满） ---------- */
.hero { position: relative; width: 100%; min-height: 390px; display: flex; align-items: center; justify-content: center; padding: 76px 24px 100px; overflow: hidden; }
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; background-size: cover; background-position: center 32%; }
.slide.active { opacity: 1; }
.slide[data-slide="0"] { background-image: url('hero-banner.webp'); }
.slide[data-slide="1"] { background-image: url('hero-banner-2.webp'); }
.slide[data-slide="2"] { background-image: url('hero-banner-3.webp'); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,60,110,.30), rgba(20,40,80,.14) 45%, rgba(25,50,95,.22)); }
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: 720px; text-align: center; margin-left: -120px; }
.hero-title { font-size: 34px; font-weight: 700; color: #fff; letter-spacing: 1px; text-shadow: 0 2px 16px rgba(0,30,80,.55); margin-bottom: 6px; }
.hero-sub { color: rgba(255,255,255,.95); font-size: 13px; margin-bottom: 24px; text-shadow: 0 1px 8px rgba(0,30,80,.5); }
.search-wrap { position: relative; max-width: 560px; margin: 0 auto 14px; display: flex; align-items: center; background: rgba(255,255,255,.94); border-radius: 26px; box-shadow: 0 6px 24px rgba(0,0,0,.25); padding: 0 16px; height: 48px; }
.search-icon { width: 18px; height: 18px; color: #888; flex-shrink: 0; }
#search { flex: 1; border: none; outline: none; background: transparent; padding: 0 12px; font-size: 14px; color: #222; height: 100%; }
#search::placeholder { color: #999; }
.search-clear { display: none; border: none; background: none; color: #999; font-size: 20px; cursor: pointer; line-height: 1; }
.search-clear.show { display: block; }
.hot-search { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-bottom: 18px; }
.hot-label { color: rgba(255,255,255,.8); font-size: 11px; line-height: 22px; margin-right: 2px; }
.hot-tag { background: rgba(255,255,255,.2); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: 11px; padding: 2px 10px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.hot-tag:hover { background: rgba(255,255,255,.35); }
.notice { max-width: 1100px; margin: 18px auto 0; display: flex; flex-direction: column; gap: 5px; background: linear-gradient(90deg, rgba(255,235,245,.92), rgba(255,248,240,.92)); border: 1px solid rgba(255,190,215,.5); border-radius: 9px; padding: 10px 16px; text-align: left; }
.notice-row { display: flex; gap: 8px; align-items: flex-start; color: #8a5a72; font-size: 11px; line-height: 1.6; }
.notice-icon { flex-shrink: 0; font-size: 13px; line-height: 1.5; }
.notice-icon.info { color: #d16ba0; }
.notice-icon.warn { color: #e09a4a; }

/* ---------- 四大分类（压在幻灯片底边半悬浮） ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px 40px; }
.category-tabs { position: relative; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 1100px; margin: -52px auto 0; padding: 0 24px; }
@media (max-width: 760px) { .category-tabs { grid-template-columns: repeat(2, 1fr); margin-top: -40px; } }
.cat-tab { position: relative; display: flex; flex-direction: row; align-items: center; gap: 11px; padding: 13px 15px; border-radius: 13px; cursor: pointer; text-align: left; border: 1px solid var(--cat-border); background: var(--cat-bg); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); color: var(--cat-title); transition: transform .2s, border-color .2s, box-shadow .2s, background .25s; overflow: hidden; box-shadow: 0 8px 26px rgba(0,0,0,.18); }
.cat-tab:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.26); border-color: #6ba8e8; }
.cat-tab.active { border-color: #6ba8e8; background: var(--cat-active-bg); }
.cat-tab.disabled { opacity: .55; }
.cat-icon-wrap { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; box-shadow: 0 3px 10px rgba(0,0,0,.1); }
.cat-icon-wrap.blue { background: linear-gradient(135deg, #7ec5ff, #4a90e2); }
.cat-icon-wrap.purple { background: linear-gradient(135deg, #c3a5f5, #9b6fd8); }
.cat-icon-wrap.red { background: linear-gradient(135deg, #ff9b85, #f2604a); }
.cat-icon-wrap.cyan { background: linear-gradient(135deg, #7fe0d8, #35b8ad); }
.cat-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cat-title { font-size: 14px; font-weight: 600; color: var(--cat-title); }
.cat-desc { font-size: 10px; color: var(--cat-desc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 游戏轮播图 ---------- */
.carousel-section { margin: 22px 0 18px; }
.carousel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 12px; }
.carousel-tabs { display: flex; gap: 6px; }
.carousel-tab { background: var(--glass); border: 1px solid var(--glass-border); color: var(--muted); font-size: 12px; padding: 6px 14px; border-radius: 16px; cursor: pointer; transition: all .2s; }
.carousel-tab:hover { color: var(--text); border-color: var(--border); }
.carousel-tab.active { background: linear-gradient(135deg, #ef4444, #dc2626); border-color: #ef4444; color: #fff; box-shadow: 0 3px 12px rgba(239,68,68,.28); }
.carousel-hint { font-size: 10px; color: var(--muted); }
.carousel-viewport { position: relative; }
.carousel-track { display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding: 4px 2px 10px; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-arrow { position: absolute; top: 44%; transform: translateY(-50%); z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(120,130,145,.55); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); transition: background .2s, transform .2s; }
.carousel-arrow:hover { background: rgba(120,130,145,.85); transform: translateY(-50%) scale(1.08); }
.carousel-arrow.prev { left: -8px; }
.carousel-arrow.next { right: -8px; }
.carousel-card { flex: 0 0 calc((100% - 36px) / 4); min-width: 0; border-radius: 11px; overflow: hidden; background: var(--bg-soft); border: 1px solid var(--glass-border); cursor: pointer; transition: transform .2s, box-shadow .2s; }
@media (max-width: 1000px) { .carousel-card { flex-basis: calc((100% - 24px) / 3); } }
@media (max-width: 760px) { .carousel-card { flex-basis: calc((100% - 12px) / 2); } .carousel-hint { display: none; } }
@media (max-width: 480px) { .carousel-card { flex-basis: 82%; } }
.carousel-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.carousel-cover { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: var(--card-hover); }
.carousel-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.carousel-card:hover .carousel-cover img { transform: scale(1.05); }
.carousel-badge { position: absolute; top: 6px; left: 6px; background: rgba(239,68,68,.92); color: #fff; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.carousel-views { position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 10px; }
.carousel-info { padding: 8px 10px 10px; }
.carousel-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.carousel-meta { font-size: 10px; color: var(--muted); display: flex; gap: 8px; }

/* 合集卡片（高分推荐 tab） */
.coll-card { flex: 0 0 calc((100% - 36px) / 4); min-width: 0; border-radius: 12px; overflow: hidden; background: var(--bg-soft); border: 1px solid var(--glass-border); cursor: pointer; transition: transform .2s, box-shadow .2s; }
@media (max-width: 1000px) { .coll-card { flex-basis: calc((100% - 24px) / 3); } }
@media (max-width: 760px) { .coll-card { flex-basis: calc((100% - 12px) / 2); } }
@media (max-width: 480px) { .coll-card { flex-basis: 82%; } }
.coll-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.coll-cover { width: 100%; aspect-ratio: 16/9; overflow: hidden; background: var(--card-hover); }
.coll-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.coll-info { padding: 11px 13px 13px; }
.coll-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.coll-desc { font-size: 11px; color: var(--muted); margin-bottom: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coll-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.coll-count { font-size: 11px; font-weight: 600; color: #ef4444; background: rgba(239,68,68,.1); border-radius: 10px; padding: 2px 9px; }
.coll-tags { font-size: 10px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 2px 8px; }

/* 合集完整页面 */
body.view-collection .hero, body.view-collection .category-tabs { display: none; }
.collection-page { padding-top: 88px; min-height: 100vh; }
.collection-page[hidden] { display: none; }
.back-btn { display: inline-flex; align-items: center; gap: 4px; background: var(--glass); border: 1px solid var(--glass-border); color: var(--text); font-size: 13px; padding: 7px 16px; border-radius: 18px; cursor: pointer; margin-bottom: 18px; transition: background .2s, border-color .2s; }
.back-btn:hover { border-color: var(--accent); color: var(--purple-2); }

/* 合集详情页（弹窗内） */
.collection-detail { padding: 4px; }
.collection-hero { position: relative; border-radius: 14px; overflow: hidden; min-height: 240px; display: flex; align-items: flex-end; padding: 28px; margin-bottom: 20px; }
.collection-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.35) 60%, rgba(0,0,0,.1)); }
.collection-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.collection-hero-text { position: relative; z-index: 2; color: #fff; }
.collection-hero-badges { display: flex; gap: 8px; margin-bottom: 12px; }
.collection-hero-badges span { background: rgba(255,255,255,.2); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.3); border-radius: 14px; padding: 3px 12px; font-size: 11px; }
.collection-hero-text h2 { font-size: 28px; margin-bottom: 6px; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.collection-hero-text p { font-size: 13px; color: rgba(255,255,255,.88); }
.collection-games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .collection-games { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .collection-games { grid-template-columns: repeat(2, 1fr); } }
.cg-card { border-radius: 10px; overflow: hidden; background: var(--card); border: 1px solid var(--border); cursor: pointer; transition: transform .2s, box-shadow .2s; }
.cg-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cg-cover { width: 100%; aspect-ratio: 16/9; overflow: hidden; position: relative; background: var(--card-hover); }
.cg-cover img { width: 100%; height: 100%; object-fit: cover; }
.cg-badge { position: absolute; top: 7px; left: 7px; background: rgba(239,68,68,.94); color: #fff; font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.cg-info { padding: 9px 10px 11px; }
.cg-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.cg-tag { font-size: 10px; color: #fff; padding: 1px 8px; border-radius: 10px; white-space: nowrap; }
.cg-name { font-size: 12px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 游戏类型快筛（气泡标签） ---------- */
.genre-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.genre-chip { font-size: 12px; padding: 5px 15px; border-radius: 16px; cursor: pointer; border: 1px solid var(--border); background: var(--glass); color: var(--muted); transition: all .2s; }
.genre-chip:hover { color: var(--text); border-color: var(--purple); }
.genre-chip.active { background: #ef4444; color: #fff; border-color: #ef4444; box-shadow: 0 3px 10px rgba(239,68,68,.25); }
.genre-chip small { font-size: 9px; opacity: .65; margin-left: 2px; }
.genre-more-btn { font-size: 11px; color: var(--muted); background: var(--glass); border: 1px solid var(--border); padding: 5px 11px; border-radius: 16px; cursor: pointer; }
.genre-more-btn:hover { color: var(--text); }
.genre-more-panel { display: none; flex-basis: 100%; width: 100%; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding: 0; background: transparent; border: none; box-shadow: none; }
.genre-bar.expanded .genre-more-panel { display: flex; }
.genre-more-panel .genre-chip { font-size: 11px; }

/* ---------- 主体布局 ---------- */
.main-layout { display: grid; grid-template-columns: 1fr 250px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .main-layout { grid-template-columns: 1fr; } .sidebar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (max-width: 640px) { .sidebar { grid-template-columns: 1fr; } }
.list-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.list-header h2 { font-size: 17px; font-weight: 600; }
.list-count { font-size: 12px; color: var(--muted); }
.list-count b { color: var(--text); }

/* 四个下拉筛选 */
.filters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
@media (max-width: 760px) { .filters { grid-template-columns: repeat(2, 1fr); } }
.filter { position: relative; }
.filter-btn { width: 100%; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); color: var(--text); cursor: pointer; font-size: 12px; }
.filter-btn:hover { border-color: var(--border); }
.filter-btn.active { border-color: var(--accent); color: var(--purple-2); }
.filter-btn .fb-label { flex: 1; text-align: left; }
.filter-btn .fb-count { display: none; min-width: 16px; height: 16px; padding: 0 4px; align-items: center; justify-content: center; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; }
.filter-btn .fb-count.show { display: flex; }
.filter-btn .fb-arrow { flex-shrink: 0; font-size: 9px; color: var(--muted); transition: transform .2s; }
.filter.open .fb-arrow { transform: rotate(180deg); }
.filter-panel { display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 15; max-height: 320px; overflow-y: auto; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 6px 4px; box-shadow: var(--shadow); }
.filter.open .filter-panel { display: block; }
.filter-panel::-webkit-scrollbar { width: 6px; }
.filter-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.filter-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px 8px; margin-bottom: 3px; border-bottom: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.filter-panel-head .fph-clear { color: var(--purple); cursor: pointer; }
.filter-panel-head .fph-clear:hover { text-decoration: underline; }
.opt { display: flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 12px; color: var(--muted); }
.opt:hover { background: var(--card-hover); color: var(--text); }
.opt input { display: none; }
.opt .check { width: 14px; height: 14px; border: 1.5px solid var(--border); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: transparent; flex-shrink: 0; }
.opt.selected { color: var(--text); }
.opt.selected .check { background: var(--accent); border-color: var(--accent); color: #fff; }
.opt .opt-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--accent); }
.opt .opt-name { flex: 1; }
.opt .opt-num { font-size: 11px; color: var(--muted); }

/* 筛选汇总 + 重置筛选 */
.filter-summary { display: none; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 11px; color: var(--muted); }
.filter-summary.show { display: flex; flex-wrap: wrap; }
.fs-text { white-space: nowrap; }
.fs-text b { color: var(--purple-2); }
.fs-tags { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.reset-filter-btn { background: transparent; border: 1px solid var(--accent); color: var(--purple); border-radius: 14px; padding: 3px 12px; font-size: 11px; cursor: pointer; white-space: nowrap; margin-left: auto; }
.reset-filter-btn:hover { background: rgba(139,124,246,.12); }

/* 排序 */
.sort-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 11px; }
.sort-label { color: var(--muted); }
.sort-btn { background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 3px 10px; color: var(--muted); cursor: pointer; font-size: 11px; }
.sort-btn:hover { color: var(--text); }
.sort-btn.active { color: var(--purple-2); border-color: var(--accent); background: rgba(139,124,246,.1); }

.active-tags { display: none; }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; background: rgba(139, 124, 246, .14); border: 1px solid rgba(139, 124, 246, .35); color: var(--purple-2); font-size: 11px; padding: 3px 9px; border-radius: 14px; }
.tag-chip button { border: none; background: none; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }

/* 游戏卡片 */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--glass-border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.card-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .3s; }
.card-thumb img.loaded { opacity: 1; }
.card-thumb .placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--border); font-size: 28px; }
.card-index { position: absolute; left: 8px; top: 8px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 5px; font-family: monospace; }
.card-body { padding: 10px 11px 11px; flex: 1; display: flex; flex-direction: column; }
.card-meta-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; min-height: 20px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.card-tag { font-size: 10px; line-height: 1.5; padding: 1px 7px; border-radius: 5px; border: 1px solid transparent; white-space: nowrap; font-weight: 500; }
.card-tag.prefix { font-weight: 600; }
.card-date { font-size: 10px; color: var(--muted); white-space: nowrap; margin-left: auto; padding-top: 2px; }
.card-title { font-size: 13px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; letter-spacing: .2px; }
.card-title:hover { color: var(--purple-2); }
.card-genre { align-self: flex-start; margin-top: 7px; font-size: 10px; padding: 2px 7px; border-radius: 4px; color: var(--green); background: rgba(108, 196, 122, .13); }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; }
.card-links { display: flex; gap: 4px; }
.card-links span { font-size: 9px; padding: 1px 5px; border-radius: 4px; }
.card-links .q { color: #7ec8ff; background: rgba(126, 200, 255, .12); }
.card-links .b { color: #8fd694; background: rgba(143, 214, 148, .12); }
.empty { text-align: center; padding: 50px; color: var(--muted); font-size: 14px; }
.empty-icon { font-size: 48px; color: var(--border); margin-bottom: 10px; }
.btn-ghost { margin-top: 14px; padding: 8px 16px; background: transparent; border: 1px solid var(--border); border-radius: 7px; color: var(--text); cursor: pointer; }

/* ---------- 右侧栏 ---------- */
.sidebar { display: flex; flex-direction: column; gap: 14px; }
.side-card { background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 12px; padding: 14px; }
.side-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--glass-border); }
.side-icon { font-size: 15px; }
.top-list { display: flex; flex-direction: column; gap: 9px; }
.top-item { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.top-item:hover .top-name { color: var(--purple-2); }
.top-rank { flex-shrink: 0; min-width: 20px; height: 18px; padding: 0 4px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; background: var(--bg-soft); color: var(--muted); }
.top-rank.r1 { background: #e0453f; color: #fff; }
.top-rank.r2 { background: #e08b3f; color: #fff; }
.top-rank.r3 { background: #c9a83f; color: #fff; }
.top-thumb { width: 34px; height: 34px; border-radius: 5px; object-fit: cover; flex-shrink: 0; background: var(--bg-soft); }
.top-info { min-width: 0; }
.top-name { font-size: 11px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }
.top-meta { font-size: 9px; color: var(--muted); margin-top: 2px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.cloud-tag { font-size: 10px; padding: 3px 9px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; transition: filter .2s, transform .2s; }
.cloud-tag:hover { filter: brightness(1.25); transform: translateY(-1px); }
.notice-card { font-size: 11px; color: var(--text); line-height: 1.8; }
.notice-card .muted { color: var(--muted); }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 28px; }
.page-btn { min-width: 32px; height: 32px; padding: 0 9px; border-radius: 6px; background: var(--card); border: 1px solid var(--border); color: var(--muted); cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.page-btn:hover { border-color: var(--accent); color: var(--text); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-ellipsis { color: var(--muted); padding: 0 4px; }
.page-jump { display: flex; align-items: center; gap: 6px; margin-left: 8px; font-size: 12px; color: var(--muted); }
.page-jump input { width: 50px; padding: 6px 8px; background: var(--card); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12px; outline: none; }

/* ---------- 页脚 / 返回顶部 ---------- */
.footer { text-align: center; padding: 24px 20px 40px; color: var(--muted); font-size: 11px; line-height: 1.9; border-top: 1px solid var(--border); margin-top: 20px; }
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 20; width: 38px; height: 38px; border-radius: 50%; background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); color: var(--text); font-size: 18px; cursor: pointer; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { border-color: var(--accent); }

/* ---------- 详情弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); }
.modal-panel { position: relative; z-index: 1; width: min(720px, 100%); max-height: 90vh; overflow-y: auto; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.modal-panel::-webkit-scrollbar { width: 8px; }
.modal-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.modal-close { position: sticky; top: 10px; float: right; margin: 12px 14px 0 0; width: 30px; height: 30px; border-radius: 50%; z-index: 2; background: rgba(0, 0, 0, .4); border: 1px solid var(--border); color: #fff; font-size: 18px; cursor: pointer; line-height: 1; }
.modal-body { padding: 20px 24px 26px; }
.detail-loading { padding: 60px 20px; text-align: center; font-size: 14px; color: var(--muted); }
.detail-hint { margin: 6px 0 2px; font-size: 12px; color: var(--muted); opacity: .85; }
.detail-title { font-size: 18px; font-weight: 600; margin-bottom: 9px; padding-right: 36px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.detail-tag { font-size: 10px; padding: 2px 8px; border-radius: 4px; background: rgba(139, 124, 246, .15); color: var(--purple-2); }
.detail-tag.r { background: rgba(224, 164, 88, .15); color: #e0a458; }
.detail-tag.g { background: rgba(108, 196, 122, .15); color: var(--green); }
.detail-date { font-size: 11px; color: var(--muted); margin-bottom: 14px; }
.gallery-main { position: relative; background: #000; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.gallery-main img { width: 100%; display: block; max-height: 420px; object-fit: contain; transition: filter .25s ease; }
.gallery-main img.loading-hd { filter: blur(2px); }
.gallery-count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.gallery-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.5); color: #fff; border: none; width: 30px; height: 44px; cursor: pointer; font-size: 18px; }
.gallery-nav-btn.prev { left: 0; border-radius: 0 6px 6px 0; }
.gallery-nav-btn.next { right: 0; border-radius: 6px 0 0 6px; }
.gallery-thumbs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 4px; }
.gallery-thumbs::-webkit-scrollbar { height: 5px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.gallery-thumbs img { width: 72px; height: 48px; object-fit: cover; border-radius: 5px; cursor: pointer; opacity: .6; border: 2px solid transparent; flex-shrink: 0; }
.gallery-thumbs img.active { opacity: 1; border-color: var(--accent); }
.detail-section { margin-bottom: 16px; }
.detail-section h3 { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.detail-desc { font-size: 13px; color: var(--text); white-space: pre-line; line-height: 1.8; background: var(--card); padding: 12px 14px; border-radius: 8px; max-height: 340px; overflow-y: auto; }
.detail-desc::-webkit-scrollbar { width: 6px; }
.detail-desc::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.link-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.link-btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 6px; text-decoration: none; font-size: 12px; font-weight: 500; border: 1px solid transparent; cursor: pointer; transition: opacity .2s; }
.link-btn:hover { opacity: .85; }
.link-btn.quark { background: rgba(126, 200, 255, .13); border-color: rgba(126, 200, 255, .3); color: #7ec8ff; }
.link-btn.baidu { background: rgba(143, 214, 148, .13); border-color: rgba(143, 214, 148, .3); color: #8fd694; }
.link-btn.xunlei { background: rgba(255, 180, 120, .13); border-color: rgba(255, 180, 120, .3); color: #ffb478; }
.link-btn.video { background: rgba(255, 130, 160, .13); border-color: rgba(255, 130, 160, .3); color: #ff829f; }
.link-btn.copy { background: var(--card); border-color: var(--border); color: var(--muted); }
.code-badge { font-size: 12px; color: var(--muted); }
.code-badge b { color: var(--green); font-family: monospace; font-size: 13px; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--card); border: 1px solid var(--border); color: var(--text); padding: 9px 18px; border-radius: 7px; font-size: 12px; z-index: 70; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================== 帮助中心（完整页面） ==================== */
body.view-help .hero, body.view-help .category-tabs { display: none; }
.help-page { padding-top: 88px; min-height: 100vh; }
.help-page[hidden] { display: none; }
.help-layout { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .help-layout { grid-template-columns: 1fr; } }
.help-side { background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 12px; padding: 16px; position: sticky; top: 76px; }
.help-side-title { font-size: 12px; font-weight: 600; color: var(--text); margin: 4px 0 10px; padding-left: 8px; border-left: 3px solid var(--accent); }
.help-side-title:not(:first-child) { margin-top: 22px; }
.help-filter-group { display: flex; flex-direction: column; gap: 6px; }
.help-filter-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; font-size: 12px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 7px 12px; cursor: pointer; transition: all .2s; }
.help-filter-btn:hover { background: var(--card-hover); color: var(--text); }
.help-filter-btn.active { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.4); color: #ef4444; font-weight: 600; }
.help-filter-btn small { font-size: 10px; opacity: .7; }
.help-main { background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 12px; padding: 22px 24px 26px; }
.help-main-head { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.help-main-head h1 { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.help-main-head p { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.help-search { display: flex; gap: 8px; max-width: 560px; }
.help-search input { flex: 1; padding: 9px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); color: var(--text); font-size: 13px; outline: none; }
.help-search input:focus { border-color: var(--accent); }
.help-search button { background: #ef4444; color: #fff; border: none; border-radius: 8px; padding: 0 22px; font-size: 13px; font-weight: 600; cursor: pointer; }
.help-search button:hover { background: #dc2626; }
.help-articles { display: flex; flex-direction: column; gap: 12px; }
.article-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.article-item:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.article-icon { flex-shrink: 0; width: 38px; height: 38px; border-radius: 9px; background: rgba(239,68,68,.1); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.article-info { flex: 1; min-width: 0; }
.article-badges { display: flex; gap: 6px; margin-bottom: 4px; }
.article-badge { font-size: 10px; padding: 1px 8px; border-radius: 9px; border: 1px solid transparent; }
.article-badge.cat { background: rgba(239,68,68,.12); color: #ef4444; border-color: rgba(239,68,68,.3); }
.article-badge.plat { font-weight: 500; }
.article-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-go { flex-shrink: 0; font-size: 12px; color: #ef4444; font-weight: 500; }
.article-empty { text-align: center; padding: 50px 20px; color: var(--muted); font-size: 13px; }
/* 文章详情弹窗 */
.article-modal { position: fixed; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center; padding: 20px; }
.article-modal[hidden] { display: none; }
.article-modal-back { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(3px); }
.article-modal-panel { position: relative; z-index: 1; width: min(760px, 100%); max-height: 88vh; overflow-y: auto; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 26px 30px 32px; box-shadow: var(--shadow); }
.article-modal-close { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 20px; cursor: pointer; line-height: 1; }
.article-detail-title { font-size: 21px; font-weight: 700; color: var(--text); margin-bottom: 10px; padding-right: 40px; }
.article-detail-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.article-detail-date { font-size: 11px; color: var(--muted); margin-left: auto; }
.article-detail-content { font-size: 14px; line-height: 1.9; color: var(--text); }
.article-detail-content p { margin-bottom: 12px; white-space: pre-wrap; }
.article-detail-content .muted { color: var(--muted); }
.article-detail-h3 { font-size: 14px; font-weight: 600; color: var(--text); margin: 22px 0 12px; padding-left: 9px; border-left: 3px solid var(--accent); }
.article-video { position: relative; width: 100%; aspect-ratio: 16/9; margin-bottom: 14px; border-radius: 10px; overflow: hidden; background: #000; }
.article-video iframe, .article-video video { width: 100%; height: 100%; border: none; }
.article-video-link { display: inline-block; color: var(--purple-2); text-decoration: none; font-size: 13px; padding: 8px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; }
