:root {
  --bg: #05060f;
  --bg-2: #0a0c1c;
  --panel: rgba(18, 20, 40, 0.55);
  --panel-border: rgba(120, 140, 255, 0.18);
  --text: #e8ecff;
  --text-dim: #9aa3c7;
  --c-cyan: #46e6ff;
  --c-purple: #9b6bff;
  --c-magenta: #ff5cc8;
  --c-warm: #ffb86b;
  --grad: linear-gradient(100deg, #46e6ff 0%, #9b6bff 50%, #ff5cc8 100%);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --maxw: 86%;
}

/* ══════════════════════════════════════════════════
   亮色主题：data-theme="light"
   核心变量翻转 + 关键硬编码深色面/浅色文字覆盖
   ══════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg: #eef1fb;
  --bg-2: #e3e9f7;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-border: rgba(120, 140, 255, 0.28);
  --text: #161a33;
  --text-dim: #5b648a;
  --shadow: 0 20px 60px rgba(40, 50, 95, 0.16);
  color-scheme: light;
}

/* 背景叠层：深色遮罩 → 柔和浅色光晕 */
[data-theme="light"] .bg-gradient {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(100% 80% at 90% 110%, rgba(255, 122, 89, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(238, 241, 251, 0.1), rgba(238, 241, 251, 0.5));
}

/* 顶部导航 */
[data-theme="light"] .nav {
  background: linear-gradient(180deg, rgba(245, 247, 255, 0.85), rgba(245, 247, 255, 0.35));
  border-bottom: 1px solid rgba(120, 140, 255, 0.15);
}
[data-theme="light"] .nav-links a.active {
  color: #161a33;
  background: rgba(120, 140, 255, 0.16);
}
@media (max-width: 900px) {
  [data-theme="light"] .nav-links {
    background: rgba(248, 249, 255, 0.97);
    border: 1px solid rgba(120, 140, 255, 0.18);
  }
}

/* 页脚底部渐隐 */
[data-theme="light"] .footer {
  background: linear-gradient(180deg, transparent, rgba(225, 230, 245, 0.7));
}

/* 回到顶部 */
[data-theme="light"] .back-top {
  background: rgba(255, 255, 255, 0.85);
  color: #161a33;
  border: 1px solid rgba(120, 140, 255, 0.25);
  box-shadow: 0 8px 28px rgba(40, 50, 95, 0.18);
}

/* 卡内硬编码浅色文字 → 深色 */
[data-theme="light"] .news-body h3,
[data-theme="light"] .stat-card b,
[data-theme="light"] .news-ad-title,
[data-theme="light"] .ad-card-title,
[data-theme="light"] .msg-help-title,
[data-theme="light"] .msg-form-title { color: var(--text); }

[data-theme="light"] .news-ad-desc,
[data-theme="light"] .ad-card-desc,
[data-theme="light"] .msg-help-list li { color: var(--text-dim); }

/* Hero 右侧广告卡 */
[data-theme="light"] .ad-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(236, 240, 252, 0.9));
  border-color: rgba(120, 140, 255, 0.3);
}
/* 资讯右侧广告卡 */
[data-theme="light"] .news-ad-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.85), rgba(236, 240, 252, 0.9));
  border-color: rgba(120, 140, 255, 0.28);
}
[data-theme="light"] .news-ad-img-placeholder {
  background: linear-gradient(135deg, #dfe4f5 0%, #cdd6f0 40%, #b9c6ea 70%, #dfe4f5 100%);
}
[data-theme="light"] .news-ad-label { color: rgba(40, 90, 60, 0.7); }

/* 广告横幅 */
[data-theme="light"] .ad-banner {
  background: linear-gradient(135deg, rgba(120, 230, 180, 0.25), rgba(180, 220, 255, 0.18));
  border-color: rgba(52, 211, 153, 0.35);
}

/* 留言浮窗面板 */
[data-theme="light"] .msg-panel {
  background: rgba(250, 251, 255, 0.92);
  border: 1px solid rgba(120, 140, 255, 0.22);
}
[data-theme="light"] .msg-help { border-bottom-color: rgba(120, 140, 255, 0.15); }
[data-theme="light"] .msg-form input,
[data-theme="light"] .msg-form textarea {
  background: rgba(120, 140, 255, 0.06);
  border-color: rgba(120, 140, 255, 0.25);
}
[data-theme="light"] .msg-form input:focus,
[data-theme="light"] .msg-form textarea:focus {
  background: rgba(120, 140, 255, 0.1);
}

/* Toast / Tooltip */
[data-theme="light"] .nebula-tip {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(120, 140, 255, 0.3);
  box-shadow: 0 12px 40px rgba(40, 50, 95, 0.2), 0 0 0 1px rgba(120, 140, 255, 0.1);
}
[data-theme="light"] .nebula-tip::after {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(120, 140, 255, 0.3);
}
[data-theme="light"] .nebula-toast-success { background: rgba(52, 211, 153, 0.18); color: #0f7a4d; border-color: rgba(52, 211, 153, 0.4); }
[data-theme="light"] .nebula-toast-error { background: rgba(239, 68, 68, 0.16); color: #b91c1c; border-color: rgba(239, 68, 68, 0.4); }
[data-theme="light"] .nebula-toast-info { background: rgba(124, 92, 255, 0.16); color: #5b3fd6; border-color: rgba(124, 92, 255, 0.4); }

/* 搜索框边框在浅色下可见 */
[data-theme="light"] .search-box,
[data-theme="light"] .hero-search {
  border-color: rgba(120, 140, 255, 0.3);
  background: rgba(255, 255, 255, 0.5);
}

/* ══════════════════════════════════════════════════
   亮色模式色彩增强：徽章 / Tab / 按钮 / 卡片
   ══════════════════════════════════════════════════ */

/* Hero 徽章：加深底色 + 蓝色系 */
[data-theme="light"] .badge {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.28);
}

/* 板块副标题：加浅色药丸底 */
[data-theme="light"] .section-desc {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.18);
  color: #3b82f6;
  font-size: 13.5px;
}

/* 分类 Tab：未激活态 */
[data-theme="light"] .filter-btn {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(120, 140, 255, 0.2);
}
[data-theme="light"] .filter-btn:hover {
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.06);
}

/* 分类 Tab 激活态：蓝紫渐变（替代暗色紫粉） */
[data-theme="light"] .filter-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}
[data-theme="light"] .filter-btn.active i {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

/* 卡片标签 chip */
[data-theme="light"] .chip {
  background: rgba(59, 130, 246, 0.07);
  border-color: rgba(59, 130, 246, 0.18);
  color: #4f7bd0;
}

/* 卡片访问按钮（通用 visit） */
[data-theme="light"] .visit {
  background: rgba(59, 130, 246, 0.07);
  border: 1px solid rgba(59, 130, 246, 0.22);
  color: #2563eb;
}
[data-theme="light"] .visit:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}
[data-theme="light"] .visit .arrow { color: #3b82f6; }

/* 游戏卡片按钮：蓝色系替代橙紫 */
[data-theme="light"] .game-card .visit {
  background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(99,102,241,.10));
  border-color: rgba(59, 130, 246, 0.3);
  color: #2563eb;
}
[data-theme="light"] .game-card:hover .visit {
  background: linear-gradient(135deg, rgba(59,130,246,.22), rgba(99,102,241,.18));
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.18);
}

