
/* ===== Reset & Variables ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --brand-50: #e6faf6; --brand-100: #b2f2e6; --brand-500: #00bfa5; --brand-600: #00a68f; --brand-700: #008c79;
  --white: #fff; --black: #000;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937;
  --red-50: #fef2f2; --red-500: #ef4444; --red-600: #dc2626;
  --orange-50: #fff7ed; --orange-400: #fb923c; --orange-500: #f97316;
  --yellow-50: #fefce8; --yellow-500: #eab308;
  --green-50: #f0fdf4; --green-500: #22c55e;
  --teal-50: #f0fdfa; --teal-500: #14b8a6;
  --blue-50: #eff6ff; --blue-100: #dbeafe; --blue-500: #3b82f6;
  --indigo-50: #eef2ff; --indigo-500: #6366f1;
  --purple-50: #faf5ff; --purple-100: #f3e8ff; --purple-500: #a855f7;
  --pink-50: #fdf2f8; --pink-500: #ec4899;
  --cyan-50: #ecfeff; --cyan-500: #06b6d4;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --radius-sm: 6px; --radius: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-2xl: 20px; --radius-full: 9999px;
  --transition: 0.2s ease;
  --font: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 56px;
  --header-h: 56px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--gray-700); background: var(--gray-50); line-height: 1.6; -webkit-font-smoothing: antialiased; padding-bottom: var(--safe-bottom); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; background: none; }
input { font-family: inherit; outline: none; border: none; }

/* ===== Page Wrapper ===== */
.page { max-width: 750px; margin: 0 auto; background: var(--gray-50); min-height: 100vh; position: relative; }

/* ===== App Header ===== */
.app-header { background: linear-gradient(135deg, #00897b, #00a68f 40%, #00bfa5); padding: 10px 12px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.1); height: var(--header-h); }
.app-header .logo { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.app-header .logo-icon { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; }
.app-header .logo-icon svg { width: 100%; height: 100%; display: block; }
.app-header .logo-text { color: #fff; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.app-header .logo-text .brand { color: #b2f2e6; }
.search-bar { flex: 1; min-width: 0; display: flex; align-items: center; background: rgba(255,255,255,0.95); border-radius: var(--radius-full); padding: 0 4px 0 14px; height: 36px; gap: 6px; }
.search-bar svg { width: 16px; height: 16px; color: var(--gray-400); flex-shrink: 0; }
.search-bar input { flex: 1; font-size: 0.8rem; color: var(--gray-700); background: transparent; min-width: 0; }
.search-bar input::placeholder { color: var(--gray-400); }
.search-bar .search-btn { background: var(--brand-500); color: #fff; border-radius: var(--radius-full); padding: 5px 14px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.search-bar .search-btn:active { background: var(--brand-600); }
.app-header .header-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.app-header .header-icon svg { width: 22px; height: 22px; }

/* ===== Scroll Nav ===== */
.scroll-nav { background: var(--white); display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-behavior: smooth; padding: 0 4px; border-bottom: 1px solid var(--gray-100); position: sticky; top: var(--header-h); z-index: 99; }
.scroll-nav::-webkit-scrollbar { display: none; }
.scroll-nav a { padding: 10px 14px; font-size: 0.85rem; color: var(--gray-600); white-space: nowrap; position: relative; transition: color 0.2s; font-weight: 500; flex-shrink: 0; }
.scroll-nav a.active { color: var(--brand-600); font-weight: 700; }
.scroll-nav a.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--brand-500); border-radius: 2px; }

/* ===== Section ===== */
.section { background: var(--white); margin-top: 8px; padding: 14px 12px; }
.section:first-of-type { margin-top: 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title { font-size: 1rem; font-weight: 700; color: var(--gray-800); display: flex; align-items: center; gap: 6px; }
.section-title::before { content: ''; width: 4px; height: 18px; background: var(--brand-500); border-radius: 2px; }
.section-more { font-size: 0.75rem; color: var(--gray-400); display: flex; align-items: center; gap: 2px; }
.section-more::after { content: '›'; font-size: 1rem; }

/* ===== Carousel ===== */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius-xl); height: 150px; background: #1f2a44; }
.carousel-track { display: flex; height: 100%; transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94); }
.carousel-slide { min-width: 100%; position: relative; }
.carousel-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.carousel-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.05) 100%); }
.carousel-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px 14px; color: #fff; z-index: 5; }
.carousel-tag { display: inline-block; font-size: 0.65rem; padding: 2px 8px; border-radius: var(--radius-full); margin-bottom: 4px; font-weight: 600; }
.carousel-tag.hero { background: var(--brand-500); }
.carousel-tag.update { background: #eab308; color: #000; }
.carousel-tag.event { background: var(--red-500); }
.carousel-content h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 2px; text-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.carousel-content p { font-size: 0.75rem; opacity: 0.9; }
.carousel-dots { position: absolute; bottom: 6px; right: 12px; display: flex; gap: 4px; z-index: 20; }
.carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.4); transition: all 0.3s; }
.carousel-dot.active { width: 18px; border-radius: 3px; background: var(--brand-500); }