/* 查看全部按钮：加深色值 */
[data-theme="light"] .btn-more {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.04);
}
[data-theme="light"] .btn-more:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.65);
  color: #2563eb;
  box-shadow: 0 4px 18px rgba(59, 130, 246, 0.15);
}

/* 板块标题圆点：亮色下收敛光晕 */
[data-theme="light"] .section-title .dot {
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.45);
}

/* 统计卡片 stat-card 微调 */
[data-theme="light"] .stat-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(120, 140, 255, 0.25);
}

/* ══════════════════════════════════════════════════
   亮色模式第二轮：对比度 / 可见性增强
   ══════════════════════════════════════════════════ */

/* 卡片边框 + 阴影：亮色下用浅色阴影替代黑色 */
[data-theme="light"] .card {
  border-color: rgba(120, 140, 255, 0.22);
}
[data-theme="light"] .card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 16px 48px rgba(60, 70, 140, 0.12), 0 4px 12px rgba(60, 70, 140, 0.06);
}
/* 重点推荐卡片 */
[data-theme="light"] .agent-card.featured {
  border-color: rgba(99, 102, 241, 0.4);
  background:
    linear-gradient(180deg, rgba(99, 102, 241, 0.06), rgba(59, 130, 246, 0.02) 40%, transparent 70%),
    var(--panel);
}

/* 广告卡 "立即查看 +" 链接：青色→蓝色 */
[data-theme="light"] .ad-card-link {
  color: #3b82f6;
  border-top-color: rgba(99, 102, 241, 0.15);
}
[data-theme="light"] .ad-card-link:hover {
  color: #2563eb;
}

/* 板块副标题 cat-note（如"仅限娱乐 · 纯纯"）*/
[data-theme="light"] .cat-note {
  color: #6366f1;
}

/* 广告 CTA 按钮：蓝系替代紫色 */
[data-theme="light"] .ad-section-cta {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  box-shadow: 0 3px 12px rgba(59, 130, 246, 0.25);
}
[data-theme="light"] .ad-section-cta:hover {
  box-shadow: 0 5px 18px rgba(59, 130, 246, 0.35);
}

/* 资讯副标题 news-subtitle */
[data-theme="light"] .news-subtitle {
  color: #64748b;
}

/* 搜索结果提示条 */
[data-theme="light"] .search-toast--ok {
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}
[data-theme="light"] .search-toast--empty {
  color: #64748b;
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.2);
}

/* 新闻 badge 标签 */
[data-theme="light"] .news-badge {
  color: var(--text);
  opacity: 0.85;
}

/* ══════════════════════════════════════════════════
   亮色模式第三轮：5 个具体可见性问题修复
   ══════════════════════════════════════════════════ */

/* ① 非激活分类 Tab：白色底→浅灰蓝底 + 可见边框（截图1）*/
[data-theme="light"] .filter-btn {
  color: #4b5563;
  background: rgba(241, 245, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
}
[data-theme="light"] .filter-btn:hover {
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(239, 246, 255, 0.95);
}

/* ② 广告卡内标签 "模型"：紫渐变→蓝色系（截图2）*/
[data-theme="light"] .ad-tag {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.1));
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

/* ③ 板块副标题 cat-note：加强色值（截图3/5）*/
[data-theme="light"] .cat-note {
  color: #4f46e5;
  font-weight: 600;
}
[data-theme="light"] .cat-note::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6366f1;
  margin-right: 7px;
  vertical-align: middle;
  opacity: 0.7;
}

/* ④ "刷新资讯" 按钮：浅绿→蓝色系（截图4）*/
[data-theme="light"] .btn-refresh {
  color: #2563eb;
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}
[data-theme="light"] .btn-refresh:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.5);
}

/* ── 主题切换按钮 ── */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  margin-left: 8px;
  border-radius: 12px;
  border: 1px solid rgba(120, 140, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, background 0.25s, border-color 0.25s;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(120, 140, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}
.theme-toggle .ic {
  position: absolute;
  top: 50%; left: 50%;
  width: 20px; height: 20px;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.theme-toggle .ic-sun { opacity: 0; transform: translate(-50%, -50%) rotate(-90deg) scale(0.5); }
.theme-toggle .ic-moon { opacity: 1; transform: translate(-50%, -50%) rotate(0) scale(1); }
[data-theme="light"] .theme-toggle { background: rgba(120, 140, 255, 0.1); }
[data-theme="light"] .theme-toggle .ic-sun { opacity: 1; transform: translate(-50%, -50%) rotate(0) scale(1); }
[data-theme="light"] .theme-toggle .ic-moon { opacity: 0; transform: translate(-50%, -50%) rotate(90deg) scale(0.5); }

/* ══════════════════════════════════════════════════
   亮色模式第四轮：截图逐项可见性修复
   ══════════════════════════════════════════════════ */

/* ① 非激活 Tab：白底融入背景 → 浅蓝灰底 + 深灰字 + 数字加粗 */
[data-theme="light"] .filter-btn {
  color: #475569;
  background: rgba(241, 245, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-weight: 500;
}
[data-theme="light"] .filter-btn:hover {
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(239, 246, 255, 0.95);
}

/* ② 卡片内「开源·MIT」等许可标签：浅绿→深绿（亮色下够醒目） */
[data-theme="light"] .lic-open {
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}
[data-theme="light"] .lic-closed {
  color: #d97706;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}
[data-theme="light"] .lic-cloud {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.35);
}

/* ③ 星标/增长数字（+234% 等）：橙色加深 */
[data-theme="light"] .stars {
  color: #d97706;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

/* ④ 卡片底部 pill 标签（多模型/OpenAI/MCP 等）：加深 */
[data-theme="light"] .chip {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(148, 163, 184, 0.3);
  color: #475569;
  font-weight: 500;
}

/* ⑤ 上线时间标签：橙色→琥珀色 */
[data-theme="light"] .launch {
  color: #b45309;
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
}

/* ⑥ 板块副标题 section-desc：蓝色药丸再加深 */
[data-theme="light"] .section-desc {
  color: #2563eb;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
}

/* ⑦ 模型卡片规格表标签(dt)加深 */
[data-theme="light"] .model-card .spec dt {
  color: #64748b;
  font-weight: 500;
}
[data-theme="light"] .model-card .spec dd {
  color: #1e293b;
  font-weight: 700;
}

/* ⑧ 游戏卡片访问按钮：橙紫渐变→蓝色系 */
[data-theme="light"] .game-card .visit {
  background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(99,102,241,.08));
  border-color: rgba(59, 130, 246, 0.35);
  color: #2563eb;
}
[data-theme="light"] .game-card:hover .visit {
  background: linear-gradient(135deg, rgba(59,130,246,.22), rgba(99,102,241,.15));
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.18);
}

/* ⑨ cat-note 右侧标签最终加强 */
[data-theme="light"] .cat-note {
  color: #4338ca;
  font-weight: 700;
  font-size: 13px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景层 */
#galaxy {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  display: block;
}
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(124, 92, 255, 0.20), transparent 60%),
    radial-gradient(100% 80% at 90% 110%, rgba(255, 122, 89, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(5, 6, 12, 0.35), rgba(5, 6, 12, 0.78));
}
/* 胶片颗粒噪点层 */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }

/* 导航 */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(18px, 5vw, 48px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(5, 6, 15, 0.7), rgba(5, 6, 15, 0.15));
  border-bottom: 1px solid rgba(120, 140, 255, 0.1);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: 0.5px; }
.brand-mark {
  font-size: 22px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(155, 107, 255, 0.6));
}
.brand-text em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; gap: 6px; }
.nav-links a {
  position: relative;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 600;
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  color: #fff;
  background: rgba(120, 140, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(120, 140, 255, 0.3);
}
.nav-toggle {
  display: none;
  background: none; border: none; color: var(--text);
  font-size: 24px; cursor: pointer;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 110px 20px 60px;
  position: relative;
}
.hero-inner { max-width: 86%; width: 100%; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 13px;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.28);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  font-weight: 600;
}
/* 呼吸灯圆点 */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #37e08a;
  box-shadow: 0 0 10px #37e08a, 0 0 20px rgba(55, 224, 138, 0.4);
  animation: breathe 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 10px #37e08a, 0 0 20px rgba(55, 224, 138, 0.4); }
  50% { opacity: 0.35; transform: scale(0.65); box-shadow: 0 0 4px rgba(55, 224, 138, 0.3), 0 0 8px rgba(55, 224, 138, 0.15); }
}
.hero-title {
  font-size: clamp(36px, 6.5vw, 68px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(155, 107, 255, 0.45));
}
.hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-dim);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* Hero 搜索框 */
.hero-search {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 540px;
  margin: 0 auto 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 4px 4px 4px 16px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.hero-search:focus-within {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: rgba(255, 255, 255, 0.08);
}
.hero-search .search-ico {
  font-size: 18px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.hero-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  padding: 10px 12px;
  min-width: 0;
}
.hero-search input::placeholder { color: var(--text-dim); opacity: .6; }
.btn-sm {
  padding: 9px 22px;
  font-size: 14px;
  border-radius: 10px;
  flex-shrink: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-primary {
  background: var(--grad);
  color: #06070f;
  box-shadow: 0 10px 30px rgba(155, 107, 255, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(155, 107, 255, 0.55); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 140, 255, 0.3);
  color: var(--text);
}
.btn-ghost:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.09); }

/* Hero 统计卡片 */
.hero-stats {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 48px;
  flex-wrap: wrap;
}
.stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 20px 28px;
  text-align: center;
  min-width: 120px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(255, 255, 255, 0.07);
}
.stat-card b {
  display: block;
  font-size: 30px;
  font-weight: 800;
  color: #e2e8f0;
  line-height: 1.2;
}
.stat-card span {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}
.stat-highlight b {
  background: linear-gradient(135deg, #a78bfa, #818cf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-highlight {
  border-color: rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.06);
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scroll-hint span {
  width: 22px; height: 36px;
  border: 2px solid rgba(120, 140, 255, 0.4);
  border-radius: 14px;
  position: relative;
}
.scroll-hint span::after {
  content: "";
  position: absolute;
  left: 50%; top: 7px;
  width: 4px; height: 8px;
  background: var(--c-cyan);
  border-radius: 4px;
  transform: translateX(-50%);
  animation: scrollDot 1.6s infinite;
}
@keyframes scrollDot { 0% { opacity: 0; top: 7px; } 40% { opacity: 1; } 100% { opacity: 0; top: 20px; } }

/* 区块 */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px clamp(18px, 5vw, 40px);
}
.section-head { margin-bottom: 24px; }
.section-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 16px rgba(155, 107, 255, 0.7);
}
.section-desc { color: var(--text-dim); margin-top: 10px; font-size: 15px; }