/* ===== Quick Entry Grid ===== */
.quick-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px 4px; padding: 14px 12px; background: var(--white); }
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.quick-icon { width: 46px; height: 46px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.7rem; font-weight: 800; position: relative; overflow: hidden; }
.quick-icon svg { width: 24px; height: 24px; }
.quick-icon .qi-badge { position: absolute; top: -2px; right: -2px; background: var(--red-500); color: #fff; font-size: 0.55rem; padding: 1px 5px; border-radius: var(--radius-full); font-weight: 700; line-height: 1.3; }
.quick-label { font-size: 0.7rem; color: var(--gray-600); }

/* ===== Hot Picks — Horizontal Scroll ===== */
.hscroll { display: flex; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 2px 0; }
.hscroll::-webkit-scrollbar { display: none; }

.hot-card { width: 130px; flex-shrink: 0; background: var(--gray-50); border-radius: var(--radius-xl); padding: 10px; display: flex; flex-direction: column; gap: 6px; transition: background 0.2s; }
.hot-card:active { background: var(--gray-100); }
.hot-card .hc-top { display: flex; align-items: center; gap: 8px; }
.hot-card .hc-icon { width: 48px; height: 48px; border-radius: var(--radius-lg); object-fit: cover; flex-shrink: 0; background: var(--gray-200); }
.hot-card .hc-info { flex: 1; min-width: 0; }
.hot-card .hc-name { font-size: 0.8rem; font-weight: 600; color: var(--gray-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-card .hc-cat { font-size: 0.65rem; color: var(--gray-400); margin-top: 1px; }
.hot-card .hc-meta { display: flex; align-items: center; gap: 4px; }
.hot-card .hc-star { color: #f6b93b; font-size: 0.6rem; }
.hot-card .hc-score { font-size: 0.65rem; font-weight: 700; color: var(--brand-500); }
.hot-card .hc-size { font-size: 0.6rem; color: var(--gray-400); margin-left: auto; }
.hot-card .hc-dl { display: block; text-align: center; background: var(--brand-500); color: #fff; border-radius: var(--radius-full); padding: 4px 0; font-size: 0.7rem; font-weight: 600; }
.hot-card .hc-dl:active { background: var(--brand-600); }

/* ===== New Games — 2 Column Grid ===== */
.ng-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ng-card { display: block; border-radius: var(--radius-xl); overflow: hidden; background: var(--white); border: 1px solid var(--gray-100); position: relative; }
.ng-card:active { opacity: 0.9; }
.ng-poster { height: 90px; position: relative; overflow: hidden; background: #1f2a44; }
.ng-poster-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; filter: blur(16px); transform: scale(1.3); opacity: 0.6; }
.ng-poster::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.6) 100%); }
.ng-poster-bottom { position: absolute; bottom: 8px; left: 8px; right: 8px; display: flex; align-items: center; gap: 8px; z-index: 2; }
.ng-icon { width: 36px; height: 36px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; background: var(--gray-200); border: 2px solid rgba(255,255,255,0.35); }
.ng-name { color: #fff; font-size: 0.85rem; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,0.5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ng-badge { position: absolute; top: 6px; right: 6px; z-index: 10; background: rgba(0,0,0,0.45); backdrop-filter: blur(6px); color: #fff; font-size: 0.55rem; padding: 2px 6px; border-radius: var(--radius-full); font-weight: 700; }
.ng-info { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 5px; }
.ng-tag { font-size: 0.65rem; color: var(--gray-400); }
.ng-data { display: flex; align-items: center; justify-content: space-between; }
.ng-stats { font-size: 0.65rem; color: var(--gray-400); }
.ng-btn { border: none; border-radius: var(--radius-full); padding: 4px 14px; font-size: 0.7rem; font-weight: 700; color: #fff; }
.ng-btn.reserve { background: linear-gradient(135deg, var(--brand-500), #00a890); }
.ng-btn.dl { background: linear-gradient(135deg, #ff6b6b, #e55039); }

/* ===== Server Table — Mobile Cards ===== */
.server-list { display: flex; flex-direction: column; gap: 8px; }
.server-card { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--gray-50); border-radius: var(--radius-lg); transition: background 0.2s; }
.server-card:active { background: var(--gray-100); }
.server-icon { width: 40px; height: 40px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; background: var(--gray-200); }
.server-info { flex: 1; min-width: 0; }
.server-name { font-size: 0.85rem; font-weight: 600; color: var(--gray-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.server-type { font-size: 0.65rem; color: var(--gray-400); }
.server-time { font-size: 0.65rem; color: var(--gray-500); font-weight: 500; }
.server-status { display: inline-block; padding: 2px 8px; border-radius: var(--radius-full); font-size: 0.6rem; font-weight: 600; white-space: nowrap; }
.server-status.opened { background: var(--gray-100); color: var(--gray-500); }
.server-status.today { background: rgba(0,184,148,0.14); color: #00b894; }
.server-status.soon { background: rgba(9,132,227,0.12); color: #0984e3; }
.server-btn { padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.server-btn.enter { background: var(--brand-50); color: var(--brand-600); }
.server-btn.reserve { background: var(--brand-500); color: #fff; }
.server-btn.disabled { background: var(--gray-100); color: var(--gray-400); }

/* ===== Gift Cards — Horizontal Scroll ===== */
.gift-scroll { display: flex; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 2px 0; }
.gift-scroll::-webkit-scrollbar { display: none; }
.gift-card { width: 200px; flex-shrink: 0; border-radius: var(--radius-xl); overflow: hidden; background: var(--white); border: 1px solid var(--gray-100); }
.gift-card:active { opacity: 0.9; }
.gift-header { padding: 10px 10px 6px; text-align: center; }
.gift-game-icon { width: 44px; height: 44px; border-radius: var(--radius-lg); margin: 0 auto 4px; display: block; object-fit: cover; background: var(--gray-200); }
.gift-game-name { font-weight: 700; color: var(--gray-800); font-size: 0.8rem; }
.gift-body { padding: 0 10px 8px; }
.gift-reward { background: var(--gray-50); border-radius: var(--radius); padding: 6px 8px; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.gift-reward-icon { width: 28px; height: 28px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; color: #fff; }
.gift-reward-text { flex: 1; min-width: 0; }
.gift-reward-name { font-size: 0.65rem; font-weight: 600; color: var(--gray-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gift-reward-desc { font-size: 0.55rem; color: var(--gray-400); margin-top: 1px; }
.gift-code-row { display: flex; align-items: center; gap: 4px; background: linear-gradient(135deg, #fefce8, #fffbeb); border: 1px dashed #f6b93b; border-radius: var(--radius); padding: 4px 6px; margin-bottom: 6px; }
.gift-code-label { font-size: 0.55rem; color: var(--orange-500); white-space: nowrap; font-weight: 700; }
.gift-code-val { flex: 1; font-size: 0.6rem; color: var(--gray-700); font-family: 'Courier New', monospace; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gift-copy-btn { background: var(--orange-500); color: #fff; border-radius: var(--radius-full); padding: 2px 8px; font-size: 0.55rem; font-weight: 700; flex-shrink: 0; }
.gift-copy-btn:active { background: #e16910; }
.gift-footer { display: flex; align-items: center; justify-content: center; padding: 0 10px 8px; }
.gift-stock { font-size: 0.55rem; color: var(--gray-400); display: flex; align-items: center; gap: 3px; }
.gift-stock::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--green-500); }

/* ===== Category Grid ===== */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cat-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: var(--radius-lg); background: var(--gray-50); transition: background 0.2s; }
.cat-item:active { background: var(--brand-50); }
.cat-icon { width: 44px; height: 44px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.7rem; font-weight: 800; }
.cat-label { font-size: 0.7rem; color: var(--gray-600); }

/* ===== Tab Bar ===== */
.tab-bar { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-behavior: smooth; margin-bottom: 10px; }
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn { padding: 5px 12px; border-radius: var(--radius-full); border: 1px solid var(--gray-200); font-size: 0.75rem; font-weight: 500; color: var(--gray-600); white-space: nowrap; transition: all 0.2s; background: transparent; flex-shrink: 0; }
.tab-btn.active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== App Grid (Games/Tools) ===== */
.app-grid { display: flex; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-behavior: smooth; padding: 2px 0; }
.app-grid::-webkit-scrollbar { display: none; }
.app-card { display: flex; flex-direction: column; align-items: center; gap: 4px; width: calc((100% - 30px) / 4); flex-shrink: 0; padding: 8px 2px; border-radius: var(--radius-lg); transition: background 0.2s; }
.app-card:active { background: var(--gray-50); }
.app-card .ac-icon { width: 52px; height: 52px; border-radius: var(--radius-xl); object-fit: cover; background: var(--gray-200); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.app-card .ac-name { font-size: 0.7rem; font-weight: 500; color: var(--gray-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.app-card .ac-cat { font-size: 0.6rem; color: var(--gray-400); }

/* ===== Rank List ===== */
.rank-list { display: flex; flex-direction: column; gap: 6px; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-lg); background: var(--gray-50); transition: background 0.2s; }
.rank-item:active { background: var(--gray-100); }
.rank-num { width: 24px; height: 24px; border-radius: 50%; font-size: 0.75rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--gray-500); background: var(--gray-200); position: relative; }
.rank-num.r1 { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #fff; box-shadow: 0 2px 8px rgba(255,140,0,0.35); }
.rank-num.r2 { background: linear-gradient(135deg, #e8e8e8, #a0a0a0); color: #fff; box-shadow: 0 2px 8px rgba(160,160,160,0.3); }
.rank-num.r3 { background: linear-gradient(135deg, #f4a460, #b87333); color: #fff; box-shadow: 0 2px 8px rgba(205,127,50,0.3); }
.rank-icon { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--gray-200); box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 0.82rem; font-weight: 600; color: var(--gray-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-dl { font-size: 0.65rem; color: var(--gray-400); margin-top: 1px; display: flex; align-items: center; gap: 4px; }
.rank-dl::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--green-500); }
.rank-dl-btn { font-size: 0.65rem; font-weight: 600; color: var(--brand-600); background: var(--brand-50); padding: 4px 10px; border-radius: var(--radius-full); white-space: nowrap; flex-shrink: 0; }

/* ===== Article List ===== */
.article-list { display: flex; flex-direction: column; gap: 0; }
.article-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.article-item:last-child { border-bottom: none; }
.article-item:active { opacity: 0.8; }
.article-thumb { width: 80px; height: 56px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; background: var(--gray-200); }
.article-body { flex: 1; min-width: 0; }
.article-title { font-size: 0.8rem; font-weight: 500; color: var(--gray-800); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 3px; }
.article-meta { font-size: 0.65rem; color: var(--gray-400); display: flex; align-items: center; gap: 4px; }
.article-meta .art-tag { background: var(--gray-100); padding: 1px 6px; border-radius: var(--radius-full); color: var(--gray-500); }

/* ===== Friend Links ===== */
.friend-links { display: flex; flex-wrap: wrap; gap: 6px; }
.friend-link { font-size: 0.7rem; color: var(--gray-500); padding: 4px 10px; background: var(--gray-50); border-radius: var(--radius-full); }

/* ===== Footer ===== */
.app-footer { background: var(--gray-800); color: var(--gray-400); padding: 20px 16px; text-align: center; }
.app-footer p { font-size: 0.7rem; line-height: 1.8; }
.app-footer .footer-links { display: flex; justify-content: center; gap: 12px; margin-bottom: 6px; }
.app-footer .footer-links a { font-size: 0.7rem; color: var(--gray-400); }
.app-footer .footer-links a:active { color: var(--white); }

/* ===== Bottom Nav ===== */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 750px; margin: 0 auto; height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: var(--white); border-top: 1px solid var(--gray-200); display: flex; z-index: 200; box-shadow: 0 -2px 12px rgba(0,0,0,0.06); }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--gray-400); transition: color 0.2s; }
.bn-item.active { color: var(--brand-500); }
.bn-item svg { width: 22px; height: 22px; }
.bn-item .bn-label { font-size: 0.6rem; }
.bn-item .bn-badge { position: absolute; top: 4px; right: 50%; margin-right: -20px; background: var(--red-500); color: #fff; font-size: 0.5rem; padding: 0 4px; border-radius: var(--radius-full); min-width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* ===== Back to Top ===== */
.back-top {
  position: fixed;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 14px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  z-index: 150;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s;
  border: none;
}
.back-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12)); }

/* ===== Toast ===== */
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(31,41,55,0.95); color: #fff; padding: 10px 20px; border-radius: var(--radius-lg); font-size: 0.78rem; z-index: 300; animation: toastIn 0.25s ease, toastOut 0.25s ease 2s forwards; pointer-events: none; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -10px); } }

/* ===== Side Menu Overlay ===== */
.side-menu-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 300; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.side-menu-mask.show { opacity: 1; pointer-events: auto; }
.side-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100%; background: var(--white); z-index: 301; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94); overflow-y: auto; padding: 20px; }
.side-menu.show { transform: translateX(0); }
.side-menu-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); }
.side-menu-close svg { width: 20px; height: 20px; }
.side-menu h3 { font-size: 0.9rem; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; margin-top: 20px; }
.side-menu h3:first-child { margin-top: 0; }
.side-menu .sm-link { display: block; padding: 10px 0; font-size: 0.85rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.side-menu .sm-link:active { color: var(--brand-600); }
.side-menu .sm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-menu .sm-grid a { padding: 10px; background: var(--gray-50); border-radius: var(--radius); font-size: 0.8rem; color: var(--gray-600); text-align: center; }

/* ===== Animations ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.reveal { animation: fadeUp 0.5s ease; }

/* ===== Topic Collection ===== */
.topic-scroll-v2 { display: flex; gap: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 0; }
.topic-scroll-v2::-webkit-scrollbar { display: none; }
.topic-card { width: 260px; flex-shrink: 0; background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.topic-card:active { transform: scale(0.98); }
.topic-cover { display: block; height: 100px; position: relative; text-decoration: none; }
.topic-cover img { width: 100%; height: 100%; object-fit: cover; }
.topic-cover span { position: absolute; left: 12px; bottom: 10px; color: var(--white); font-size: 0.85rem; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.topic-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.topic-games { display: flex; gap: 10px; margin-top: auto; }
.topic-game { display: flex; flex-direction: column; align-items: center; width: 48px; text-decoration: none; color: inherit; }
.topic-game img { width: 40px; height: 40px; border-radius: var(--radius); object-fit: cover; }
.topic-game span { font-size: 0.6rem; color: var(--gray-600); margin-top: 4px; text-align: center; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }



/* ===== Reset & Variables ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --brand-50: #e6faf6; --brand-100: #b2f2e6; --brand-500: #00bfa5; --brand-600: #00a68f; --brand-700: #008c79;
  --white: #fff;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827;
  --red-50: #fef2f2; --red-500: #ef4444; --red-600: #dc2626;
  --orange-50: #fff7ed; --orange-400: #fb923c; --orange-500: #f97316;
  --yellow-50: #fefce8; --yellow-500: #eab308;
  --green-50: #f0fdf4; --green-500: #22c55e;
  --blue-50: #eff6ff; --blue-500: #3b82f6;
  --purple-50: #faf5ff; --purple-500: #a855f7;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05); --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); --shadow-md: 0 4px 6px rgba(0,0,0,.07); --shadow-lg: 0 10px 15px rgba(0,0,0,.1);
  --radius-sm: 6px; --radius: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-2xl: 20px; --radius-full: 9999px;
  --transition: 0.2s ease;
  --font: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 56px;
  --header-h: 56px;
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--gray-700); background: var(--gray-50); line-height: 1.6; -webkit-font-smoothing: antialiased; padding-bottom: var(--safe-bottom); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; background: none; }
input { font-family: inherit; outline: none; border: none; }

/* ===== Page Wrapper ===== */
.page { max-width: 750px; margin: 0 auto; background: var(--gray-50); min-height: 100vh; position: relative; }

/* ===== App Header ===== */
.app-header { background: linear-gradient(135deg, #00897b, #00a68f 40%, #00bfa5); padding: 10px 12px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.1); height: var(--header-h); }
.app-header .logo { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.app-header .logo-icon { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; }
.app-header .logo-icon svg { width: 100%; height: 100%; display: block; }
.app-header .logo-text { color: #fff; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.app-header .logo-text .brand { color: #b2f2e6; }
.search-bar { flex: 1; min-width: 0; display: flex; align-items: center; background: rgba(255,255,255,0.95); border-radius: var(--radius-full); padding: 0 4px 0 14px; height: 36px; gap: 6px; }
.search-bar svg { width: 16px; height: 16px; color: var(--gray-400); flex-shrink: 0; }
.search-bar input { flex: 1; font-size: 0.8rem; color: var(--gray-700); background: transparent; min-width: 0; }
.search-bar input::placeholder { color: var(--gray-400); }
.search-bar .search-btn { background: var(--brand-500); color: #fff; border-radius: var(--radius-full); padding: 5px 14px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.search-bar .search-btn:active { background: var(--brand-600); }
.app-header .header-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.app-header .header-icon svg { width: 22px; height: 22px; }

/* ===== Scroll Nav ===== */
.scroll-nav { background: var(--white); display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 4px; border-bottom: 1px solid var(--gray-100); position: sticky; top: var(--header-h); z-index: 99; }
.scroll-nav::-webkit-scrollbar { display: none; }
.scroll-nav a { padding: 10px 14px; font-size: 0.82rem; color: var(--gray-600); white-space: nowrap; position: relative; transition: color 0.2s; font-weight: 500; }
.scroll-nav a.active { color: var(--brand-600); font-weight: 700; }
.scroll-nav a.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--brand-500); border-radius: 2px; }

/* ===== Promo Banner Carousel ===== */
.promo-banner { margin: 8px; border-radius: var(--radius-lg); overflow: hidden; position: relative; height: 88px; }
.pb-track { display: flex; height: 100%; width: 100%; transition: transform 0.35s ease; }
.pb-slide { flex: 0 0 100%; width: 100%; height: 100%; display: flex; align-items: center; padding: 0 14px; gap: 10px; text-decoration: none; overflow: hidden; }
.pb-slide[data-idx="0"] { background: linear-gradient(135deg, #4c1d95, #7c3aed); }
.pb-slide[data-idx="1"] { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.pb-slide[data-idx="2"] { background: linear-gradient(135deg, #0369a1, #38bdf8); }
.pb-slide[data-idx="3"] { background: linear-gradient(135deg, #be123c, #fb7185); }
.promo-banner .pb-icon { width: 48px; height: 48px; border-radius: var(--radius); flex-shrink: 0; overflow: hidden; background: rgba(255,255,255,0.15); }
.promo-banner .pb-icon img { width: 100%; height: 100%; object-fit: cover; }
.promo-banner .pb-text { flex: 1; color: #fff; min-width: 0; }
.promo-banner .pb-title { font-size: 0.9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo-banner .pb-desc { font-size: 0.68rem; opacity: 0.9; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo-banner .pb-btn { background: rgba(255,255,255,0.95); color: #1f2937; border-radius: var(--radius-full); padding: 6px 12px; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; white-space: nowrap; }
.pb-dots { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.pb-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.45); transition: 0.2s; }
.pb-dot.active { background: rgba(255,255,255,0.95); width: 14px; border-radius: 3px; }

/* ===== Section ===== */
.section { background: var(--white); margin-top: 8px; padding: 14px 12px; }
.section:first-of-type { margin-top: 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title { font-size: 1rem; font-weight: 700; color: var(--gray-800); display: flex; align-items: center; gap: 6px; }
.section-title::before { content: ''; width: 4px; height: 18px; background: var(--brand-500); border-radius: 2px; flex-shrink: 0; }
.section-more { font-size: 0.72rem; color: var(--gray-400); display: flex; align-items: center; gap: 2px; }
.section-more::after { content: ' ›'; }

/* ===== Category Filter Sticky ===== */
.filter-sticky { background: var(--white); position: sticky; top: calc(var(--header-h) + 38px); z-index: 98; padding: 10px 12px 8px; border-bottom: 1px solid var(--gray-100); }
.cat-scroll { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip { padding: 6px 14px; border-radius: var(--radius-full); border: 1px solid var(--gray-200); font-size: 0.76rem; font-weight: 500; color: var(--gray-600); white-space: nowrap; transition: all 0.2s; background: var(--white); display: flex; align-items: center; gap: 4px; }
.cat-chip .cat-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.cat-chip.active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }

/* ===== Sort + Tag Row ===== */
.sort-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sort-group { display: flex; gap: 2px; background: var(--gray-100); border-radius: var(--radius-full); padding: 2px; flex-shrink: 0; }
.sort-btn { font-size: 0.68rem; color: var(--gray-500); padding: 4px 10px; border-radius: var(--radius-full); white-space: nowrap; }
.sort-btn.active { color: var(--brand-600); background: var(--white); font-weight: 600; box-shadow: var(--shadow-sm); }
.tag-scroll { flex: 1; display: flex; gap: 5px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tag-scroll::-webkit-scrollbar { display: none; }
.tag-chip { font-size: 0.66rem; color: var(--gray-500); padding: 3px 9px; border-radius: var(--radius-full); background: var(--gray-50); border: 1px solid var(--gray-100); white-space: nowrap; }
.tag-chip.active { color: var(--brand-600); background: var(--brand-50); border-color: var(--brand-100); }

/* ===== Game Card ===== */
.game-list { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.game-card { display: flex; gap: 12px; padding: 12px; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--gray-100); transition: box-shadow 0.2s; }
.game-card:active { box-shadow: 0 0 0 1px var(--brand-200); }
.gc-icon { width: 60px; height: 60px; border-radius: var(--radius-lg); object-fit: cover; flex-shrink: 0; background: var(--gray-200); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.gc-body { flex: 1; min-width: 0; }
.gc-top { display: flex; align-items: center; gap: 6px; }
.gc-name { font-size: 0.92rem; font-weight: 700; color: var(--gray-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-rank { font-size: 0.62rem; font-weight: 700; color: #fff; background: var(--orange-500); padding: 1px 7px; border-radius: var(--radius-sm); flex-shrink: 0; }
.gc-rank.top3 { background: var(--red-500); }
.gc-desc { font-size: 0.72rem; color: var(--gray-400); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.gc-tag { font-size: 0.58rem; color: var(--gray-500); background: var(--gray-50); border: 1px solid var(--gray-100); padding: 1px 6px; border-radius: var(--radius-sm); }
.gc-bottom { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.gc-meta { display: flex; align-items: center; gap: 8px; font-size: 0.66rem; color: var(--gray-400); flex: 1; }
.gc-stars { color: #f6b93b; letter-spacing: 0.5px; font-size: 0.7rem; }
.gc-score { font-weight: 700; color: var(--orange-500); }
.gc-size { color: var(--gray-400); }
.gc-dl-btn { background: linear-gradient(135deg, var(--brand-500), var(--brand-600)); color: #fff; border-radius: var(--radius-full); padding: 7px 18px; font-size: 0.74rem; font-weight: 700; flex-shrink: 0; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,191,165,0.3); }
.gc-dl-btn:active { transform: scale(0.95); }

/* ===== Pagination ===== */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 12px 8px; }
.pager a, .pager span { min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); font-size: 0.78rem; color: var(--gray-600); border: 1px solid var(--gray-200); background: var(--white); }
.pager a:active { background: var(--gray-50); }
.pager .active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); font-weight: 700; }
.pager .dots { border: none; background: none; min-width: 18px; }
.pager .disabled { color: var(--gray-300); pointer-events: none; }

/* ===== Opening Servers Mini ===== */
.sf-mini { display: flex; flex-direction: column; gap: 10px; }
.sf-row { display: flex; align-items: center; gap: 10px; }
.sf-icon { width: 40px; height: 40px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; background: var(--gray-200); }
.sf-body { flex: 1; min-width: 0; }
.sf-name { font-size: 0.82rem; font-weight: 600; color: var(--gray-800); }
.sf-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 0.66rem; color: var(--gray-400); }
.sf-status { font-size: 0.58rem; padding: 1px 6px; border-radius: var(--radius-full); font-weight: 600; }
.sf-status.opened { background: var(--green-50); color: var(--green-500); }
.sf-status.today { background: var(--orange-50); color: var(--orange-500); }
.sf-status.soon { background: var(--blue-50); color: var(--blue-500); }
.sf-btn { font-size: 0.68rem; color: var(--brand-600); border: 1px solid var(--brand-500); border-radius: var(--radius-full); padding: 4px 12px; flex-shrink: 0; font-weight: 600; }

/* ===== Bottom Nav ===== */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 750px; margin: 0 auto; height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: var(--white); border-top: 1px solid var(--gray-200); display: flex; z-index: 200; box-shadow: 0 -2px 12px rgba(0,0,0,0.06); }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--gray-400); transition: color 0.2s; position: relative; }
.bn-item.active { color: var(--brand-500); }
.bn-item svg { width: 22px; height: 22px; }
.bn-item .bn-label { font-size: 0.6rem; }
.bn-item .bn-badge { position: absolute; top: 4px; right: 50%; margin-right: -20px; background: var(--red-500); color: #fff; font-size: 0.5rem; padding: 0 4px; border-radius: var(--radius-full); min-width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* ===== Back to Top ===== */
.back-top {
  position: fixed;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 14px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  z-index: 150;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s;
  border: none;
}
.back-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12)); }

/* ===== Toast ===== */
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(31,41,55,0.95); color: #fff; padding: 10px 20px; border-radius: var(--radius-lg); font-size: 0.78rem; z-index: 300; animation: toastIn 0.25s ease, toastOut 0.25s ease 2s forwards; pointer-events: none; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -10px); } }

/* ===== Side Menu ===== */
.side-menu-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 300; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.side-menu-mask.show { opacity: 1; pointer-events: auto; }
.side-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100%; background: var(--white); z-index: 301; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94); overflow-y: auto; padding: 20px; }
.side-menu.show { transform: translateX(0); }
.side-menu-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); }
.side-menu h3 { font-size: 0.9rem; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; margin-top: 20px; }
.side-menu h3:first-child { margin-top: 0; }
.side-menu .sm-link { display: block; padding: 10px 0; font-size: 0.85rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.side-menu .sm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-menu .sm-grid a { padding: 10px; background: var(--gray-50); border-radius: var(--radius); font-size: 0.8rem; color: var(--gray-600); text-align: center; }


/* ===== Reset & Variables ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --brand-50: #e6faf6; --brand-100: #b2f2e6; --brand-500: #00bfa5; --brand-600: #00a68f; --brand-700: #008c79;
  --white: #fff;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827;
  --red-50: #fef2f2; --red-500: #ef4444; --red-600: #dc2626;
  --orange-50: #fff7ed; --orange-400: #fb923c; --orange-500: #f97316;
  --yellow-50: #fefce8; --yellow-500: #eab308;
  --green-50: #f0fdf4; --green-500: #22c55e;
  --blue-50: #eff6ff; --blue-500: #3b82f6;
  --purple-50: #faf5ff; --purple-500: #a855f7;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05); --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); --shadow-md: 0 4px 6px rgba(0,0,0,.07); --shadow-lg: 0 10px 15px rgba(0,0,0,.1);
  --radius-sm: 6px; --radius: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-2xl: 20px; --radius-full: 9999px;
  --transition: 0.2s ease;
  --font: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 56px;
  --header-h: 56px;
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--gray-700); background: var(--gray-50); line-height: 1.6; -webkit-font-smoothing: antialiased; padding-bottom: var(--safe-bottom); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; background: none; }
input { font-family: inherit; outline: none; border: none; }

/* ===== Page Wrapper ===== */
.page { max-width: 750px; margin: 0 auto; background: var(--gray-50); min-height: 100vh; position: relative; }

/* ===== App Header ===== */
.app-header { background: linear-gradient(135deg, #00897b, #00a68f 40%, #00bfa5); padding: 10px 12px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.1); height: var(--header-h); }
.app-header .logo { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.app-header .logo-icon { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; }
.app-header .logo-icon svg { width: 100%; height: 100%; display: block; }
.app-header .logo-text { color: #fff; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.app-header .logo-text .brand { color: #b2f2e6; }
.search-bar { flex: 1; min-width: 0; display: flex; align-items: center; background: rgba(255,255,255,0.95); border-radius: var(--radius-full); padding: 0 4px 0 14px; height: 36px; gap: 6px; }
.search-bar svg { width: 16px; height: 16px; color: var(--gray-400); flex-shrink: 0; }
.search-bar input { flex: 1; font-size: 0.8rem; color: var(--gray-700); background: transparent; min-width: 0; }
.search-bar input::placeholder { color: var(--gray-400); }
.search-bar .search-btn { background: var(--brand-500); color: #fff; border-radius: var(--radius-full); padding: 5px 14px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.search-bar .search-btn:active { background: var(--brand-600); }
.app-header .header-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.app-header .header-icon svg { width: 22px; height: 22px; }

/* ===== Scroll Nav ===== */
.scroll-nav { background: var(--white); display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 4px; border-bottom: 1px solid var(--gray-100); position: sticky; top: var(--header-h); z-index: 99; }
.scroll-nav::-webkit-scrollbar { display: none; }
.scroll-nav a { padding: 10px 14px; font-size: 0.82rem; color: var(--gray-600); white-space: nowrap; position: relative; transition: color 0.2s; font-weight: 500; }
.scroll-nav a.active { color: var(--brand-600); font-weight: 700; }
.scroll-nav a.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--brand-500); border-radius: 2px; }

/* ===== Promo Banner Carousel ===== */
.promo-banner { margin: 8px; border-radius: var(--radius-lg); overflow: hidden; position: relative; height: 88px; }
.pb-track { display: flex; height: 100%; width: 100%; transition: transform 0.35s ease; }
.pb-slide { flex: 0 0 100%; width: 100%; height: 100%; display: flex; align-items: center; padding: 0 14px; gap: 10px; text-decoration: none; box-sizing: border-box; overflow: hidden; }
.pb-slide[data-idx="0"] { background: linear-gradient(135deg, #4c1d95, #7c3aed); }
.pb-slide[data-idx="1"] { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.pb-slide[data-idx="2"] { background: linear-gradient(135deg, #0369a1, #38bdf8); }
.pb-slide[data-idx="3"] { background: linear-gradient(135deg, #be123c, #fb7185); }
.promo-banner .pb-icon { width: 48px; height: 48px; border-radius: var(--radius); flex-shrink: 0; overflow: hidden; background: rgba(255,255,255,0.15); }
.promo-banner .pb-icon img { width: 100%; height: 100%; object-fit: cover; }
.promo-banner .pb-text { flex: 1; color: #fff; min-width: 0; overflow: hidden; }
.promo-banner .pb-title { font-size: 0.9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo-banner .pb-desc { font-size: 0.68rem; opacity: 0.9; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo-banner .pb-btn { background: rgba(255,255,255,0.95); color: #1f2937; border-radius: var(--radius-full); padding: 6px 12px; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; white-space: nowrap; }
.pb-dots { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.pb-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.45); transition: 0.2s; }
.pb-dot.active { background: rgba(255,255,255,0.95); width: 14px; border-radius: 3px; }

/* ===== Section ===== */
.section { background: var(--white); margin-top: 8px; padding: 14px 12px; }
.section:first-of-type { margin-top: 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title { font-size: 1rem; font-weight: 700; color: var(--gray-800); display: flex; align-items: center; gap: 6px; }
.section-title::before { content: ''; width: 4px; height: 18px; background: var(--brand-500); border-radius: 2px; flex-shrink: 0; }
.section-more { font-size: 0.72rem; color: var(--gray-400); display: flex; align-items: center; gap: 2px; }
.section-more::after { content: ' ›'; }

/* ===== Category Filter Sticky ===== */
.filter-sticky { background: var(--white); position: sticky; top: calc(var(--header-h) + 38px); z-index: 98; padding: 10px 12px 8px; border-bottom: 1px solid var(--gray-100); }
.cat-scroll { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip { padding: 6px 14px; border-radius: var(--radius-full); border: 1px solid var(--gray-200); font-size: 0.76rem; font-weight: 500; color: var(--gray-600); white-space: nowrap; transition: all 0.2s; background: var(--white); display: flex; align-items: center; gap: 4px; }
.cat-chip .cat-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.cat-chip.active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }

/* ===== Sort + Tag Row ===== */
.sort-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sort-group { display: flex; gap: 2px; background: var(--gray-100); border-radius: var(--radius-full); padding: 2px; flex-shrink: 0; }
.sort-btn { font-size: 0.68rem; color: var(--gray-500); padding: 4px 10px; border-radius: var(--radius-full); white-space: nowrap; }
.sort-btn.active { color: var(--brand-600); background: var(--white); font-weight: 600; box-shadow: var(--shadow-sm); }
.tag-scroll { flex: 1; display: flex; gap: 5px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tag-scroll::-webkit-scrollbar { display: none; }
.tag-chip { font-size: 0.66rem; color: var(--gray-500); padding: 3px 9px; border-radius: var(--radius-full); background: var(--gray-50); border: 1px solid var(--gray-100); white-space: nowrap; }
.tag-chip.active { color: var(--brand-600); background: var(--brand-50); border-color: var(--brand-100); }

/* ===== Game Card ===== */
.game-list { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.game-card { display: flex; gap: 12px; padding: 12px; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--gray-100); transition: box-shadow 0.2s; }
.game-card:active { box-shadow: 0 0 0 1px var(--brand-200); }
.gc-icon { width: 60px; height: 60px; border-radius: var(--radius-lg); object-fit: cover; flex-shrink: 0; background: var(--gray-200); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.gc-body { flex: 1; min-width: 0; }
.gc-top { display: flex; align-items: center; gap: 6px; }
.gc-name { font-size: 0.92rem; font-weight: 700; color: var(--gray-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-rank { font-size: 0.62rem; font-weight: 700; color: #fff; background: var(--orange-500); padding: 1px 7px; border-radius: var(--radius-sm); flex-shrink: 0; }
.gc-rank.top3 { background: var(--red-500); }
.gc-desc { font-size: 0.72rem; color: var(--gray-400); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.gc-tag { font-size: 0.58rem; color: var(--gray-500); background: var(--gray-50); border: 1px solid var(--gray-100); padding: 1px 6px; border-radius: var(--radius-sm); }
.gc-bottom { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.gc-meta { display: flex; align-items: center; gap: 8px; font-size: 0.66rem; color: var(--gray-400); flex: 1; }
.gc-stars { color: #f6b93b; letter-spacing: 0.5px; font-size: 0.7rem; }
.gc-score { font-weight: 700; color: var(--orange-500); }
.gc-size { color: var(--gray-400); }
.gc-dl-btn { background: linear-gradient(135deg, var(--brand-500), var(--brand-600)); color: #fff; border-radius: var(--radius-full); padding: 7px 18px; font-size: 0.74rem; font-weight: 700; flex-shrink: 0; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,191,165,0.3); }
.gc-dl-btn:active { transform: scale(0.95); }

/* ===== Pagination ===== */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 12px 8px; }
.pager a, .pager span { min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); font-size: 0.78rem; color: var(--gray-600); border: 1px solid var(--gray-200); background: var(--white); }
.pager a:active { background: var(--gray-50); }
.pager .active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); font-weight: 700; }
.pager .dots { border: none; background: none; min-width: 18px; }
.pager .disabled { color: var(--gray-300); pointer-events: none; }

/* ===== Opening Servers Mini ===== */
.sf-mini { display: flex; flex-direction: column; gap: 10px; }
.sf-row { display: flex; align-items: center; gap: 10px; }
.sf-icon { width: 40px; height: 40px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; background: var(--gray-200); }
.sf-body { flex: 1; min-width: 0; }
.sf-name { font-size: 0.82rem; font-weight: 600; color: var(--gray-800); }
.sf-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 0.66rem; color: var(--gray-400); }
.sf-status { font-size: 0.58rem; padding: 1px 6px; border-radius: var(--radius-full); font-weight: 600; }
.sf-status.opened { background: var(--green-50); color: var(--green-500); }
.sf-status.today { background: var(--orange-50); color: var(--orange-500); }
.sf-status.soon { background: var(--blue-50); color: var(--blue-500); }
.sf-btn { font-size: 0.68rem; color: var(--brand-600); border: 1px solid var(--brand-500); border-radius: var(--radius-full); padding: 4px 12px; flex-shrink: 0; font-weight: 600; }

/* ===== Bottom Nav ===== */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 750px; margin: 0 auto; height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: var(--white); border-top: 1px solid var(--gray-200); display: flex; z-index: 200; box-shadow: 0 -2px 12px rgba(0,0,0,0.06); }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--gray-400); transition: color 0.2s; position: relative; }
.bn-item.active { color: var(--brand-500); }
.bn-item svg { width: 22px; height: 22px; }
.bn-item .bn-label { font-size: 0.6rem; }
.bn-item .bn-badge { position: absolute; top: 4px; right: 50%; margin-right: -20px; background: var(--red-500); color: #fff; font-size: 0.5rem; padding: 0 4px; border-radius: var(--radius-full); min-width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* ===== Back to Top ===== */
.back-top {
  position: fixed;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 14px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  z-index: 150;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s;
  border: none;
}
.back-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12)); }

/* ===== Toast ===== */
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(31,41,55,0.95); color: #fff; padding: 10px 20px; border-radius: var(--radius-lg); font-size: 0.78rem; z-index: 300; animation: toastIn 0.25s ease, toastOut 0.25s ease 2s forwards; pointer-events: none; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -10px); } }

/* ===== Side Menu ===== */
.side-menu-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 300; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.side-menu-mask.show { opacity: 1; pointer-events: auto; }
.side-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100%; background: var(--white); z-index: 301; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94); overflow-y: auto; padding: 20px; }
.side-menu.show { transform: translateX(0); }
.side-menu-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); }
.side-menu h3 { font-size: 0.9rem; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; margin-top: 20px; }
.side-menu h3:first-child { margin-top: 0; }
.side-menu .sm-link { display: block; padding: 10px 0; font-size: 0.85rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.side-menu .sm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-menu .sm-grid a { padding: 10px; background: var(--gray-50); border-radius: var(--radius); font-size: 0.8rem; color: var(--gray-600); text-align: center; }


/* ===== Reset & Variables ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --brand-50: #e6faf6; --brand-100: #b2f2e6; --brand-500: #00bfa5; --brand-600: #00a68f; --brand-700: #008c79;
  --white: #fff;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827;
  --red-50: #fef2f2; --red-500: #ef4444; --red-600: #dc2626;
  --orange-50: #fff7ed; --orange-400: #fb923c; --orange-500: #f97316;
  --yellow-50: #fefce8; --yellow-500: #eab308;
  --green-50: #f0fdf4; --green-500: #22c55e;
  --blue-50: #eff6ff; --blue-500: #3b82f6;
  --purple-50: #faf5ff; --purple-500: #a855f7;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05); --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); --shadow-md: 0 4px 6px rgba(0,0,0,.07); --shadow-lg: 0 10px 15px rgba(0,0,0,.1);
  --radius-sm: 6px; --radius: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-2xl: 20px; --radius-full: 9999px;
  --transition: 0.2s ease;
  --font: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 56px;
  --header-h: 56px;
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--gray-700); background: var(--gray-50); line-height: 1.6; -webkit-font-smoothing: antialiased; padding-bottom: var(--safe-bottom); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; font-family: inherit; cursor: pointer; }

/* ===== Detail Header ===== */
.detail-header { background: linear-gradient(135deg, #00897b, #00bfa5); padding: 10px 12px; display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.1); height: var(--header-h); }
.dh-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; border-radius: 50%; transition: background 0.2s; }
.dh-btn:active { background: rgba(255,255,255,0.15); }
.dh-btn svg { width: 22px; height: 22px; }
.dh-title { flex: 1; text-align: center; font-size: 0.9rem; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Gift Hero ===== */
.gift-hero { margin: 10px 12px 0; border-radius: var(--radius-xl); overflow: hidden; background: var(--white); box-shadow: var(--shadow-md); }
.gh-cover { background: linear-gradient(120deg, #ff6b81, #ff4757); padding: 18px 16px; display: flex; gap: 14px; align-items: center; }
.gh-icon { width: 68px; height: 68px; border-radius: 14px; object-fit: cover; border: 2px solid rgba(255,255,255,0.45); background: #fff; flex-shrink: 0; box-shadow: 0 4px 14px rgba(0,0,0,0.18); }
.gh-info { flex: 1; min-width: 0; color: #fff; }
.gh-name { font-size: 1.05rem; font-weight: 800; color: #fff; line-height: 1.3; }
.gh-game { display: flex; align-items: center; gap: 4px; font-size: 0.74rem; opacity: 0.94; margin-top: 4px; }
.gh-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.gh-tag { font-size: 0.62rem; padding: 2px 9px; border-radius: var(--radius-full); font-weight: 600; background: rgba(255,255,255,0.95); color: #e83647; }
.gh-tag.free { color: #fff; background: rgba(255,255,255,0.22); }
.gh-tag.vip { color: #8b5cf6; background: #fff; }
.gh-meta { display: grid; grid-template-columns: 1fr 1fr; padding: 14px 16px 4px; row-gap: 12px; }
.gh-meta-item { }
.gh-meta-label { font-size: 0.66rem; color: var(--gray-400); }
.gh-meta-value { font-size: 0.95rem; font-weight: 800; color: var(--gray-800); margin-top: 2px; }
.gh-meta-value.orange { color: var(--orange-500); }
.gh-meta-value.brand { color: var(--brand-600); }
.gh-meta-value.red { color: var(--red-500); }
.gh-desc { padding: 6px 16px 0; font-size: 0.74rem; color: var(--gray-500); }
.gh-claim { padding: 12px 16px 16px; }
.gh-claim-btn { display: block; width: 100%; background: linear-gradient(120deg, #ff6b81, #ff4757); color: #fff; border-radius: var(--radius-full); padding: 12px 0; font-size: 0.9rem; font-weight: 800; letter-spacing: 2px; box-shadow: 0 4px 14px rgba(255,71,87,0.35); transition: transform 0.15s; }
.gh-claim-btn:active { transform: scale(0.98); }
.gh-claim-btn.done { background: var(--gray-200); color: var(--gray-400); box-shadow: none; }

/* ===== Section Card ===== */
.gift-sec { margin: 10px 12px 0; border-radius: var(--radius-xl); background: var(--white); box-shadow: var(--shadow-sm); padding: 14px 14px 6px; }
.gs-title { display: flex; align-items: center; gap: 7px; font-size: 0.88rem; font-weight: 800; color: var(--gray-800); margin-bottom: 4px; }
.gs-title::before { content: ''; width: 4px; height: 16px; background: linear-gradient(180deg, #ff6b81, #ff4757); border-radius: 2px; flex-shrink: 0; }

/* ===== Gift Items ===== */
.gift-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.gift-item:last-child { border-bottom: none; }
.gi-box { width: 40px; height: 40px; border-radius: 10px; background: var(--gray-50); border: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.gi-box svg { width: 20px; height: 20px; color: var(--brand-600); }
.gi-main { flex: 1; min-width: 0; }
.gi-name-row { display: flex; align-items: center; gap: 8px; }
.gi-name { font-size: 0.84rem; font-weight: 700; color: var(--gray-800); }
.gi-qty { font-size: 0.78rem; font-weight: 800; color: #ff4757; background: var(--red-50); padding: 1px 8px; border-radius: var(--radius-full); }
.gi-desc { font-size: 0.7rem; color: var(--gray-400); margin-top: 2px; }

/* ===== Steps ===== */
.gstep { display: flex; gap: 12px; padding: 10px 0; }
.gstep:last-child { border-bottom: none; }
.gstep-num { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(120deg, #ff6b81, #ff4757); color: #fff; font-size: 0.72rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.gstep-body { flex: 1; min-width: 0; }
.gstep-title { font-size: 0.82rem; font-weight: 700; color: var(--gray-800); }
.gstep-desc { font-size: 0.72rem; color: var(--gray-400); margin-top: 2px; line-height: 1.55; }

/* ===== Notice ===== */
.gift-notice { margin: 6px 0 12px; background: var(--red-50); border: 1px solid #fecaca; border-radius: var(--radius-lg); padding: 12px 14px; }
.gift-notice-title { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; color: #e83647; margin-bottom: 6px; }
.gift-notice-title svg { width: 14px; height: 14px; }
.gift-notice ul { list-style: none; }
.gift-notice li { font-size: 0.7rem; color: var(--gray-500); line-height: 1.8; padding-left: 12px; position: relative; }
.gift-notice li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 4px; height: 4px; border-radius: 50%; background: #ff6b81; }

/* ===== Related Gifts ===== */
.related-sec { margin: 10px 12px 0; border-radius: var(--radius-xl); background: var(--white); box-shadow: var(--shadow-sm); padding: 14px 14px 12px; }
.related-scroll { display: flex; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 8px 0 2px; }
.related-scroll::-webkit-scrollbar { display: none; }
.related-card { flex-shrink: 0; width: 138px; background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius-lg); padding: 10px; }
.related-card:active { background: var(--gray-100); }
.rc-top { display: flex; gap: 8px; align-items: center; }
.rc-icon { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; background: var(--gray-200); flex-shrink: 0; }
.rc-name { font-size: 0.74rem; font-weight: 700; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-game { font-size: 0.62rem; color: var(--gray-400); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.rc-value { font-size: 0.72rem; font-weight: 800; color: #ff4757; }
.rc-remain { font-size: 0.6rem; color: var(--gray-400); }
.rc-go { width: 46px; height: 22px; border-radius: var(--radius-full); background: linear-gradient(120deg, #ff6b81, #ff4757); color: #fff; font-size: 0.6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ===== App Footer ===== */
.app-footer { background: var(--gray-800); color: var(--gray-400); padding: 20px 16px; text-align: center; margin-top: 12px; }
.app-footer p { font-size: 0.7rem; line-height: 1.8; }
.app-footer .footer-links { display: flex; justify-content: center; gap: 12px; margin-bottom: 6px; }
.app-footer .footer-links a { font-size: 0.7rem; color: var(--gray-400); }
.app-footer .footer-links a:active { color: var(--white); }

/* ===== Bottom Nav ===== */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 750px; margin: 0 auto; height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: var(--white); border-top: 1px solid var(--gray-200); display: flex; z-index: 200; box-shadow: 0 -2px 12px rgba(0,0,0,0.06); }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--gray-400); transition: color 0.2s; position: relative; }
.bn-item.active { color: var(--brand-600); }
.bn-item svg { width: 21px; height: 21px; }
.bn-item .bn-label { font-size: 0.6rem; }
.bn-item .bn-badge { position: absolute; top: 4px; right: 50%; margin-right: -20px; background: var(--red-500); color: #fff; font-size: 0.5rem; padding: 0 4px; border-radius: var(--radius-full); min-width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* ===== Back to Top ===== */
.back-top {
  position: fixed;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 14px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  z-index: 150;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s;
  border: none;
}
.back-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12)); }

/* ===== Side Menu ===== */
.side-menu-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 400; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.side-menu-mask.show { opacity: 1; pointer-events: auto; }
.side-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100%; background: var(--white); z-index: 401; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94); overflow-y: auto; padding: 20px; }
.side-menu.show { transform: translateX(0); }
.side-menu-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); }
.side-menu h3 { font-size: 0.9rem; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; margin-top: 20px; }
.side-menu h3:first-child { margin-top: 0; }
.side-menu .sm-link { display: block; padding: 10px 0; font-size: 0.85rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.side-menu .sm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-menu .sm-grid a { padding: 10px; background: var(--gray-50); border-radius: var(--radius); font-size: 0.8rem; color: var(--gray-600); text-align: center; }

/* ===== Toast ===== */
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(31,41,55,0.95); color: #fff; padding: 10px 20px; border-radius: var(--radius-lg); font-size: 0.78rem; z-index: 300; animation: toastIn 0.25s ease, toastOut 0.25s ease 2s forwards; pointer-events: none; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -10px); } }

/* ===== Gift Modal ===== */
.gift-modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 300; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.gift-modal-mask.show { opacity: 1; pointer-events: auto; }
.gift-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); width: 84%; max-width: 340px; background: var(--white); border-radius: var(--radius-2xl); z-index: 301; padding: 24px 20px 20px; text-align: center; transition: transform 0.25s cubic-bezier(0.25,0.46,0.45,0.94); box-shadow: 0 20px 50px rgba(0,0,0,0.2); opacity: 0; pointer-events: none; }
.gift-modal.show { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.gm-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--green-50); display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.gm-icon svg { width: 30px; height: 30px; color: var(--green-500); }
.gm-title { font-size: 0.98rem; font-weight: 800; color: var(--gray-800); }
.gm-sub { font-size: 0.72rem; color: var(--gray-400); margin-top: 4px; }
.gm-code { margin: 14px auto 4px; background: var(--gray-50); border: 1.5px dashed var(--brand-500); border-radius: var(--radius); padding: 10px; font-size: 1rem; font-weight: 800; letter-spacing: 3px; color: var(--brand-700); font-family: monospace; }
.gm-tip { font-size: 0.62rem; color: var(--gray-400); margin-top: 8px; }
.gm-btn { display: block; width: 100%; margin-top: 14px; background: linear-gradient(135deg, var(--brand-500), var(--brand-600)); color: #fff; border-radius: var(--radius-full); padding: 11px 0; font-size: 0.82rem; font-weight: 700; }
.gm-btn:active { opacity: 0.9; }


/* ===== Reset & Variables ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --brand-50: #e6faf6; --brand-100: #b2f2e6; --brand-500: #00bfa5; --brand-600: #00a68f; --brand-700: #008c79;
  --white: #fff;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827;
  --red-50: #fef2f2; --red-500: #ef4444; --red-600: #dc2626;
  --orange-50: #fff7ed; --orange-400: #fb923c; --orange-500: #f97316;
  --yellow-50: #fefce8; --yellow-500: #eab308;
  --green-50: #f0fdf4; --green-500: #22c55e;
  --blue-50: #eff6ff; --blue-500: #3b82f6;
  --purple-50: #faf5ff; --purple-500: #a855f7;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05); --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); --shadow-md: 0 4px 6px rgba(0,0,0,.07); --shadow-lg: 0 10px 15px rgba(0,0,0,.1);
  --radius-sm: 6px; --radius: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-2xl: 20px; --radius-full: 9999px;
  --transition: 0.2s ease;
  --font: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 56px;
  --header-h: 56px;
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--gray-700); background: var(--gray-50); line-height: 1.6; -webkit-font-smoothing: antialiased; padding-bottom: var(--safe-bottom); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; background: none; }
input { font-family: inherit; outline: none; border: none; }

/* ===== Page Wrapper ===== */
.page { max-width: 750px; margin: 0 auto; background: var(--gray-50); min-height: 100vh; position: relative; }

/* ===== App Header ===== */
.app-header { background: linear-gradient(135deg, #00897b, #00a68f 40%, #00bfa5); padding: 10px 12px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.1); height: var(--header-h); }
.app-header .logo { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.app-header .logo-icon { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; }
.app-header .logo-icon svg { width: 100%; height: 100%; display: block; }
.app-header .logo-text { color: #fff; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.app-header .logo-text .brand { color: #b2f2e6; }
.search-bar { flex: 1; min-width: 0; display: flex; align-items: center; background: rgba(255,255,255,0.95); border-radius: var(--radius-full); padding: 0 4px 0 14px; height: 36px; gap: 6px; }
.search-bar svg { width: 16px; height: 16px; color: var(--gray-400); flex-shrink: 0; }
.search-bar input { flex: 1; font-size: 0.8rem; color: var(--gray-700); background: transparent; min-width: 0; }
.search-bar input::placeholder { color: var(--gray-400); }
.search-bar .search-btn { background: var(--brand-500); color: #fff; border-radius: var(--radius-full); padding: 5px 14px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.search-bar .search-btn:active { background: var(--brand-600); }
.app-header .header-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.app-header .header-icon svg { width: 22px; height: 22px; }

/* ===== Scroll Nav ===== */
.scroll-nav { background: var(--white); display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 4px; border-bottom: 1px solid var(--gray-100); position: sticky; top: var(--header-h); z-index: 99; }
.scroll-nav::-webkit-scrollbar { display: none; }
.scroll-nav a { padding: 10px 14px; font-size: 0.82rem; color: var(--gray-600); white-space: nowrap; position: relative; transition: color 0.2s; font-weight: 500; }
.scroll-nav a.active { color: var(--brand-600); font-weight: 700; }
.scroll-nav a.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--brand-500); border-radius: 2px; }

/* ===== Gift Banner ===== */
.gift-banner { margin: 10px 12px 0; border-radius: var(--radius-lg); overflow: hidden; position: relative; height: 96px; background: linear-gradient(120deg, #ff6b81, #ff4757); display: flex; align-items: center; padding: 0 18px; gap: 14px; box-shadow: 0 4px 14px rgba(255,71,87,0.25); }
.gift-banner .gb-icon { width: 52px; height: 52px; border-radius: var(--radius); background: rgba(255,255,255,0.22); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.gift-banner .gb-icon svg { width: 30px; height: 30px; color: #fff; }
.gift-banner .gb-text { flex: 1; color: #fff; }
.gift-banner .gb-title { font-size: 1rem; font-weight: 800; }
.gift-banner .gb-desc { font-size: 0.7rem; opacity: 0.92; margin-top: 3px; }

/* ===== Category Filter ===== */
.filter-sticky { background: var(--white); position: sticky; top: calc(var(--header-h) + 38px); z-index: 98; padding: 10px 12px 8px; border-bottom: 1px solid var(--gray-100); }
.cat-scroll { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip { padding: 6px 14px; border-radius: var(--radius-full); border: 1px solid var(--gray-200); font-size: 0.76rem; font-weight: 500; color: var(--gray-600); white-space: nowrap; transition: all 0.2s; background: var(--white); display: flex; align-items: center; gap: 4px; }
.cat-chip.active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.sort-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sort-group { display: flex; gap: 2px; background: var(--gray-100); border-radius: var(--radius-full); padding: 2px; flex-shrink: 0; }
.sort-btn { font-size: 0.68rem; color: var(--gray-500); padding: 4px 10px; border-radius: var(--radius-full); white-space: nowrap; }
.sort-btn.active { color: var(--brand-600); background: var(--white); font-weight: 600; box-shadow: var(--shadow-sm); }

/* ===== Gift List ===== */
.gift-list { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.gift-card { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--gray-100); overflow: hidden; position: relative; box-shadow: var(--shadow-sm); }
.gift-card:active { box-shadow: 0 0 0 1px var(--brand-200); }
.gift-type-tag { position: absolute; top: 10px; left: 0; padding: 2px 10px 2px 8px; border-radius: 0 var(--radius-full) var(--radius-full) 0; font-size: 0.6rem; font-weight: 700; color: #fff; z-index: 1; }
.gift-type-tag.new { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.gift-type-tag.hot { background: linear-gradient(135deg, #ff6b6b, #ff4757); }
.gift-type-tag.limited { background: linear-gradient(135deg, #a855f7, #8b5cf6); }
.gift-type-tag.vip { background: linear-gradient(135deg, #f59e0b, #f97316); }
.gift-card-top { display: flex; gap: 10px; padding: 14px 12px 10px; align-items: center; }
.gift-icon { width: 52px; height: 52px; border-radius: var(--radius-lg); object-fit: cover; flex-shrink: 0; background: var(--gray-200); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.gift-info { flex: 1; min-width: 0; }
.gift-name { font-size: 0.9rem; font-weight: 700; color: var(--gray-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gift-game-name { font-size: 0.7rem; color: var(--gray-400); margin-top: 2px; }
.gift-items { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 12px; }
.gift-item { font-size: 0.62rem; color: var(--gray-500); background: var(--gray-50); border: 1px solid var(--gray-100); padding: 2px 8px; border-radius: var(--radius-sm); }
.gift-card-bottom { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 12px; }
.gift-value { display: flex; align-items: baseline; gap: 6px; }
.gift-value-label { font-size: 0.6rem; color: var(--gray-400); }
.gift-value-num { font-size: 0.95rem; font-weight: 800; color: var(--orange-500); }
.gift-remain { font-size: 0.62rem; color: var(--gray-400); margin-left: 6px; }
.gift-remain b { color: var(--brand-600); }
.gift-btn { background: linear-gradient(135deg, var(--brand-500), var(--brand-600)); color: #fff; border-radius: var(--radius-full); padding: 8px 22px; font-size: 0.76rem; font-weight: 700; box-shadow: 0 2px 8px rgba(0,191,165,0.3); white-space: nowrap; }
.gift-btn:active { transform: scale(0.95); }
.gift-btn.done { background: var(--gray-200); color: var(--gray-400); box-shadow: none; }

/* ===== Load More ===== */
.load-more { text-align: center; padding: 14px 0 4px; }
.load-more span { display: inline-block; padding: 8px 28px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-full); font-size: 0.76rem; color: var(--gray-500); }
.load-more span:active { background: var(--gray-50); }

/* ===== Bottom Nav ===== */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 750px; margin: 0 auto; height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: var(--white); border-top: 1px solid var(--gray-200); display: flex; z-index: 200; box-shadow: 0 -2px 12px rgba(0,0,0,0.06); }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--gray-400); transition: color 0.2s; position: relative; }
.bn-item.active { color: var(--brand-500); }
.bn-item svg { width: 22px; height: 22px; }
.bn-item .bn-label { font-size: 0.6rem; }
.bn-item .bn-badge { position: absolute; top: 4px; right: 50%; margin-right: -20px; background: var(--red-500); color: #fff; font-size: 0.5rem; padding: 0 4px; border-radius: var(--radius-full); min-width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* ===== App Footer ===== */
.app-footer { background: var(--gray-800); color: var(--gray-400); padding: 20px 16px; text-align: center; margin-top: 12px; }
.app-footer p { font-size: 0.7rem; line-height: 1.8; }
.app-footer .footer-links { display: flex; justify-content: center; gap: 12px; margin-bottom: 6px; }
.app-footer .footer-links a { font-size: 0.7rem; color: var(--gray-400); }
.app-footer .footer-links a:active { color: var(--white); }

/* ===== Back to Top ===== */
.back-top {
  position: fixed;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 14px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  z-index: 150;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s;
  border: none;
}
.back-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12)); }

/* ===== Toast ===== */
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(31,41,55,0.95); color: #fff; padding: 10px 20px; border-radius: var(--radius-lg); font-size: 0.78rem; z-index: 300; animation: toastIn 0.25s ease, toastOut 0.25s ease 2s forwards; pointer-events: none; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -10px); } }

/* ===== Gift Modal ===== */
.gift-modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 300; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.gift-modal-mask.show { opacity: 1; pointer-events: auto; }
.gift-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); width: 84%; max-width: 340px; background: var(--white); border-radius: var(--radius-2xl); z-index: 301; padding: 24px 20px 20px; text-align: center; transition: transform 0.25s cubic-bezier(0.25,0.46,0.45,0.94); box-shadow: 0 20px 50px rgba(0,0,0,0.2); opacity: 0; pointer-events: none; }
.gift-modal.show { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.gm-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--green-50); display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.gm-icon svg { width: 30px; height: 30px; color: var(--green-500); }
.gm-title { font-size: 0.98rem; font-weight: 800; color: var(--gray-800); }
.gm-sub { font-size: 0.72rem; color: var(--gray-400); margin-top: 4px; }
.gm-code { margin: 14px auto 4px; background: var(--gray-50); border: 1.5px dashed var(--brand-500); border-radius: var(--radius); padding: 10px; font-size: 1rem; font-weight: 800; letter-spacing: 3px; color: var(--brand-700); font-family: monospace; }
.gm-tip { font-size: 0.62rem; color: var(--gray-400); margin-top: 8px; }
.gm-btn { display: block; width: 100%; margin-top: 14px; background: linear-gradient(135deg, var(--brand-500), var(--brand-600)); color: #fff; border-radius: var(--radius-full); padding: 11px 0; font-size: 0.82rem; font-weight: 700; }
.gm-btn:active { opacity: 0.9; }

/* ===== Side Menu ===== */
.side-menu-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 400; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.side-menu-mask.show { opacity: 1; pointer-events: auto; }
.side-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100%; background: var(--white); z-index: 401; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94); overflow-y: auto; padding: 20px; }
.side-menu.show { transform: translateX(0); }
.side-menu-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); }
.side-menu h3 { font-size: 0.9rem; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; margin-top: 20px; }
.side-menu h3:first-child { margin-top: 0; }
.side-menu .sm-link { display: block; padding: 10px 0; font-size: 0.85rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.side-menu .sm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-menu .sm-grid a { padding: 10px; background: var(--gray-50); border-radius: var(--radius); font-size: 0.8rem; color: var(--gray-600); text-align: center; }


/* ===== Reset & Variables ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --brand-50: #e6faf6; --brand-100: #b2f2e6; --brand-500: #00bfa5; --brand-600: #00a68f; --brand-700: #008c79;
  --white: #fff;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827;
  --red-50: #fef2f2; --red-500: #ef4444; --red-600: #dc2626;
  --orange-50: #fff7ed; --orange-400: #fb923c; --orange-500: #f97316;
  --yellow-50: #fefce8; --yellow-500: #eab308;
  --green-50: #f0fdf4; --green-500: #22c55e;
  --blue-50: #eff6ff; --blue-500: #3b82f6;
  --purple-50: #faf5ff; --purple-500: #a855f7;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05); --shadow: 0 1px 3px rgba(0,0,0,.1); --shadow-md: 0 4px 6px rgba(0,0,0,.07); --shadow-lg: 0 10px 15px rgba(0,0,0,.1);
  --radius-sm: 6px; --radius: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-2xl: 20px; --radius-full: 9999px;
  --font: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 56px;
  --header-h: 56px;
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--gray-700); background: var(--gray-50); line-height: 1.6; -webkit-font-smoothing: antialiased; padding-bottom: var(--safe-bottom); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; background: none; }
input { font-family: inherit; outline: none; border: none; }

/* ===== Page Wrapper ===== */
.page { max-width: 750px; margin: 0 auto; background: var(--gray-50); min-height: 100vh; position: relative; }

/* ===== App Header ===== */
.app-header { background: linear-gradient(135deg, #00897b, #00a68f 40%, #00bfa5); padding: 10px 12px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.1); height: var(--header-h); }
.app-header .logo { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.app-header .logo-icon { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; }
.app-header .logo-icon svg { width: 100%; height: 100%; display: block; }
.app-header .logo-text { color: #fff; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.app-header .logo-text .brand { color: #b2f2e6; }
.search-bar { flex: 1; min-width: 0; display: flex; align-items: center; background: rgba(255,255,255,0.95); border-radius: var(--radius-full); padding: 0 4px 0 14px; height: 36px; gap: 6px; }
.search-bar svg { width: 16px; height: 16px; color: var(--gray-400); flex-shrink: 0; }
.search-bar input { flex: 1; font-size: 0.8rem; color: var(--gray-700); background: transparent; min-width: 0; }
.search-bar input::placeholder { color: var(--gray-400); }
.search-bar .search-btn { background: var(--brand-500); color: #fff; border-radius: var(--radius-full); padding: 5px 14px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.search-bar .search-btn:active { background: var(--brand-600); }
.app-header .header-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.app-header .header-icon svg { width: 22px; height: 22px; }

/* ===== Scroll Nav ===== */
.scroll-nav { background: var(--white); display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 4px; border-bottom: 1px solid var(--gray-100); position: sticky; top: var(--header-h); z-index: 99; }
.scroll-nav::-webkit-scrollbar { display: none; }
.scroll-nav a { padding: 10px 14px; font-size: 0.82rem; color: var(--gray-600); white-space: nowrap; position: relative; transition: color 0.2s; font-weight: 500; }
.scroll-nav a.active { color: var(--brand-600); font-weight: 700; }
.scroll-nav a.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--brand-500); border-radius: 2px; }

/* ===== Section ===== */
.section { background: var(--white); margin-top: 8px; padding: 14px 12px; }
.section:first-of-type { margin-top: 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title { font-size: 1rem; font-weight: 700; color: var(--gray-800); display: flex; align-items: center; gap: 6px; }
.section-title::before { content: ''; width: 4px; height: 18px; background: var(--brand-500); border-radius: 2px; flex-shrink: 0; }
.section-more { font-size: 0.72rem; color: var(--gray-400); }
.section-more::after { content: ' ›'; }

/* ===== Channel Tabs (Sticky) ===== */
.channel-sticky { background: var(--white); position: sticky; top: calc(var(--header-h) + 38px); z-index: 98; padding: 10px 12px; border-bottom: 1px solid var(--gray-100); }
.channel-scroll { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.channel-scroll::-webkit-scrollbar { display: none; }
.ch-btn { padding: 6px 14px; border-radius: var(--radius-full); border: 1px solid var(--gray-200); font-size: 0.76rem; font-weight: 500; color: var(--gray-600); white-space: nowrap; background: var(--white); transition: all 0.2s; }
.ch-btn.active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }

/* ===== Featured Headlines ===== */
.headline-scroll { display: flex; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 2px 0; }
.headline-scroll::-webkit-scrollbar { display: none; }
.hl-card { width: 280px; height: 148px; border-radius: var(--radius-lg); overflow: hidden; position: relative; flex-shrink: 0; background: #1f2a44; }
.hl-card:active { opacity: 0.9; }
.hl-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hl-mask { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.85) 8%, rgba(0,0,0,0.1) 70%); }
.hl-text { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px; color: #fff; }
.hl-badge { display: inline-block; font-size: 0.58rem; padding: 2px 8px; border-radius: var(--radius-full); margin-bottom: 6px; font-weight: 600; }
.hl-badge.news { background: var(--red-500); color: #fff; }
.hl-badge.guide { background: var(--brand-500); color: #fff; }
.hl-badge.review { background: var(--orange-500); color: #fff; }
.hl-badge.event { background: var(--purple-500); color: #fff; }
.hl-badge.tuijian { background: var(--blue-500); color: #fff; }
.hl-title { font-size: 0.9rem; font-weight: 700; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hl-dots { display: flex; gap: 4px; justify-content: center; margin-top: 10px; }
.hl-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gray-300); transition: all 0.2s; }
.hl-dot.active { background: var(--brand-500); width: 18px; border-radius: 3px; }

/* ===== Article List ===== */
.article-list { display: flex; flex-direction: column; }
.article-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
.article-item:last-child { border-bottom: none; }
.article-item:active { opacity: 0.8; }
.art-thumb { width: 116px; height: 80px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; background: var(--gray-200); }
.art-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.art-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.58rem; padding: 1px 7px; border-radius: var(--radius-full); font-weight: 600; margin-bottom: 5px; align-self: flex-start; }
.art-badge.huodong { background: var(--purple-50); color: var(--purple-500); }
.art-badge.qianzhan { background: var(--blue-50); color: var(--blue-500); }
.art-badge.jiaoxue { background: var(--brand-50); color: var(--brand-600); }
.art-badge.ceping { background: var(--orange-50); color: var(--orange-500); }
.art-badge.tuijian { background: var(--blue-50); color: var(--blue-500); }
.art-badge.gonglue { background: var(--green-50); color: var(--green-500); }
.art-badge.zixun { background: var(--gray-100); color: var(--gray-600); }
.art-title { font-size: 0.85rem; font-weight: 600; color: var(--gray-800); line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-excerpt { font-size: 0.7rem; color: var(--gray-400); line-height: 1.5; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.art-meta { display: flex; align-items: center; gap: 8px; margin-top: auto; font-size: 0.64rem; color: var(--gray-400); }
.art-meta .art-author { color: var(--gray-500); }
.art-meta .art-views { margin-left: auto; display: flex; align-items: center; gap: 3px; }
.art-meta .art-views::before { content: ''; width: 12px; height: 12px; background: var(--gray-300); border-radius: 50%; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/contain no-repeat; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ===== Big Article Card (featured) ===== */
.art-big { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
.art-big:active { opacity: 0.8; }
.art-big .art-big-img { width: 100%; height: 160px; border-radius: var(--radius-lg); object-fit: cover; background: var(--gray-200); }
.art-big .art-big-body { display: flex; flex-direction: column; gap: 6px; }

/* ===== Pagination ===== */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 12px 8px; }
.pager button { min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); font-size: 0.78rem; color: var(--gray-600); border: 1px solid var(--gray-200); background: var(--white); }
.pager button:active { background: var(--gray-50); }
.pager button.active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); font-weight: 700; }
.pager button:disabled { color: var(--gray-300); pointer-events: none; }

/* ===== Rank Mini ===== */
.rank-mini { display: flex; flex-direction: column; gap: 10px; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gray-100); }
.rank-row:last-child { border-bottom: none; }
.rank-num { width: 22px; height: 22px; border-radius: var(--radius-sm); background: var(--gray-100); color: var(--gray-500); font-size: 0.72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rank-num.top3 { background: var(--orange-500); color: #fff; }
.rank-title { flex: 1; font-size: 0.78rem; color: var(--gray-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-views { font-size: 0.64rem; color: var(--gray-400); flex-shrink: 0; }

/* ===== Hot Tags ===== */
.hot-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-tag { font-size: 0.74rem; color: var(--gray-600); background: var(--gray-50); border: 1px solid var(--gray-200); padding: 5px 12px; border-radius: var(--radius-full); }
.hot-tag:active { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-100); }

/* ===== Bottom Nav ===== */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 750px; margin: 0 auto; height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: var(--white); border-top: 1px solid var(--gray-200); display: flex; z-index: 200; box-shadow: 0 -2px 12px rgba(0,0,0,0.06); }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--gray-400); transition: color 0.2s; position: relative; }
.bn-item.active { color: var(--brand-500); }
.bn-item svg { width: 22px; height: 22px; }
.bn-item .bn-label { font-size: 0.6rem; }
.bn-item .bn-badge { position: absolute; top: 4px; right: 50%; margin-right: -20px; background: var(--red-500); color: #fff; font-size: 0.5rem; padding: 0 4px; border-radius: var(--radius-full); min-width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* ===== Back to Top ===== */
.back-top {
  position: fixed;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 14px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  z-index: 150;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s;
  border: none;
}
.back-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12)); }

/* ===== Toast ===== */
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(31,41,55,0.95); color: #fff; padding: 10px 20px; border-radius: var(--radius-lg); font-size: 0.78rem; z-index: 300; animation: toastIn 0.25s ease, toastOut 0.25s ease 2s forwards; pointer-events: none; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -10px); } }

/* ===== Side Menu ===== */
.side-menu-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 300; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.side-menu-mask.show { opacity: 1; pointer-events: auto; }
.side-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100%; background: var(--white); z-index: 301; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94); overflow-y: auto; padding: 20px; }
.side-menu.show { transform: translateX(0); }
.side-menu-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); }
.side-menu h3 { font-size: 0.9rem; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; margin-top: 20px; }
.side-menu h3:first-child { margin-top: 0; }
.side-menu .sm-link { display: block; padding: 10px 0; font-size: 0.85rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.side-menu .sm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-menu .sm-grid a { padding: 10px; background: var(--gray-50); border-radius: var(--radius); font-size: 0.8rem; color: var(--gray-600); text-align: center; }


/* ===== Reset & Variables ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --brand-50: #e6faf6; --brand-100: #b2f2e6; --brand-500: #00bfa5; --brand-600: #00a68f; --brand-700: #008c79;
  --white: #fff;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827;
  --red-50: #fef2f2; --red-500: #ef4444; --red-600: #dc2626;
  --orange-50: #fff7ed; --orange-400: #fb923c; --orange-500: #f97316;
  --yellow-50: #fefce8; --yellow-500: #eab308;
  --green-50: #f0fdf4; --green-500: #22c55e;
  --blue-50: #eff6ff; --blue-500: #3b82f6;
  --purple-50: #faf5ff; --purple-500: #a855f7;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05); --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); --shadow-md: 0 4px 6px rgba(0,0,0,.07); --shadow-lg: 0 10px 15px rgba(0,0,0,.1);
  --radius-sm: 6px; --radius: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-2xl: 20px; --radius-full: 9999px;
  --transition: 0.2s ease;
  --font: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 56px;
  --header-h: 56px;
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--gray-700); background: var(--gray-50); line-height: 1.6; -webkit-font-smoothing: antialiased; padding-bottom: var(--safe-bottom); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; background: none; }
input { font-family: inherit; outline: none; border: none; }

/* ===== Page Wrapper ===== */
.page { max-width: 750px; margin: 0 auto; background: var(--gray-50); min-height: 100vh; position: relative; }

/* ===== App Header ===== */
.app-header { background: linear-gradient(135deg, #00897b, #00a68f 40%, #00bfa5); padding: 10px 12px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.1); height: var(--header-h); }
.app-header .logo { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.app-header .logo-icon { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; }
.app-header .logo-icon svg { width: 100%; height: 100%; display: block; }
.app-header .logo-text { color: #fff; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.app-header .logo-text .brand { color: #b2f2e6; }
.search-bar { flex: 1; min-width: 0; display: flex; align-items: center; background: rgba(255,255,255,0.95); border-radius: var(--radius-full); padding: 0 4px 0 14px; height: 36px; gap: 6px; }
.search-bar svg { width: 16px; height: 16px; color: var(--gray-400); flex-shrink: 0; }
.search-bar input { flex: 1; font-size: 0.8rem; color: var(--gray-700); background: transparent; min-width: 0; }
.search-bar input::placeholder { color: var(--gray-400); }
.search-bar .search-btn { background: var(--brand-500); color: #fff; border-radius: var(--radius-full); padding: 5px 14px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.search-bar .search-btn:active { background: var(--brand-600); }
.app-header .header-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.app-header .header-icon svg { width: 22px; height: 22px; }

/* ===== Scroll Nav ===== */
.scroll-nav { background: var(--white); display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 4px; border-bottom: 1px solid var(--gray-100); position: sticky; top: var(--header-h); z-index: 99; }
.scroll-nav::-webkit-scrollbar { display: none; }
.scroll-nav a { padding: 10px 14px; font-size: 0.82rem; color: var(--gray-600); white-space: nowrap; position: relative; transition: color 0.2s; font-weight: 500; }
.scroll-nav a.active { color: var(--brand-600); font-weight: 700; }
.scroll-nav a.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--brand-500); border-radius: 2px; }

/* ===== Open Banner ===== */
.open-banner { margin: 10px 12px 0; border-radius: var(--radius-lg); overflow: hidden; position: relative; height: 88px; background: linear-gradient(120deg, #00897b, #00bfa5); display: flex; align-items: center; padding: 0 18px; gap: 14px; box-shadow: 0 4px 14px rgba(0,191,165,0.3); }
.open-banner .ob-icon { width: 50px; height: 50px; border-radius: var(--radius); background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.open-banner .ob-icon svg { width: 28px; height: 28px; color: #fff; }
.open-banner .ob-text { flex: 1; color: #fff; }
.open-banner .ob-title { font-size: 0.95rem; font-weight: 800; }
.open-banner .ob-desc { font-size: 0.7rem; opacity: 0.9; margin-top: 2px; }
.open-banner .ob-tag { background: rgba(255,255,255,0.95); color: var(--brand-700); border-radius: var(--radius-full); padding: 6px 14px; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; }

/* ===== Day Tabs ===== */
.day-tabs { background: var(--white); margin-top: 10px; padding: 10px 12px; display: flex; gap: 8px; border-bottom: 1px solid var(--gray-100); }
.day-tab { flex: 1; padding: 9px 0; border-radius: var(--radius-lg); font-size: 0.84rem; font-weight: 700; background: var(--gray-100); color: var(--gray-500); text-align: center; transition: all 0.2s; position: relative; }
.day-tab.active { background: linear-gradient(135deg, var(--brand-500), var(--brand-600)); color: #fff; box-shadow: 0 2px 8px rgba(0,191,165,0.3); }
.day-tab .dt-sub { font-size: 0.62rem; font-weight: 400; opacity: 0.75; margin-left: 3px; }
.day-tab .dt-badge { position: absolute; top: -5px; right: 50%; margin-right: -30px; background: var(--red-500); color: #fff; font-size: 0.5rem; font-weight: 400; padding: 0 5px; border-radius: var(--radius-full); min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }

/* ===== Filter Row ===== */
.open-filter { background: var(--white); padding: 8px 12px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--gray-100); }
.open-filter .of-search { flex: 1; display: flex; align-items: center; gap: 6px; background: var(--gray-100); border-radius: var(--radius-full); padding: 6px 12px; }
.open-filter .of-search svg { width: 14px; height: 14px; color: var(--gray-400); flex-shrink: 0; }
.open-filter .of-search input { flex: 1; font-size: 0.74rem; color: var(--gray-700); background: transparent; min-width: 0; }
.open-filter .of-count { font-size: 0.7rem; color: var(--gray-400); white-space: nowrap; }
.open-filter .of-count b { color: var(--brand-600); }

/* ===== Open List ===== */
.open-list { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.open-card { display: flex; gap: 12px; padding: 12px; background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--gray-100); box-shadow: var(--shadow-sm); }
.open-card:active { box-shadow: 0 0 0 1px var(--brand-200); }
.oc-icon { width: 52px; height: 52px; border-radius: var(--radius-lg); object-fit: cover; flex-shrink: 0; background: var(--gray-200); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.oc-body { flex: 1; min-width: 0; }
.oc-top { display: flex; align-items: center; gap: 6px; }
.oc-name { font-size: 0.88rem; font-weight: 700; color: var(--gray-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-tag { font-size: 0.56rem; color: var(--orange-600, #ea580c); background: var(--orange-50); border: 1px solid #fed7aa; padding: 1px 6px; border-radius: var(--radius-full); flex-shrink: 0; }
.oc-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 0.68rem; color: var(--gray-400); flex-wrap: wrap; }
.oc-meta .oc-time { color: var(--gray-600); font-weight: 600; }
.oc-status { font-size: 0.58rem; padding: 1px 7px; border-radius: var(--radius-full); font-weight: 600; flex-shrink: 0; }
.oc-status.opened { background: var(--green-50); color: var(--green-500); }
.oc-status.today { background: var(--orange-50); color: var(--orange-500); }
.oc-status.soon { background: var(--blue-50); color: var(--blue-500); }
.oc-btns { display: flex; flex-direction: column; gap: 6px; justify-content: center; flex-shrink: 0; }
.oc-btn { padding: 5px 14px; border-radius: var(--radius-full); font-size: 0.68rem; font-weight: 700; text-align: center; white-space: nowrap; }
.oc-btn.dl { background: linear-gradient(135deg, var(--brand-500), var(--brand-600)); color: #fff; box-shadow: 0 2px 6px rgba(0,191,165,0.3); }
.oc-btn.dl:active { transform: scale(0.95); }
.oc-btn.gift { color: var(--brand-600); border: 1px solid var(--brand-500); background: var(--brand-50); }
.oc-btn.gift:active { background: var(--brand-100); }

/* ===== Load More ===== */
.load-more { text-align: center; padding: 14px 0 4px; }
.load-more span { display: inline-block; padding: 8px 28px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-full); font-size: 0.76rem; color: var(--gray-500); }
.load-more span:active { background: var(--gray-50); }

/* ===== Bottom Nav ===== */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 750px; margin: 0 auto; height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: var(--white); border-top: 1px solid var(--gray-200); display: flex; z-index: 200; box-shadow: 0 -2px 12px rgba(0,0,0,0.06); }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--gray-400); transition: color 0.2s; position: relative; }
.bn-item.active { color: var(--brand-500); }
.bn-item svg { width: 22px; height: 22px; }
.bn-item .bn-label { font-size: 0.6rem; }
.bn-item .bn-badge { position: absolute; top: 4px; right: 50%; margin-right: -20px; background: var(--red-500); color: #fff; font-size: 0.5rem; padding: 0 4px; border-radius: var(--radius-full); min-width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* ===== App Footer ===== */
.app-footer { background: var(--gray-800); color: var(--gray-400); padding: 20px 16px; text-align: center; margin-top: 12px; }
.app-footer p { font-size: 0.7rem; line-height: 1.8; }
.app-footer .footer-links { display: flex; justify-content: center; gap: 12px; margin-bottom: 6px; }
.app-footer .footer-links a { font-size: 0.7rem; color: var(--gray-400); }
.app-footer .footer-links a:active { color: var(--white); }

/* ===== Back to Top ===== */
.back-top {
  position: fixed;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 14px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  z-index: 150;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s;
  border: none;
}
.back-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12)); }

/* ===== Toast ===== */
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(31,41,55,0.95); color: #fff; padding: 10px 20px; border-radius: var(--radius-lg); font-size: 0.78rem; z-index: 300; animation: toastIn 0.25s ease, toastOut 0.25s ease 2s forwards; pointer-events: none; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -10px); } }

/* ===== Side Menu ===== */
.side-menu-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 300; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.side-menu-mask.show { opacity: 1; pointer-events: auto; }
.side-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100%; background: var(--white); z-index: 301; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94); overflow-y: auto; padding: 20px; }
.side-menu.show { transform: translateX(0); }
.side-menu-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); }
.side-menu h3 { font-size: 0.9rem; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; margin-top: 20px; }
.side-menu h3:first-child { margin-top: 0; }
.side-menu .sm-link { display: block; padding: 10px 0; font-size: 0.85rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.side-menu .sm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-menu .sm-grid a { padding: 10px; background: var(--gray-50); border-radius: var(--radius); font-size: 0.8rem; color: var(--gray-600); text-align: center; }


/* ===== Reset & Variables ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --brand-50: #e6faf6; --brand-100: #b2f2e6; --brand-500: #00bfa5; --brand-600: #00a68f; --brand-700: #008c79;
  --white: #fff;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827;
  --red-50: #fef2f2; --red-500: #ef4444; --red-600: #dc2626;
  --orange-50: #fff7ed; --orange-400: #fb923c; --orange-500: #f97316;
  --yellow-50: #fefce8; --yellow-500: #eab308;
  --green-50: #f0fdf4; --green-500: #22c55e;
  --blue-50: #eff6ff; --blue-500: #3b82f6;
  --purple-50: #faf5ff; --purple-500: #a855f7;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05); --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); --shadow-md: 0 4px 6px rgba(0,0,0,.07); --shadow-lg: 0 10px 15px rgba(0,0,0,.1);
  --radius-sm: 6px; --radius: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-2xl: 20px; --radius-full: 9999px;
  --transition: 0.2s ease;
  --font: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 56px;
  --header-h: 56px;
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--gray-700); background: var(--gray-50); line-height: 1.6; -webkit-font-smoothing: antialiased; padding-bottom: var(--safe-bottom); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; background: none; }
input { font-family: inherit; outline: none; border: none; }

/* ===== Page Wrapper ===== */
.page { max-width: 750px; margin: 0 auto; background: var(--gray-50); min-height: 100vh; position: relative; }

/* ===== App Header ===== */
.app-header { background: linear-gradient(135deg, #00897b, #00a68f 40%, #00bfa5); padding: 10px 12px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.1); height: var(--header-h); }
.app-header .logo { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.app-header .logo-icon { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; }
.app-header .logo-icon svg { width: 100%; height: 100%; display: block; }
.app-header .logo-text { color: #fff; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.app-header .logo-text .brand { color: #b2f2e6; }
.search-bar { flex: 1; min-width: 0; display: flex; align-items: center; background: rgba(255,255,255,0.95); border-radius: var(--radius-full); padding: 0 4px 0 14px; height: 36px; gap: 6px; }
.search-bar svg { width: 16px; height: 16px; color: var(--gray-400); flex-shrink: 0; }
.search-bar input { flex: 1; font-size: 0.8rem; color: var(--gray-700); background: transparent; min-width: 0; }
.search-bar input::placeholder { color: var(--gray-400); }
.search-bar .search-btn { background: var(--brand-500); color: #fff; border-radius: var(--radius-full); padding: 5px 14px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.search-bar .search-btn:active { background: var(--brand-600); }
.app-header .header-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.app-header .header-icon svg { width: 22px; height: 22px; }

/* ===== Scroll Nav ===== */
.scroll-nav { background: var(--white); display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 4px; border-bottom: 1px solid var(--gray-100); position: sticky; top: var(--header-h); z-index: 99; }
.scroll-nav::-webkit-scrollbar { display: none; }
.scroll-nav a { padding: 10px 14px; font-size: 0.82rem; color: var(--gray-600); white-space: nowrap; position: relative; transition: color 0.2s; font-weight: 500; }
.scroll-nav a.active { color: var(--brand-600); font-weight: 700; }
.scroll-nav a.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--brand-500); border-radius: 2px; }

/* ===== Rank Banner ===== */
.rank-banner { margin: 10px 12px 0; border-radius: var(--radius-lg); overflow: hidden; position: relative; height: 96px; background: linear-gradient(120deg, #ff9a3c, #ff5e62); display: flex; align-items: center; padding: 0 18px; gap: 14px; box-shadow: 0 4px 14px rgba(255,94,98,0.25); }
.rank-banner .rb-icon { width: 52px; height: 52px; border-radius: var(--radius); background: rgba(255,255,255,0.22); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rank-banner .rb-icon svg { width: 30px; height: 30px; color: #fff; }
.rank-banner .rb-text { flex: 1; color: #fff; }
.rank-banner .rb-title { font-size: 1rem; font-weight: 800; }
.rank-banner .rb-desc { font-size: 0.7rem; opacity: 0.92; margin-top: 3px; }
.rank-banner .rb-cup { font-size: 1.6rem; flex-shrink: 0; }

/* ===== Rank Tabs ===== */
.rank-tabs { background: var(--white); margin-top: 10px; padding: 8px 12px; display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-bottom: 1px solid var(--gray-100); }
.rank-tabs::-webkit-scrollbar { display: none; }
.rank-tab { padding: 8px 18px; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 600; background: var(--gray-100); color: var(--gray-500); white-space: nowrap; transition: all 0.2s; }
.rank-tab.active { background: linear-gradient(135deg, var(--brand-500), var(--brand-600)); color: #fff; box-shadow: 0 2px 8px rgba(0,191,165,0.3); }

/* ===== Rank Panel ===== */
.rank-panel { display: none; padding: 10px 12px; }
.rank-panel.active { display: block; }
.rank-list { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 12px 12px; }
.rank-row + .rank-row { border-top: 1px solid var(--gray-100); }
.rank-idx { width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; font-size: 0.82rem; font-weight: 800; display: flex; align-items: center; justify-content: center; background: var(--gray-100); color: var(--gray-500); }
.rank-idx.top1 { background: linear-gradient(135deg,#ff7a59,#ff4d4f); color: #fff; box-shadow: 0 2px 6px rgba(255,77,79,0.35); }
.rank-idx.top2 { background: linear-gradient(135deg,#ffb347,#ff9e2c); color: #fff; box-shadow: 0 2px 6px rgba(255,158,44,0.35); }
.rank-idx.top3 { background: linear-gradient(135deg,#f7d774,#e8b923); color: #fff; box-shadow: 0 2px 6px rgba(232,185,35,0.35); }
.rank-icon { width: 48px; height: 48px; border-radius: var(--radius-lg); object-fit: cover; flex-shrink: 0; background: var(--gray-200); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 0.88rem; font-weight: 700; color: var(--gray-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-score { font-size: 0.68rem; color: var(--brand-600); font-weight: 600; margin-top: 1px; }
.rank-tags { display: flex; gap: 4px; margin-top: 3px; }
.rank-tag { font-size: 0.56rem; color: var(--gray-500); background: var(--gray-50); border: 1px solid var(--gray-100); padding: 1px 6px; border-radius: var(--radius-full); }
.rank-stat { font-size: 0.64rem; color: var(--gray-400); white-space: nowrap; text-align: right; flex-shrink: 0; }
.rank-stat b { display: block; font-size: 0.86rem; color: var(--gray-800); font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-dl { flex-shrink: 0; background: linear-gradient(135deg, var(--brand-500), var(--brand-600)); color: #fff; border-radius: var(--radius-full); padding: 7px 14px; font-size: 0.72rem; font-weight: 700; box-shadow: 0 2px 8px rgba(0,191,165,0.3); white-space: nowrap; }
.rank-dl:active { transform: scale(0.95); }

/* ===== Load More ===== */
.load-more { text-align: center; padding: 14px 0 4px; }
.load-more span { display: inline-block; padding: 8px 28px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-full); font-size: 0.76rem; color: var(--gray-500); }
.load-more span:active { background: var(--gray-50); }

/* ===== Bottom Nav ===== */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 750px; margin: 0 auto; height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: var(--white); border-top: 1px solid var(--gray-200); display: flex; z-index: 200; box-shadow: 0 -2px 12px rgba(0,0,0,0.06); }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--gray-400); transition: color 0.2s; position: relative; }
.bn-item.active { color: var(--brand-500); }
.bn-item svg { width: 22px; height: 22px; }
.bn-item .bn-label { font-size: 0.6rem; }
.bn-item .bn-badge { position: absolute; top: 4px; right: 50%; margin-right: -20px; background: var(--red-500); color: #fff; font-size: 0.5rem; padding: 0 4px; border-radius: var(--radius-full); min-width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* ===== App Footer ===== */
.app-footer { background: var(--gray-800); color: var(--gray-400); padding: 20px 16px; text-align: center; margin-top: 12px; }
.app-footer p { font-size: 0.7rem; line-height: 1.8; }
.app-footer .footer-links { display: flex; justify-content: center; gap: 12px; margin-bottom: 6px; }
.app-footer .footer-links a { font-size: 0.7rem; color: var(--gray-400); }
.app-footer .footer-links a:active { color: var(--white); }

/* ===== Back to Top ===== */
.back-top {
  position: fixed;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 14px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  z-index: 150;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s;
  border: none;
}
.back-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12)); }

/* ===== Toast ===== */
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(31,41,55,0.95); color: #fff; padding: 10px 20px; border-radius: var(--radius-lg); font-size: 0.78rem; z-index: 300; animation: toastIn 0.25s ease, toastOut 0.25s ease 2s forwards; pointer-events: none; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -10px); } }

/* ===== Side Menu ===== */
.side-menu-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 300; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.side-menu-mask.show { opacity: 1; pointer-events: auto; }
.side-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100%; background: var(--white); z-index: 301; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94); overflow-y: auto; padding: 20px; }
.side-menu.show { transform: translateX(0); }
.side-menu-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); }
.side-menu h3 { font-size: 0.9rem; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; margin-top: 20px; }
.side-menu h3:first-child { margin-top: 0; }
.side-menu .sm-link { display: block; padding: 10px 0; font-size: 0.85rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.side-menu .sm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-menu .sm-grid a { padding: 10px; background: var(--gray-50); border-radius: var(--radius); font-size: 0.8rem; color: var(--gray-600); text-align: center; }


/* ===== Reset & Variables ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --brand-50: #e6faf6; --brand-100: #b2f2e6; --brand-500: #00bfa5; --brand-600: #00a68f; --brand-700: #008c79;
  --white: #fff;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827;
  --red-50: #fef2f2; --red-500: #ef4444; --red-600: #dc2626;
  --orange-50: #fff7ed; --orange-400: #fb923c; --orange-500: #f97316;
  --yellow-50: #fefce8; --yellow-500: #eab308;
  --green-50: #f0fdf4; --green-500: #22c55e;
  --blue-50: #eff6ff; --blue-500: #3b82f6;
  --purple-50: #faf5ff; --purple-500: #a855f7;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05); --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); --shadow-md: 0 4px 6px rgba(0,0,0,.07); --shadow-lg: 0 10px 15px rgba(0,0,0,.1);
  --radius-sm: 6px; --radius: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-2xl: 20px; --radius-full: 9999px;
  --transition: 0.2s ease;
  --font: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 56px;
  --header-h: 56px;
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--gray-700); background: var(--gray-50); line-height: 1.6; -webkit-font-smoothing: antialiased; padding-bottom: var(--safe-bottom); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; background: none; }
input { font-family: inherit; outline: none; border: none; }

/* ===== Page Wrapper ===== */
.page { max-width: 750px; margin: 0 auto; background: var(--gray-50); min-height: 100vh; position: relative; }

/* ===== Detail Header ===== */
.detail-header { background: linear-gradient(135deg, #00897b, #00bfa5); padding: 10px 12px; display: flex; align-items: center; gap: 2px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.1); height: var(--header-h); }
.dh-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; border-radius: 50%; transition: background 0.2s; }
.dh-btn:active { background: rgba(255,255,255,0.15); }
.dh-btn svg { width: 20px; height: 20px; }
.dh-title { flex: 1; text-align: center; font-size: 0.88rem; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.dh-search-wrap { flex: 1; display: none; align-items: center; gap: 8px; }
.detail-header.searching .dh-title { display: none; }
.detail-header.searching .dh-search-wrap { display: flex; }
.dh-search-input { flex: 1; height: 32px; border: none; border-radius: var(--radius-full); padding: 0 12px; font-size: 0.85rem; background: rgba(255,255,255,0.18); color: #fff; outline: none; }
.dh-search-input::placeholder { color: rgba(255,255,255,0.7); }
.dh-search-cancel { font-size: 0.8rem; color: #fff; padding: 4px 4px; white-space: nowrap; }

/* ===== Topic Hero ===== */
.topic-hero { margin: 10px 12px 0; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md); position: relative; color: #fff; }
.th-cover { position: relative; height: 130px; }
.th-cover img { width: 100%; height: 100%; object-fit: cover; }
.th-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.6)); }
.th-cover .th-title { position: absolute; left: 14px; right: 14px; bottom: 10px; z-index: 2; font-size: 1.25rem; font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,0.45); }
.th-accent { height: 4px; border-top-left-radius: var(--radius-xl); border-top-right-radius: var(--radius-xl); }
.th-body { padding: 12px 14px 14px; background: #f8fafc; color: var(--gray-800); }
.th-body .th-desc { font-size: 0.76rem; color: var(--gray-600); line-height: 1.6; }
.th-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.th-meta-item { display: inline-flex; align-items: center; gap: 3px; background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius-full); padding: 3px 8px; }
.th-meta-icon { width: 11px; height: 11px; color: var(--brand-600); flex-shrink: 0; }
.th-meta-value { font-size: 0.68rem; font-weight: 700; color: var(--gray-700); }
.th-actions { display: flex; gap: 6px; margin-top: 10px; }
.th-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: var(--gray-50); color: var(--gray-600); border: 1px solid var(--gray-200); border-radius: var(--radius-full); padding: 6px 0; font-size: 0.72rem; font-weight: 600; transition: all 0.15s; }
.th-btn svg { width: 13px; height: 13px; }
.th-btn:active { transform: scale(0.97); }
.th-btn.liked { background: var(--red-50); color: var(--red-600); border-color: var(--red-200); }
.th-btn.disliked { background: var(--gray-200); color: var(--gray-700); border-color: var(--gray-300); }

/* ===== Section Card ===== */
.topic-sec { margin: 10px 12px 0; border-radius: var(--radius-xl); background: var(--white); box-shadow: var(--shadow-sm); padding: 14px 14px 6px; }
.ts-title { display: flex; align-items: center; gap: 7px; font-size: 0.88rem; font-weight: 800; color: var(--gray-800); margin-bottom: 4px; }
.ts-title::before { content: ''; width: 4px; height: 16px; background: linear-gradient(180deg, var(--brand-500), var(--brand-600)); border-radius: 2px; flex-shrink: 0; }
.ts-sub { font-size: 0.66rem; color: var(--gray-400); margin-bottom: 8px; }

/* ===== Game List ===== */
.game-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--gray-100); }
.game-row:last-child { border-bottom: none; }
.gr-icon { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; background: var(--gray-100); flex-shrink: 0; border: 1px solid var(--gray-100); }
.gr-main { flex: 1; min-width: 0; }
.gr-name-row { display: flex; align-items: center; gap: 7px; }
.gr-name { font-size: 0.85rem; font-weight: 700; color: var(--gray-800); }
.gr-score { font-size: 0.72rem; color: var(--orange-500); font-weight: 700; margin-top: 2px; }
.gr-score i { font-style: normal; color: var(--gray-400); font-weight: 400; margin-left: 4px; font-size: 0.62rem; }
.gr-ver { font-style: normal; color: var(--gray-500); font-weight: 400; margin-left: 8px; font-size: 0.62rem; padding: 1px 6px; background: var(--gray-100); border-radius: var(--radius-full); }
.gr-dl { flex-shrink: 0; width: 64px; height: 28px; border-radius: var(--radius-full); background: linear-gradient(120deg, var(--brand-500), var(--brand-600)); color: #fff; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: transform 0.15s; }
.gr-dl:active { transform: scale(0.95); }

/* ===== Load More ===== */
.load-more { text-align: center; padding: 14px 0 6px; }
.load-more button { background: var(--white); color: var(--gray-600); border: 1px dashed var(--gray-300); border-radius: var(--radius-full); padding: 8px 28px; font-size: 0.74rem; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; transition: all 0.15s; font-family: inherit; }
.load-more button:active { background: var(--gray-100); color: var(--gray-800); }
.load-more button svg { width: 13px; height: 13px; }
.load-more .lm-done { color: var(--gray-400); border-style: solid; pointer-events: none; }

/* ===== Related Topics ===== */
.related-sec { margin: 10px 12px 0; border-radius: var(--radius-xl); background: var(--white); box-shadow: var(--shadow-sm); padding: 14px 14px 12px; }
.related-scroll { display: flex; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 8px 0 2px; }
.related-scroll::-webkit-scrollbar { display: none; }
.rel-card { flex-shrink: 0; width: 158px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--gray-100); background: var(--gray-50); }
.rel-card:active { background: var(--gray-100); }
.rel-cover { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.rel-cover img { width: 100%; height: 100%; object-fit: cover; }
.rel-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.55)); }
.rel-name { position: absolute; left: 9px; right: 9px; bottom: 6px; z-index: 2; color: #fff; font-size: 0.74rem; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-body { padding: 7px 9px 9px; }
.rel-desc { font-size: 0.6rem; color: var(--gray-400); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 26px; }
.rel-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.rel-count { font-size: 0.62rem; color: var(--gray-500); }
.rel-count b { color: var(--brand-600); }
.rel-go { width: 20px; height: 20px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); display: flex; align-items: center; justify-content: center; }
.rel-go svg { width: 11px; height: 11px; }

/* ===== App Footer ===== */
.app-footer { background: var(--gray-800); color: var(--gray-400); padding: 20px 16px; text-align: center; margin-top: 12px; }
.app-footer p { font-size: 0.7rem; line-height: 1.8; }
.app-footer .footer-links { display: flex; justify-content: center; gap: 12px; margin-bottom: 6px; }
.app-footer .footer-links a { font-size: 0.7rem; color: var(--gray-400); }
.app-footer .footer-links a:active { color: var(--white); }

/* ===== Bottom Nav ===== */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 750px; margin: 0 auto; height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: var(--white); border-top: 1px solid var(--gray-200); display: flex; z-index: 200; box-shadow: 0 -2px 12px rgba(0,0,0,0.06); }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--gray-400); transition: color 0.2s; position: relative; }
.bn-item.active { color: var(--brand-600); }
.bn-item svg { width: 21px; height: 21px; }
.bn-item .bn-label { font-size: 0.6rem; }
.bn-item .bn-badge { position: absolute; top: 4px; right: 50%; margin-right: -20px; background: var(--red-500); color: #fff; font-size: 0.5rem; padding: 0 4px; border-radius: var(--radius-full); min-width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* ===== Back to Top ===== */
.back-top {
  position: fixed;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 14px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  z-index: 150;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s;
  border: none;
}
.back-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12)); }

/* ===== Side Menu ===== */
.side-menu-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 400; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.side-menu-mask.show { opacity: 1; pointer-events: auto; }
.side-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100%; background: var(--white); z-index: 401; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94); overflow-y: auto; padding: 20px; }
.side-menu.show { transform: translateX(0); }
.side-menu-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); }
.side-menu h3 { font-size: 0.9rem; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; margin-top: 20px; }
.side-menu h3:first-child { margin-top: 0; }
.side-menu .sm-link { display: block; padding: 10px 0; font-size: 0.85rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.side-menu .sm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-menu .sm-grid a { padding: 10px; background: var(--gray-50); border-radius: var(--radius); font-size: 0.8rem; color: var(--gray-600); text-align: center; }

/* ===== Toast ===== */
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(31,41,55,0.95); color: #fff; padding: 10px 20px; border-radius: var(--radius-lg); font-size: 0.78rem; z-index: 300; animation: toastIn 0.25s ease, toastOut 0.25s ease 2s forwards; pointer-events: none; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -10px); } }


/* ===== Reset & Variables ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --brand-50: #e6faf6; --brand-100: #b2f2e6; --brand-500: #00bfa5; --brand-600: #00a68f; --brand-700: #008c79;
  --white: #fff;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827;
  --red-50: #fef2f2; --red-500: #ef4444; --red-600: #dc2626;
  --orange-50: #fff7ed; --orange-400: #fb923c; --orange-500: #f97316;
  --yellow-50: #fefce8; --yellow-500: #eab308;
  --green-50: #f0fdf4; --green-500: #22c55e;
  --blue-50: #eff6ff; --blue-500: #3b82f6;
  --purple-50: #faf5ff; --purple-500: #a855f7;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05); --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); --shadow-md: 0 4px 6px rgba(0,0,0,.07); --shadow-lg: 0 10px 15px rgba(0,0,0,.1);
  --radius-sm: 6px; --radius: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-2xl: 20px; --radius-full: 9999px;
  --transition: 0.2s ease;
  --font: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 56px;
  --header-h: 56px;
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--gray-700); background: var(--gray-50); line-height: 1.6; -webkit-font-smoothing: antialiased; padding-bottom: var(--safe-bottom); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; background: none; }
input { font-family: inherit; outline: none; border: none; }

/* ===== Page Wrapper ===== */
.page { max-width: 750px; margin: 0 auto; background: var(--gray-50); min-height: 100vh; position: relative; }

/* ===== App Header ===== */
.app-header { background: linear-gradient(135deg, #00897b, #00a68f 40%, #00bfa5); padding: 10px 12px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.1); height: var(--header-h); }
.app-header .logo { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.app-header .logo-icon { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; }
.app-header .logo-icon svg { width: 100%; height: 100%; display: block; }
.app-header .logo-text { color: #fff; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.app-header .logo-text .brand { color: #b2f2e6; }
.search-bar { flex: 1; min-width: 0; display: flex; align-items: center; background: rgba(255,255,255,0.95); border-radius: var(--radius-full); padding: 0 4px 0 14px; height: 36px; gap: 6px; }
.search-bar svg { width: 16px; height: 16px; color: var(--gray-400); flex-shrink: 0; }
.search-bar input { flex: 1; font-size: 0.8rem; color: var(--gray-700); background: transparent; min-width: 0; }
.search-bar input::placeholder { color: var(--gray-400); }
.search-bar .search-btn { background: var(--brand-500); color: #fff; border-radius: var(--radius-full); padding: 5px 14px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.search-bar .search-btn:active { background: var(--brand-600); }
.app-header .header-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.app-header .header-icon svg { width: 22px; height: 22px; }

/* ===== Scroll Nav ===== */
.scroll-nav { background: var(--white); display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 4px; border-bottom: 1px solid var(--gray-100); position: sticky; top: var(--header-h); z-index: 99; }
.scroll-nav::-webkit-scrollbar { display: none; }
.scroll-nav a { padding: 10px 14px; font-size: 0.82rem; color: var(--gray-600); white-space: nowrap; position: relative; transition: color 0.2s; font-weight: 500; }
.scroll-nav a.active { color: var(--brand-600); font-weight: 700; }
.scroll-nav a.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--brand-500); border-radius: 2px; }

/* ===== Topic Banner ===== */
.topic-banner { margin: 10px 12px 0; border-radius: var(--radius-xl); overflow: hidden; position: relative; background: linear-gradient(120deg, #667eea, #764ba2); padding: 20px 18px; color: #fff; box-shadow: 0 6px 18px rgba(102,126,234,0.35); }
.topic-banner::after { content: ''; position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.topic-banner::before { content: ''; position: absolute; right: 40px; bottom: -46px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,0.08); }
.tb-top { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.tb-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tb-icon svg { width: 24px; height: 24px; color: #fff; }
.tb-title { font-size: 1.1rem; font-weight: 800; letter-spacing: 1px; }
.tb-sub { font-size: 0.72rem; opacity: 0.92; margin-top: 2px; }
.tb-desc { font-size: 0.74rem; opacity: 0.92; margin-top: 12px; line-height: 1.6; position: relative; z-index: 1; }
.tb-meta { display: flex; gap: 14px; margin-top: 10px; position: relative; z-index: 1; }
.tb-meta span { font-size: 0.68rem; background: rgba(255,255,255,0.18); border-radius: var(--radius-full); padding: 3px 10px; }

/* ===== Topic Chips ===== */
.topic-chips { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 12px 12px 2px; position: sticky; top: calc(var(--header-h) + 42px); background: var(--gray-50); z-index: 90; }
.topic-chips::-webkit-scrollbar { display: none; }
.topic-chips .chip { flex-shrink: 0; padding: 6px 16px; border-radius: var(--radius-full); background: var(--white); border: 1px solid var(--gray-200); color: var(--gray-500); font-size: 0.76rem; font-weight: 600; transition: all 0.2s; }
.topic-chips .chip.active { background: linear-gradient(120deg, #667eea, #764ba2); color: #fff; border-color: transparent; box-shadow: 0 3px 10px rgba(102,126,234,0.35); }

/* ===== Topic Grid ===== */
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 12px; }
.topic-card { background: var(--white); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.15s; display: block; }
.topic-card:active { transform: scale(0.98); }
.tc-cover { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.tc-cover img { width: 100%; height: 100%; object-fit: cover; }
.tc-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.55)); }
.tc-num { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(0,0,0,0.45); color: #fff; font-size: 0.6rem; padding: 2px 8px; border-radius: var(--radius-full); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.tc-title { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 2; color: #fff; font-size: 0.92rem; font-weight: 800; text-shadow: 0 1px 4px rgba(0,0,0,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-body { padding: 10px 12px 12px; }
.tc-desc { font-size: 0.7rem; color: var(--gray-400); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.tc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.tc-count { font-size: 0.68rem; color: var(--gray-500); }
.tc-count b { color: var(--brand-600); font-size: 0.8rem; }
.tc-go { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tc-go svg { width: 12px; height: 12px; }
.topic-empty { padding: 60px 0; text-align: center; color: var(--gray-400); font-size: 0.8rem; display: none; }

/* ===== Topic Pagination ===== */
.topic-pager { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 12px 4px; flex-wrap: wrap; }
.topic-pager.hidden { display: none; }
.tp-btn { min-width: 34px; height: 34px; padding: 0 8px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--gray-200); color: var(--gray-600); font-size: 0.78rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s; }
.tp-btn:active:not(:disabled) { background: var(--gray-100); }
.tp-btn.active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); box-shadow: 0 2px 8px rgba(0,191,165,0.3); }
.tp-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.tp-btn svg { width: 15px; height: 15px; }
.tp-info { font-size: 0.72rem; color: var(--gray-400); margin-left: 4px; }

/* ===== App Footer ===== */
.app-footer { background: var(--gray-800); color: var(--gray-400); padding: 20px 16px; text-align: center; margin-top: 12px; }
.app-footer p { font-size: 0.7rem; line-height: 1.8; }
.app-footer .footer-links { display: flex; justify-content: center; gap: 12px; margin-bottom: 6px; }
.app-footer .footer-links a { font-size: 0.7rem; color: var(--gray-400); }
.app-footer .footer-links a:active { color: var(--white); }

/* ===== Bottom Nav ===== */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 750px; margin: 0 auto; height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: var(--white); border-top: 1px solid var(--gray-200); display: flex; z-index: 200; box-shadow: 0 -2px 12px rgba(0,0,0,0.06); }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--gray-400); transition: color 0.2s; position: relative; }
.bn-item.active { color: var(--brand-600); }
.bn-item svg { width: 21px; height: 21px; }
.bn-item .bn-label { font-size: 0.6rem; }
.bn-item .bn-badge { position: absolute; top: 4px; right: 50%; margin-right: -20px; background: var(--red-500); color: #fff; font-size: 0.5rem; padding: 0 4px; border-radius: var(--radius-full); min-width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* ===== Back to Top ===== */
.back-top {
  position: fixed;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 14px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  z-index: 150;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s;
  border: none;
}
.back-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12)); }

/* ===== Side Menu ===== */
.side-menu-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 400; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.side-menu-mask.show { opacity: 1; pointer-events: auto; }
.side-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100%; background: var(--white); z-index: 401; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94); overflow-y: auto; padding: 20px; }
.side-menu.show { transform: translateX(0); }
.side-menu-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); }
.side-menu h3 { font-size: 0.9rem; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; margin-top: 20px; }
.side-menu h3:first-child { margin-top: 0; }
.side-menu .sm-link { display: block; padding: 10px 0; font-size: 0.85rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.side-menu .sm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-menu .sm-grid a { padding: 10px; background: var(--gray-50); border-radius: var(--radius); font-size: 0.8rem; color: var(--gray-600); text-align: center; }

/* ===== Toast ===== */
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(31,41,55,0.95); color: #fff; padding: 10px 20px; border-radius: var(--radius-lg); font-size: 0.78rem; z-index: 300; animation: toastIn 0.25s ease, toastOut 0.25s ease 2s forwards; pointer-events: none; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -10px); } }



/* ===== 横向溢出修复 2026-09-21 =====
   1) .search-bar 的 flex:1 缺 min-width:0，最小内容宽被 input 默认宽度(142px)钉住，
      又因 flex-basis:0 无法收缩 → header 400px，全站横向溢出 40px；已在原处补 min-width:0。
   2) .topic-card{width:260px} 来自首页横向滚动卡，被多份样式拼接泄漏到专题合集页的
      .topic-grid{1fr 1fr}，1fr 的 auto 最小值=min-content=260px → 两列 530px 溢出 182px。
      仅在网格上下文恢复自适应，不影响首页 .hscroll 内的横向卡片。 */
.topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topic-grid > .topic-card { width: auto; min-width: 0; }

/* --- 开服表：游戏名可点（2026-09-22） --- */
.sf-thumb { flex-shrink: 0; display: block; line-height: 0; border-radius: var(--radius); overflow: hidden; }
.sf-name a { color: inherit; text-decoration: none; }
.sf-name a:active { color: var(--brand-600); }

/* ===== M 端分页：窄屏不再撑破页面（2026-10-03）=====
   问题：128 条 / 每页 12 ⇒ 13 个按钮 × 34px + 12 个 gap 6px = 472px > 390px 视口，
        .pager 又是 flex 且没有 flex-wrap ⇒ scrollWidth 472，整页被撑宽到 473px，
        所有内容右移、「下一页」被压成两行。
   修：允许换行 + 按钮禁止折行 + 窄屏隐藏「128条」信息项。 */
.pager {
  flex-wrap: wrap;
  max-width: 100%;
  box-sizing: border-box;
  row-gap: 8px;
}
.pager a, .pager span {
  white-space: nowrap;
  flex: 0 0 auto;
}
/* 「128条」「上一页/下一页」这类文字项在窄屏太占位：
   只保留页码，上一页/下一页用短箭头 */
@media (max-width: 480px) {
  .pager .a1 { min-width: 30px; padding: 0 8px; font-size: 0.75rem; }
  .pager .a1:first-child { display: none; }   /* 「128条」 */
}