/* 网格 */
.grid { display: grid; gap: 20px; align-items: stretch; }
.news-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.card-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.model-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.game-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* 卡片通用 */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(120, 140, 255, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(120, 140, 255, 0.45);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
}
.card:hover::before { opacity: 1; }

/* 资讯列表（参考 AI Portal 流式布局） */
.news-subtitle {
  font-size: clamp(15px, 2.5vw, 19px);
  font-weight: 700;
  color: var(--text-dim);
  margin-left: 6px;
}
.news-layout {
  display: flex;
  align-items: center;
  gap: 24px;
}
.news-panel {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  padding-bottom: 8px;
}
/* 资讯面板内的查看全部按钮 */
.news-panel + .btn-more,
.news-panel .btn-more {
  margin: 0 20px 16px;
  width: calc(100% - 40px);
}
.news-item {
  border-bottom: 1px solid rgba(120, 140, 255, 0.07);
  transition: background 0.2s;
}
.news-item:last-child { border-bottom: none; }
.news-item-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  transition: background 0.2s;
}
.news-item-link:hover {
  background: rgba(124, 92, 255, 0.06);
}
.news-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.news-body {
  flex: 1;
  min-width: 0;
}
.news-body h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: #e8e6f0;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-meta {
  font-size: 12.5px;
  color: var(--text-dim);
  opacity: 0.7;
}
.news-badge {
  flex-shrink: 0;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* ── 资讯区右侧广告卡片（参照设计图） ── */
.news-ad-card {
  flex-shrink: 0;
  width: 280px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(20, 16, 45, 0.35), rgba(12, 10, 30, 0.42));
  border: 1px solid rgba(124, 92, 255, 0.15);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  overflow: hidden;
  position: relative;
  animation: adCardIn 0.6s ease both;
  animation-delay: 0.3s;
}
.news-ad-inner {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 14px;
}
.news-ad-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: rgba(150, 190, 165, 0.5);
}
.news-ad-img {
  width: 100%;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
}
.news-ad-img-placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #1a1a2e 100%);
  border-radius: 12px;
  position: relative;
}
.news-ad-img-placeholder::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(120,140,255,.08), transparent 60%),
    repeating-linear-gradient(0deg, transparent, transparent 8px, rgba(120,140,255,.04) 8px, rgba(120,140,255,.04) 9px);
}
.news-ad-img-placeholder::after {
  content: "▣";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  color: rgba(120, 140, 255, 0.25);
}
.news-ad-title {
  font-size: 15px;
  font-weight: 700;
  color: #e8e6f0;
  line-height: 1.35;
}
.news-ad-desc {
  font-size: 12px;
  color: rgba(180, 170, 210, 0.55);
  line-height: 1.5;
}
.news-ad-link {
  font-size: 13px;
  font-weight: 700;
  color: #46e6ff;
  text-decoration: none;
  transition: color 0.2s;
}
.news-ad-link:hover { color: #8af0ff; }

/* 工具/模型卡片 */
.card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.logo {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  color: #06070f;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.card h3 { font-size: 17px; font-weight: 700; }
.card .cat {
  font-size: 12px;
  color: var(--text-dim);
}
.card p.desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis;
  line-height: 1.55;
  word-break: break-word;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.visit {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  background: rgba(120, 140, 255, 0.1);
  border: 1px solid rgba(120, 140, 255, 0.22);
  transition: background 0.2s, transform 0.2s;
  margin-top: auto;
}
.visit:hover { background: rgba(120, 140, 255, 0.2); transform: translateY(-1px); }
.visit .arrow { color: var(--c-cyan); }

/* 模型卡特有 */
.model-card .spec {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  font-size: 12.5px;
  margin-bottom: 14px;
}
.model-card .spec dt { color: var(--text-dim); }
.model-card .spec dd { color: var(--text); font-weight: 600; }

/* 游戏卡片（对齐参考图：带规格表） */
.game-card .logo { font-size: 28px; }
.game-card h3 { line-height: 1.3; }
.game-card p.desc { line-height: 1.65; color: var(--text-dim); }
.game-card .spec {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  font-size: 12.5px;
  margin-bottom: 14px;
}
.game-card .spec dt { color: var(--text-dim); }
.game-card .spec dd { color: var(--text); font-weight: 600; }
.game-card .chips { margin-bottom: 14px; }
.game-card .visit {
  background: linear-gradient(135deg, rgba(255,122,89,.15), rgba(124,92,255,.12));
  border-color: rgba(255,122,89,.3);
}
.game-card:hover .visit {
  background: linear-gradient(135deg, rgba(255,122,89,.25), rgba(124,92,255,.2));
  border-color: rgba(255,122,89,.55);
  box-shadow: 0 6px 20px rgba(255,122,89,.18);
}

/* 查看全部 / 收起按钮 */
.btn-more {
  display: block;
  margin: 20px auto 0;
  padding: 12px 36px;
  border-radius: 999px;
  border: 1px solid rgba(100, 140, 255, 0.45);
  background: transparent;
  color: #a5b4fc;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
}
.btn-more:hover {
  background: rgba(100, 140, 255, 0.1);
  border-color: rgba(130, 160, 255, 0.7);
  color: #c8d0ff;
  box-shadow: 0 4px 18px rgba(100, 120, 255, 0.15);
}

/* 搜索结果悬浮提示条 */
.search-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  pointer-events: none;
  transition: opacity 0.35s ease;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.search-toast--ok {
  color: #6ee7a8;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 8px 28px rgba(52, 211, 153, 0.15);
}
.search-toast--empty {
  color: #ffb86b;
  background: rgba(255, 184, 107, 0.12);
  border: 1px solid rgba(255, 184, 107, 0.35);
  box-shadow: 0 8px 28px rgba(255, 184, 107, 0.15);
}

/* 回到顶部按钮 */
.back-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--grad);
  color: #fff;
  font-size: 0;
  cursor: pointer;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px) scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
  box-shadow: 0 8px 28px rgba(155, 107, 255, 0.45);
}
.back-top svg {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}
.back-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: backTopPulse 2.2s ease-in-out infinite;
}
.back-top:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 14px 40px rgba(70, 230, 255, 0.55);
  animation: none;
}
@keyframes backTopPulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(155, 107, 255, 0.45), 0 0 0 0 rgba(155, 107, 255, 0.4); }
  50% { box-shadow: 0 8px 28px rgba(155, 107, 255, 0.45), 0 0 0 12px rgba(155, 107, 255, 0); }
}

/* ========== Hero 广告位布局 ========== */
.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-main {
  width: 100%;
  max-width: 820px;
}

/* ── 右侧广告卡片（默认绝对定位右侧，JS 可覆盖为 fixed 等） ── */
.ad-card {
  /* position/top/right 由 JS applyAdSize() 动态控制；无后端时保留以下默认值 */
  width: 300px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(20, 16, 45, 0.35), rgba(12, 10, 30, 0.42));
  border: 1px solid rgba(124, 92, 255, 0.15);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  overflow: hidden;
  animation: adCardIn 0.6s ease both;
  animation-delay: 0.3s;
  display: flex;
  flex-direction: column;
}
/* 静态回退：无 API 时广告卡保持原位 */
.ad-card:not([style*="position"]) {
  position: absolute;
  right: 0;
  top: 0;
}
/* 广告关闭按钮 */
.ad-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(200, 195, 220, 0.5);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.ad-close:hover {
  background: rgba(255, 80, 80, 0.2);
  color: #ff6b6b;
  transform: scale(1.15);
}
.ad-close-sm {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* 卡片顶部横幅图区域 */
.ad-card-banner {
  position: relative;
  height: 130px;
  overflow: hidden;
  flex-shrink: 0;
}
.ad-card-banner-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #7c5cff 0%, #3b82f6 40%, #06b6d4 70%, #10b981 100%);
}
.ad-card-banner-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(124,92,255,0.4) 0%, transparent 45%);
}
.ad-card-banner-text {
  position: relative;
  z-index: 1;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}
.ad-card-badge {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.25);
  padding: 3px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.ad-card-banner-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.ad-card-banner-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* 卡片主体内容 */
.ad-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ad-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #e8e6f0;
  line-height: 1.35;
  margin-bottom: 8px;
}
.ad-card-desc {
  font-size: 12.5px;
  color: rgba(200, 195, 220, 0.65);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}
.ad-card-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.ad-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.25), rgba(70, 230, 255, 0.15));
  color: #b8a9ff;
  border: 1px solid rgba(124, 92, 255, 0.2);
}
.ad-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: #46e6ff;
  text-decoration: none;
  padding: 9px 0;
  border-top: 1px solid rgba(124, 92, 255, 0.12);
  transition: color 0.2s;
}
.ad-card-link:hover {
  color: #8af0ff;
}

/* ── 统计卡下方广告横幅 ── */
.ad-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 14px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(20, 80, 55, 0.3), rgba(15, 60, 45, 0.2));
  border: 1px solid rgba(52, 211, 153, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  z-index: 1;
  animation: adBannerIn 0.5s ease both;
  animation-delay: 0.5s;
}
.ad-banner::before {
  content: "";
  position: absolute;
  left: -20px;
  top: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.08), transparent 70%);
  pointer-events: none;
}
.ad-banner-icon { font-size: 26px; flex-shrink: 0; }
.ad-banner-body { flex: 1; min-width: 0; }
.ad-banner-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #e8f0ec;
  line-height: 1.3;
}
.ad-banner-desc {
  font-size: 11.5px;
  color: rgba(160, 200, 175, 0.6);
  margin-top: 2px;
}
.ad-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: rgba(150, 190, 165, 0.45);
  flex-shrink: 0;
}
.ad-banner-cta {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #052e1b;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.ad-banner-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.35);
}

/* ── 板块间全宽广告（section_ad） ── */
.ad-section {
  width: 100%;
  margin: 0 auto 0;
  padding: 0 24px;
  animation: adSectionIn 0.5s ease both;
}
.ad-section-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(45, 30, 75, 0.4), rgba(25, 20, 55, 0.5));
  border: 1px solid rgba(140, 100, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.ad-section-inner:hover {
  border-color: rgba(140, 100, 255, 0.28);
  box-shadow: 0 4px 24px rgba(124, 92, 255, 0.08);
}
.ad-section-inner::before {
  content: "";
  position: absolute;
  left: -30px;
  top: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.08), transparent 70%);
  pointer-events: none;
}
.ad-section-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
}
.ad-section-body { flex: 1; min-width: 0; }
.ad-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #e8e6f0;
  line-height: 1.3;
}
.ad-section-desc {
  font-size: 12px;
  color: rgba(180, 170, 210, 0.55);
  margin-top: 2px;
}
.ad-section-cta {
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ad-section-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.35);
}

@keyframes adCardIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes adBannerIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes adSectionIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 响应式：小屏广告位调整 */
@media (max-width: 900px) {
  .hero-inner {
    padding-right: 0;
  }
  .ad-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 20px auto 0;
    right: auto;
    top: auto;
    flex-direction: row;
    height: auto;
  }
  .ad-card-banner {
    width: 140px;
    height: auto;
    min-height: 100px;
    flex-shrink: 0;
  }
  .ad-card-body { padding: 14px; }
}
@media (max-width: 520px) {
  .ad-card { flex-direction: column; }
  .ad-card-banner { width: 100%; height: 110px; }
  .ad-banner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }
  .ad-banner-body {
    order: 1;
    width: calc(100% - 50px);
  }
  .ad-badge {
    order: 2;
  }
  .ad-banner-cta {
    order: 3;
    width: 100%;
    text-align: center;
  }
}

/* ── 大屏：Hero 区域增加纵向间距，避免拥挤 ── */
@media (min-width: 1400px) {
  .hero { padding: 130px 20px 80px; }
  .badge { margin-bottom: 32px; }
  .hero-title { margin-bottom: 28px; }
  .hero-sub { margin-bottom: 44px; }
  .hero-search { margin-bottom: 56px; }
  .hero-stats { margin-top: 64px; gap: 24px; }
  .ad-banner { margin-top: 36px; }
}

/* 工具栏 */
.toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 220px;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
}
.search-ico { color: var(--text-dim); font-size: 18px; }
.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.search-box input::placeholder { color: var(--text-dim); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { color: var(--text); border-color: rgba(120, 140, 255, 0.4); }
.filter-btn.active {
  color: #06070f;
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(155, 107, 255, 0.35);
}
/* 筛选按钮内的数量徽标 */
.filter-btn i {
  font-style: normal;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.filter-btn.active i { background: rgba(0, 0, 0, 0.25); color: #fff; }

/* ===== AI Agent 板块 ===== */
.agent-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.cat-note {
  margin: -12px 0 22px;
  font-size: 13.5px;
  color: var(--text-dim);
  letter-spacing: 0.2px;
}

.agent-card { position: relative; }
.agent-card .agent-head { min-width: 0; }
.agent-card h3 { line-height: 1.3; }

/* 重点推荐卡片 */
.agent-card.featured {
  border-color: rgba(155, 107, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(155, 107, 255, 0.1), rgba(70, 230, 255, 0.03) 40%, transparent 70%),
    var(--panel);
  overflow: visible;
}
.agent-card.featured:hover { border-color: rgba(70, 230, 255, 0.65); }
.pick {
  position: absolute;
  top: 6px; right: 12px;
  z-index: 3;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #06070f;
  background: var(--grad);
  box-shadow: 0 6px 18px rgba(155, 107, 255, 0.45);
}

/* 开源属性 / 星标 */
.agent-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.lic {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid transparent;
}
.lic-open { color: #6ee7a8; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.32); }
.lic-closed { color: #ffb86b; background: rgba(255, 184, 107, 0.1); border-color: rgba(255, 184, 107, 0.3); }
.lic-cloud { color: #6bc9ff; background: rgba(70, 200, 255, 0.1); border-color: rgba(70, 200, 255, 0.32); }
.stars {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--c-warm);
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 184, 107, 0.1);
}
.agent-card .chips { margin-bottom: 16px; }
.agent-card p.desc {
  line-height: 1.55;
  -webkit-line-clamp: 2 !important;
}
.card p.desc:hover { cursor: help; }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dim);
  padding: 50px;
  font-size: 15px;
}

/* 上线时间标签 */
.launch {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--c-warm);
  background: rgba(255, 184, 107, 0.1);
  border: 1px solid rgba(255, 184, 107, 0.25);
  vertical-align: middle;
}

/* 资讯工具栏 */
.news-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.news-status {
  font-size: 12.5px;
  color: var(--text-dim);
}
.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-cyan);
  background: rgba(70, 230, 255, 0.08);
  border: 1px solid rgba(70, 230, 255, 0.25);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-refresh:hover { background: rgba(70, 230, 255, 0.18); transform: translateY(-1px); }
.btn-refresh:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* 加载动画 */
.empty.loading::after {
  content: "";
  display: inline-block;
  width: 20px; height: 20px;
  margin-left: 10px;
  border: 2px solid rgba(120, 140, 255, 0.3);
  border-top-color: var(--c-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 页脚 */
.footer {
  text-align: center;
  padding: 50px 20px 60px;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 1px solid rgba(120, 140, 255, 0.1);
  background: linear-gradient(180deg, transparent, rgba(5, 6, 15, 0.6));
}
.footer-note { font-size: 12px; opacity: 0.7; margin-top: 6px; }
.footer-icp { margin-top: 10px; font-size: 12px; }
.footer-icp a { color: var(--text-dim); text-decoration: none; border-bottom: 1px dotted rgba(120,140,255,0.4); }
.footer-icp a:hover { color: var(--accent); }

/* 进场动画 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.show { opacity: 1; transform: none; }

/* 响应式 */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 14px clamp(18px, 5vw, 48px) 20px;
    background: rgba(8, 10, 22, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(120, 140, 255, 0.12);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-toggle { display: block; }
  .hero-stats { gap: 12px; }
  .stat-card { padding: 14px 18px; min-width: 90px; }
  .stat-card b { font-size: 22px; }
  .hero-search { max-width: 100%; padding: 3px 3px 3px 12px; }
  .hero-search input { font-size: 14px; padding: 8px 8px; }
  .btn-sm { padding: 7px 16px; font-size: 13px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .news-layout { flex-direction: column; }
  .news-ad-card { width: 100%; max-width: 420px; margin: 0 auto; }
  .news-item-link { padding: 14px 14px; gap: 12px; }
  .news-icon { width: 38px; height: 38px; border-radius: 10px; }
  .news-body h3 { font-size: 14px; -webkit-line-clamp: 2; }
  .news-badge { padding: 4px 10px; font-size: 11px; }
  .ad-section-inner { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .ad-section-cta { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── 在线留言浮窗 ── */
.msg-widget { position: fixed; z-index: 90; }
.msg-fab {
  position: absolute;
  bottom: 0; right: 0;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border: none;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(59,130,246,0.45), 0 0 0 0 rgba(59,130,246,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  user-select: none;
  touch-action: none;
}
.msg-fab:hover { transform: scale(1.08); }
.msg-fab:active { cursor: grabbing; transform: scale(0.95); }
.msg-fab svg { width: 26px; height: 26px; }
.msg-fab-dot {
  position: absolute; top: 4px; right: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  animation: msgPulse 1.8s ease-in-out infinite;
}
@keyframes msgPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}
/* 展开面板 */
.msg-panel {
  position: absolute;
  bottom: 68px; right: 0;
  width: 340px;
  max-height: 520px;
  overflow-y: auto;
  border-radius: 18px;
  background: rgba(15, 12, 35, 0.92);
  border: 1px solid rgba(148,163,184,0.15);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 12px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  display: none;
  flex-direction: column;
  animation: msgPanelIn 0.25s ease both;
}
.msg-panel.open { display: flex; }
@keyframes msgPanelIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.msg-close {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.msg-close:hover { background: rgba(239,68,68,0.15); color: #ef4444; }

/* 帮助介绍区 */
.msg-help { padding: 22px 20px 16px; border-bottom: 1px solid rgba(148,163,184,0.1); }
.msg-help-title { font-size: 17px; font-weight: 700; color: #e8e6f0; margin-bottom: 8px; }
.msg-help-desc { font-size: 13px; color: var(--text-dim); line-height: 1.55; margin-bottom: 14px; }
.msg-help-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.msg-help-list li {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: rgba(200,195,220,0.75);
  line-height: 1.45;
}
.msg-help-list li svg { width: 16px; height: 16px; flex-shrink: 0; color: #34d399; }

/* 留言表单区 */
.msg-form-wrap { padding: 18px 20px 20px; }
.msg-form-title { font-size: 15px; font-weight: 700; color: #e8e6f0; margin-bottom: 14px; }
.msg-form { display: flex; flex-direction: column; gap: 10px; }
.msg-form input,
.msg-form textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 11px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
  resize: vertical;
}
.msg-form input::placeholder,
.msg-form textarea::placeholder { color: var(--text-dim); opacity: 0.5; }
.msg-form input:focus,
.msg-form textarea:focus {
  border-color: rgba(59,130,246,0.5);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.msg-submit {
  padding: 12px;
  border: none; border-radius: 11px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.3px;
}
.msg-submit:hover { opacity: 0.9; transform: translateY(-1px); }
.msg-submit:active { transform: translateY(0); }
.msg-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.msg-result {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
  display: none;
}
/* ---- Toast 提示（留言提交等全局使用） ---- */
.nebula-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  white-space: nowrap;
  max-width: calc(100vw - 48px);
  text-overflow: ellipsis;
  overflow: hidden;
}
.nebula-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.nebula-toast-success {
  background: rgba(52,211,153,0.15);
  color: #6ee7b7;
  border: 1px solid rgba(52,211,153,0.25);
}
.nebula-toast-error {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.25);
}
.nebula-toast-info {
  background: rgba(124,92,255,0.15);
  color: #c4b5fd;
  border: 1px solid rgba(124,92,255,0.25);
}

/* ---- 自定义悬浮卡片提示 ---- */
.nebula-tip {
  position: fixed;
  max-width: 320px;
  min-width: 160px;
  padding: 11px 15px;
  background: rgba(18, 14, 38, 0.82);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid rgba(124, 92, 255, 0.28);
  border-radius: 12px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
  z-index: 99998;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(124, 92, 255, 0.08);
  word-break: break-word;
}
.nebula-tip.show { opacity: 1; transform: translateY(0) scale(1); }
/* 箭头：默认在底部（tooltip 在目标上方时） */
.nebula-tip::after {
  content: "";
  position: absolute;
  left: var(--tip-arrow-x, 50%);
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: rgba(18, 14, 38, 0.82);
  border-right: 1px solid rgba(124, 92, 255, 0.28);
  border-bottom: 1px solid rgba(124, 92, 255, 0.28);
  transform: translateX(-50%) rotate(45deg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
/* 箭头在顶部（tooltip 翻到目标下方时） */
.nebula-tip[data-arrow="top"]::after {
  bottom: auto;
  top: -6px;
  border-right: 1px solid rgba(124, 92, 255, 0.28);
  border-bottom: none;
  border-top: 1px solid rgba(124, 92, 255, 0.28);
}

/* 小屏适配 */
@media (max-width: 400px) {
  .msg-panel { width: calc(100vw - 32px); max-width: 340px; }
}

/* ══════════════════════════════════════════════════
   热门榜单（Hero 下方，三 Tab 排行）
   ══════════════════════════════════════════════════ */
.ranking-section {
  padding: 48px 0 32px;
}
.ranking-section .section-head {
  margin-bottom: 20px;
}
.ranking-fire {
  font-size: 1.15em;
  margin-right: 2px;
}
.ranking-sub {
  font-size: 0.72em;
  color: var(--text-dim);
  font-weight: 400;
  margin-left: 6px;
  letter-spacing: 0.3px;
}

/* Tab 栏 */
.ranking-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ranking-tab {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.22s ease;
  font-family: inherit;
  white-space: nowrap;
}
.ranking-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(120, 140, 255, 0.3);
}
.ranking-tab.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.35);
  font-weight: 600;
}

/* 榜单列表 */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ranking-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  cursor: default;
}
.ranking-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(120, 140, 255, 0.2);
  transform: translateY(-1px);
}

/* 排名序号 / 图标 */
.ranking-rank {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}
.ranking-item:nth-child(1) .ranking-rank {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}
.ranking-item:nth-child(2) .ranking-rank {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #fff;
}
.ranking-item:nth-child(3) .ranking-rank {
  background: linear-gradient(135deg, #cd7c3a, #a16207);
  color: #fff;
}
/* Top3 用图标代替数字 */
.ranking-item:nth-child(1) .ranking-rank::after { content: ""; }
.ranking-item:nth-child(2) .ranking-rank::after { content: ""; }
.ranking-item:nth-child(3) .ranking-rank::after { content: ""; }

/* 左侧图标（取自数据 icon/color） */
.ranking-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* 中间信息 */
.ranking-info {
  flex: 1;
  min-width: 0;
}
.ranking-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.ranking-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ranking-tag-paid {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}
.ranking-desc {
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* 右侧：热度 + 按钮 */
.ranking-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.ranking-heat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #f59e0b;
  white-space: nowrap;
}
.ranking-heat-icon {
  font-size: 15px;
}
.ranking-btn {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}
.ranking-btn:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.7);
  color: #93bbfd;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* ── 亮色模式适配 ── */
[data-theme="light"] .ranking-section {
  /* 继承 section 默认 */
}
[data-theme="light"] .ranking-sub {
  color: #64748b;
}
[data-theme="light"] .ranking-tab {
  background: rgba(241, 245, 255, 0.7);
  border-color: rgba(148, 163, 184, 0.35);
  color: #475569;
}
[data-theme="light"] .ranking-tab:hover {
  background: rgba(241, 245, 255, 0.95);
  border-color: rgba(59, 130, 246, 0.4);
  color: #1e293b;
}
[data-theme="light"] .ranking-tab.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border-color: transparent;
}
[data-theme="light"] .ranking-item {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(148, 163, 184, 0.25);
}
[data-theme="light"] .ranking-item:hover {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(59, 130, 246, 0.35);
}
[data-theme="light"] .ranking-rank {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}
[data-theme="light"] .ranking-desc {
  color: #64748b;
}
[data-theme="light"] .ranking-heat {
  color: #d97706;
}
[data-theme="light"] .ranking-btn {
  border-color: rgba(59, 130, 246, 0.5);
  color: #2563eb;
  background: rgba(59, 130, 246, 0.06);
}
[data-theme="light"] .ranking-btn:hover {
  background: rgba(59, 130, 246, 0.14);
  border-color: #3b82f6;
  color: #1d4ed8;
}

/* 移动端 */
@media (max-width: 700px) {
  .ranking-section { padding: 32px 0 20px; }
  .ranking-tabs { gap: 6px; }
  .ranking-tab { padding: 6px 14px; font-size: 13px; }
  .ranking-item { padding: 12px 14px; gap: 12px; }
  .ranking-rank { width: 34px; height: 34px; font-size: 14px; border-radius: 8px; }
  .ranking-icon { width: 36px; height: 36px; font-size: 15px; border-radius: 8px; }
  .ranking-name { font-size: 14px; }
  .ranking-desc { font-size: 12px; }
  .ranking-heat { font-size: 13px; }
  .ranking-btn { padding: 5px 12px; font-size: 12px; }
  .ranking-right { gap: 8px; }
}
@media (max-width: 480px) {
  .ranking-btn span { display: none; } /* 小屏只显示图标 */
  .ranking-btn { padding: 6px 10px; min-width: auto; }
  .ranking-btn::after { content: "→"; }
}

/* ══════════════════════════════════════════════════
   Token 福利 · 最新资讯（热门榜单下方）
   ══════════════════════════════════════════════════ */
.token-section {
  padding: 40px 0 24px;
}
.token-icon {
  font-size: 1.1em;
  margin-right: 3px;
}
.token-refresh {
  float: right;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 400;
  cursor: pointer;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.18s;
  letter-spacing: 0.5px;
}
.token-refresh:hover {
  color: #34d399;
  border-color: rgba(52,211,153,0.4);
  background: rgba(52,211,153,0.06);
}

/* Token 卡片 */
.token-grid .card {
  position: relative;
  overflow: visible;
}
.token-tag {
  position: absolute;
  top: -6px;
  left: 14px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 6px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.token-tag--free {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245,158,11,0.35);
}
.token-tag--paid {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 2px 8px rgba(139,92,246,0.35);
}
.token-tag--news {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #fff;
  box-shadow: 0 2px 8px rgba(6,182,212,0.35);
}

/* Token 卡片内描述截断 */
.token-grid .card p.desc {
  -webkit-line-clamp: 2;
  max-height: 2.8em;
}

/* ── 亮色模式 ── */
[data-theme="light"] .token-refresh {
  color: #64748b;
  border-color: rgba(148,163,184,0.35);
}
[data-theme="light"] .token-refresh:hover {
  color: #059669;
  border-color: rgba(5,150,105,0.45);
  background: rgba(5,150,105,0.06);
}

@media (max-width: 600px) {
  .token-section { padding: 28px 0 16px; }
  .token-refresh { font-size: 11px; padding: 2px 8px; }
  .token-tag { font-size: 10px; padding: 1px 7px; }
}

/* ══════════════════════════════════════════════════
   网页小游戏 · 内嵌弹窗（iframe 大弹窗）
   ══════════════════════════════════════════════════ */
body.modal-locked { overflow: hidden; }

.game-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  padding: 22px;
  background: rgba(4, 5, 12, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: gameModalIn 0.18s ease;
}
@keyframes gameModalIn { from { opacity: 0; } to { opacity: 1; } }

.game-modal__box {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #0b0d16;
  border: 1px solid rgba(124, 92, 255, 0.28);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.game-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.16), rgba(124, 92, 255, 0.04));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  flex-shrink: 0;
}
.game-modal__title {
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-modal__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.game-modal__ext {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}
.game-modal__ext:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.game-modal__close {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff; font-size: 17px; line-height: 1;
  transition: background 0.15s;
}
.game-modal__close:hover { background: rgba(255, 92, 92, 0.65); }

.game-modal__frame {
  flex: 1;
  min-height: 0;
  background: #000;
}
.game-modal__iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* iframe 加载失败时的兜底提示 */
.game-modal__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  padding: 32px;
  text-align: center;
}
.game-modal__error-icon {
  font-size: 48px;
  line-height: 1;
  opacity: 0.85;
}
.game-modal__error-text {
  font-size: 17px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
}
.game-modal__error-hint {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  max-width: 360px;
  line-height: 1.5;
}
.game-modal__error-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
}
.game-modal__error-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

/* 亮色模式下弹窗保持深色沉浸（游戏画面不受影响），仅边框/栏微调 */
[data-theme="light"] .game-modal {
  background: rgba(255, 255, 255, 0.55);
}
[data-theme="light"] .game-modal__box {
  background: #0b0d16;
  border-color: rgba(59, 130, 246, 0.4);
}
[data-theme="light"] .game-modal__bar {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.22), rgba(59, 130, 246, 0.05));
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

/* 移动端：弹窗占满全屏 */
@media (max-width: 600px) {
  .game-modal { padding: 0; }
  .game-modal__box { border-radius: 0; border: none; }
}
