/* =============================================================
   智链导航 · 前台样式（响应式自适应版）
   断点：手机 <768px / 平板 768-1024px / 电脑 >1024px
   ============================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --theme: #2563eb;
  --theme-dark: #1d4ed8;
  --radius: 12px;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --gold: #f59e0b;
  --silver: #9ca3af;
  --bronze: #d97706;
  /* v1.7.10：首页「置顶推荐 / 热门排行」的宽屏基准列数。
     默认 3，实际值由 views/home/index.php 以内联变量覆盖（后台可设 2~6）。
     这里留一份兜底，避免模板变量未输出时 grid 拿到空值导致整个区块塌掉。 */
  --promote-cols: 3;
  --hot-cols: 3;
}

html { -webkit-text-size-adjust: 100%; }
/* v1.8.5：hidden 属性全局兜底。
   任何作者样式只要设置了 display 就会覆盖 hidden 的默认 display:none，
   曾导致 header 隐藏种子元素显示成白色小胶囊（顶栏变形）。
   此规则与 .popup-mask[hidden] 等单点兜底语义一致，统一收编。 */
[hidden] { display: none !important; }
/* v1.9.2：emoji 兜底字体。
   站点里用了不少装饰性 emoji（✅ 🎁 💎 ⭐ 🔒 …），在没有 emoji 字体的环境
   （部分精简版 Linux / 老旧 Windows Server）会被渲染成空心方块「□」，像页面坏了。
   注意：**不能**把 "Noto Color Emoji" 直接写进下面那个 font-family 链 ——
   该字体内部含有 0-9 字形（emoji 数字键盘），排在 sans-serif 之前会劫持普通数字，
   把「1,548.3万」这类数据撑成方块宽度，全站数字变形（后台已实测 47px→105px）。
   正确做法是用 @font-face 只覆盖 emoji 码点。 */
@font-face {
  font-family: 'SLNEmoji';
  src: local('Apple Color Emoji'), local('Segoe UI Emoji'), local('Noto Color Emoji');
  unicode-range: U+1F000-1FAFF, U+2600-27BF, U+2190-21FF, U+2B00-2BFF, U+FE0F, U+200D, U+20E3;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               'SLNEmoji', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
ul { list-style: none; }

/* 全站容器：内容居中 + 左右留白（宽屏不再贴边） */
/* v1.7.9：容器宽度统一为 1440px
   历史上内页用 .container(1280px)、首页用 .container.home-wide(1400px)，
   而顶栏 .topbar-inner 的左右内边距也是 32px。三者上限不一致时，
   首页内容的左右边缘会和顶栏/导航对不齐，观感上像「内容偏左」。
   现在统一到 1440px：顶栏、导航、首页、内页共用同一上下限，
   任何页面横向都不再出现「左边贴齐、右边差一大截」的错位。
   列数联动见下方 .site-grid/.hot-grid/.promote-grid 的注释。 */
.container { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
/* .home-wide 保留类名以兼容模板，宽度已与 .container 一致，无需再单独设值 */
.container.home-wide { max-width: 1440px; }
.muted { color: var(--muted); }
.pad { padding: 16px; }

/* ============ 顶部栏 ============ */
.topbar {
  background: linear-gradient(135deg, var(--theme) 0%, var(--theme-dark) 100%);
  color: #fff;
  /* 保证顶栏（含登录/注册/提交网址）永远在最上层，
     不被 sticky 分类导航（z-index:50）或其它浮层盖住导致点不到 */
  position: relative;
  z-index: 60;
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 32px;
  flex-wrap: nowrap;      /* 修复：禁止换行导致的 logo / 搜索框错位 */
}
.logo {
  display: flex; align-items: center; gap: 12px;
  font-size: 24px; font-weight: 700; white-space: nowrap;
  flex-shrink: 0;
  min-width: 0;
}
.logo-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.logo img { height: 44px; width: auto; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,.18); font-size: 24px;
  flex-shrink: 0;
}
.search-wrap {
  position: relative;
  flex: 1 1 auto;          /* 修复：允许收缩，避免把右侧按钮挤下去 */
  min-width: 0;            /* 修复：min-width:240px 会在窄屏撑破布局 */
  max-width: 560px;
  margin: 0 auto;
}
.search {
  display: flex; align-items: center;
  background: #fff; border-radius: 999px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  width: 100%;
}
.search input {
  flex: 1; min-width: 0; border: none; outline: none;
  padding: 12px 18px; font-size: 15px; color: var(--text);
}
.search button {
  border: none; background: var(--theme); color: #fff;
  padding: 12px 24px; cursor: pointer; font-size: 15px; font-weight: 600;
  flex-shrink: 0; white-space: nowrap;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--text); cursor: pointer; font-size: 14px; transition: .15s;
}
.btn:hover { border-color: var(--theme); color: var(--theme); }
.btn-primary { background: var(--theme); border-color: var(--theme); color: #fff; }
.btn-primary:hover { background: var(--theme-dark); color: #fff; }
.btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-lg { padding: 12px 28px; font-size: 16px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-apply {
  background: #fff; color: var(--theme); border: none;
  font-weight: 600; border-radius: 999px;
  padding: 10px 18px; font-size: 14px;
  flex-shrink: 0; white-space: nowrap;
}

/* ============ 分类导航 ============ */
.catnav {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.catnav-inner {
  display: flex; align-items: center; justify-content: center; gap: 2px;
  overflow-x: auto; white-space: nowrap;
  padding: 0 32px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--theme) transparent;
  position: relative;
}
.catnav-inner::-webkit-scrollbar { height: 3px; }
.catnav-inner::-webkit-scrollbar-thumb { background: var(--theme); border-radius: 3px; }
.catnav-inner::-webkit-scrollbar-track { background: transparent; }
.catnav a {
  display: inline-block; padding: 12px 10px; color: var(--muted); font-size: 13px;
  border-bottom: 2px solid transparent; transition: .15s; font-weight: 500;
  flex-shrink: 0;
}
.catnav a:hover, .catnav a.active { color: var(--theme); border-bottom-color: var(--theme); }

/* ============ 顶部精选推荐条 ============
   注：类名沿用 flash60 / flash-label（v1.9 前这里是「60秒快讯」），
   改名会牵动模板、暗色主题、响应式共 6 处引用，收益不抵风险，故保留。
   语义已变为「精选推荐」，下方给了最小高度保证标签完整显示。 */
.flash60 {
  display: flex; align-items: stretch; margin: 14px 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.flash-label {
  background: var(--theme); color: #fff; padding: 0 12px; font-size: 13px; white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.25;
  /* v1.9：这里是 flex 列容器，「精选 / 推荐」两个字必须横排、且上下两行
     各自不换行 —— 少任何一个 nowrap，中文都会在 2 个字宽里被挤成竖排。 */
  flex-shrink: 0;
  min-height: 40px;
  writing-mode: horizontal-tb;
}
.flash-label i { font-style: normal; font-size: 11px; opacity: .85; white-space: nowrap; }
.flash-label, .flash-label i { text-orientation: upright; }
/* .flash-roll —— 顶部「精选推荐」纵向滚动条
 *
 * v1.9 两处变更：
 *
 * 【一】内容从「外部平台热榜标题」换成「随机精选的本站站点」。
 *   原因：原来的数据与首页中部「热门事件」同源（热门事件就是同一份
 *   外部热榜落库生成的），一个位置放两遍，且外链会带走访客。
 *   现在改成站内站点推荐，去重 + 导流 + 给长尾站点曝光。
 *   样式上从「平台名 + 标题」的纯文本，变成「小图标 + 站名」，
 *   所以新增了 .flash-pick / .flash-ico / .flash-nm 三条规则。
 *
 * 【二】无缝滚动的数学修正（这条是真正修 bug 的部分）。
 *   旧实现只渲染一份 <ul>，动画位移 translateY(-50%)。
 *   该写法仅在「li 条数为偶数」时才是无缝的：
 *     ul 高 = N×40px，位移 = N×40/2 = N×20px。
 *     N 为奇数时位移不是 40 的整数倍 → 位移到底时画面从第 (N+1)/2 条
 *     瞬跳回第 1 条，中间有明显闪跳。
 *   新站这类列表往往只有几条，奇数概率极高，所以线上很容易撞上。
 *   另外，连续匀速滚动意味着任意时刻画面都停在两条之间，
 *   40px 窗口里同时露出上一条下半截与下一条上半截 —— 就是「叠字」。
 *
 *   修复做法：
 *     1) 模板渲染**两份完全相同**的列表（第二份 aria-hidden + tabindex=-1），
 *        ul 总高 = 2N×40px，位移 -50% = N×40px —— 恒等于一份的整数高度，
 *        不论奇偶都无缝（这是 CSS 兜底，无 JS 时也正确）。
 *     2) 有 JS 时升级为**逐条步进**：每次整条平移 40px，步间停顿，
 *        滚完一份后瞬时复位继续。任意静止时刻窗口里都是完整的一条，
 *        彻底消除半截字并排。JS 失效时自动退回 CSS 连续滚动，功能不丢。
 *
 *   另给 li 补 min-width:0 + 文本省略，避免长站名从容器右侧顶出去。
 */
.flash-roll { flex: 1; overflow: hidden; height: 40px; min-width: 0; }
/* 速度：CSS 兜底模式下位移 -50% = N×40px。
 * 保持「约 1.8 秒滚过一条」→ 22px/s，故时长 = N×40/22 秒。
 * 具体数值由模板按实际条数写入 --flash-dur，避免条目少时快得看不清。
 * JS 接管后（.flash-roll.is-stepping）会移除该动画，改由脚本逐条平移。 */
.flash-roll ul {
  display: flex; flex-direction: column;
  animation: roll var(--flash-dur, 36s) linear infinite;
  will-change: transform;
}
.flash-roll.is-stepping ul {
  animation: none;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}
.flash-roll li {
  height: 40px; display: flex; align-items: center; padding: 0 14px;
  min-width: 0;              /* 允许内部 a 收缩，配合下面的省略号生效 */
  box-sizing: border-box;
}
.flash-roll li::before { content: "·"; color: var(--theme); font-weight: 700; margin-right: 8px; flex-shrink: 0; }

/* ---- v1.9：精选推荐条目（小图标 + 站名） ---- */
.flash-roll li a.flash-pick {
  color: var(--text);
  /* 单行省略，杜绝横向溢出（旧版此处会把文字顶到容器外） */
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 600;
  transition: color .15s;
}
.flash-roll li a.flash-pick:hover { color: var(--theme); }
/* 小图标容器：24px 方图。
   v1.9.1 改为「img 绝对定位盖住 b」的纯 CSS 分层方案，不再依赖 onerror ——
   理由同推广横幅：只要有 CSP / 隐私扩展拦掉内联 JS，onerror 就静默失效，
   破图会一直挂在那儿。分层方案对两者都免疫。 */
.flash-roll .flash-ico {
  position: relative; flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 6px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--theme) 12%, transparent);
}
.flash-roll .flash-ico img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
  background: color-mix(in srgb, var(--theme) 12%, transparent);
}
.flash-roll .flash-ico b {
  font-size: 12px; font-weight: 700; color: var(--theme); font-style: normal;
  line-height: 1; user-select: none;
}
.flash-roll .flash-nm {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@keyframes roll { 0% { transform: translateY(0); } 100% { transform: translateY(-50%); } }

/* 用户偏好减少动效时不滚动，改为静态展示（无障碍） */
@media (prefers-reduced-motion: reduce) {
  .flash-roll ul { animation: none; }
}

/* ============ 提示框 ============ */
.alert { padding: 12px 16px; border-radius: 8px; margin: 12px 0; font-size: 14px; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info  { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ============ 面板 ============ */
.main { padding-bottom: 40px; padding-top: 4px; }
.panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.panel-title { font-size: 17px; font-weight: 700; }
.panel-tip { color: var(--muted); font-size: 12px; }
.panel-more { color: var(--muted); font-size: 13px; flex-shrink: 0; }
.panel-more:hover { color: var(--theme); }

/* ============ 首页布局 ============ */
.home-main, .home-side { min-width: 0; }

/* 热门排行（栅格列数统一定义在文件下方「首页布局优化」区块，勿在此再写） */

.site-card {
  position: relative; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; transition: .18s;
  min-width: 0;          /* 修复：默认 min-width:auto 会被内部 nowrap 文本顶宽导致溢出 */
  overflow: hidden;
}
.site-card:hover { border-color: var(--theme); box-shadow: 0 6px 20px rgba(37,99,235,.10); transform: translateY(-2px); }
.hot-card { flex-direction: row; }
.rank-badge {
  position: absolute; top: -8px; left: -8px; z-index: 2;
  width: 24px; height: 24px; border-radius: 6px; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  background: #e5e7eb; color: var(--muted);
}
.rank-badge.gold { background: var(--gold); color: #fff; }
.rank-badge.silver { background: var(--silver); color: #fff; }
.rank-badge.bronze { background: var(--bronze); color: #fff; }

/* 站点图标 */
.fav {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; position: relative;
  overflow: hidden; font-weight: 700; font-size: 16px; color: #fff;
  /* v1.7.9：行高归一并锁死基线，避免中文字符（如「智」「腾」）下缘被 overflow 裁切 */
  line-height: 1;
}
.fav img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; z-index: 1; }
/* v1.7.9：首字母占位
   原先 .fav-letter 完全没有样式，字体度量由浏览器默认行高决定，
   中文/带下伸部的字符容易被 40px 方框裁掉下半截。
   这里显式补齐排版属性，保证任意字符都居中且完整显示。 */
.fav-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  font-size: inherit;
  color: inherit;
  /* 图片加载成功时被 img 盖住；加载失败/未设置时作为兜底显示 */
  position: relative;
  z-index: 0;
  /* 极少数生僻字可能超出方框，允许轻微缩放而非裁切 */
  transform: scale(0.92);
  transform-origin: center;
  user-select: none;
}
.fav-lg { width: 60px; height: 60px; border-radius: 14px; font-size: 24px; }
.fav-0 { background: #3b82f6; } .fav-1 { background: #8b5cf6; }
.fav-2 { background: #10b981; } .fav-3 { background: #f59e0b; }
.fav-4 { background: #ef4444; } .fav-5 { background: #06b6d4; }
.fav-6 { background: #ec4899; } .fav-7 { background: #6366f1; }

.site-card-body { flex: 1; min-width: 0; }
.site-name { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-desc { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 卡片元信息行：评分 / HTTPS / 移动适配 / 收录时间 */
.site-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px;
  margin-top: 5px; font-size: 11px; line-height: 16px; color: var(--muted);
}
.site-meta .m-score { font-weight: 700; }
.site-meta .m-score.high { color: #16a34a; }
.site-meta .m-score.mid { color: #f59e0b; }
.site-meta .m-score.low { color: #dc2626; }
.site-meta .m-badge {
  display: inline-block; padding: 0 5px; border-radius: 4px;
  font-size: 10px; line-height: 16px; background: #ecfdf5; color: #047857;
}
.site-meta .m-date { margin-left: auto; padding-left: 6px; white-space: nowrap; }

.site-click { color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; white-space: nowrap; }
.site-click i { display: block; font-style: normal; font-size: 11px; font-weight: 400; }

/* 卡片右侧「访问」按钮 */
.site-visit {
  position: absolute; right: 8px; top: 8px;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 4px 9px; font-size: 12px; line-height: 1;
  background: var(--theme); color: #fff !important;
  border-radius: 999px; text-decoration: none !important;
  opacity: 0; transition: opacity .18s, transform .18s;
}
.site-card:hover .site-visit,
.site-card:focus-within .site-visit { opacity: 1; }
.site-visit:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.3); }

/* 站点网格：定义已统一到文件后段「首页网格」区块（搜索 .site-grid 选择器），
   此处不再重复定义 —— 历史上这里写过一次 repeat(3,1fr)，后段又写了一次
   auto-fill，同优先级下后者生效，前一处属死代码，容易误导后续维护。
   （注释内刻意不写花括号，避免简单的括号计数工具误判文件不平衡。） */
.cat-icon { margin-right: 4px; }

/* 侧边栏 */
.news-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 9px 0; border-bottom: 1px dashed var(--border);
}
.news-list li:last-child { border-bottom: none; }
.news-list li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.news-list li a:hover { color: var(--theme); }
.news-list li span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.mini-site-list li { padding: 7px 0; border-bottom: 1px dashed var(--border); }
.mini-site-list li:last-child { border-bottom: none; }
.mini-site-list a { display: flex; align-items: center; gap: 8px; }
.mini-site-list .fav { width: 28px; height: 28px; border-radius: 7px; font-size: 12px; }

/* ============ 面包屑 ============ */
.breadcrumb { color: var(--muted); font-size: 13px; margin: 14px 0 12px; }
.breadcrumb a:hover { color: var(--theme); }

/* ============ 详情页 ============ */
.detail-page { margin-top: 14px; }
/* 修复重叠：minmax(0,1fr) 防止长 URL/表格把主列撑破侧栏；grid 内 sticky 需容器不溢出 */
.detail-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}
.detail-main, .detail-side { min-width: 0; max-width: 100%; }
.detail-side { position: sticky; top: 60px; align-self: start; }
/* 主列内容不得溢出，否则 sticky 侧栏会与主列视觉重叠 */
.detail-main { overflow: hidden; }
.detail-main .panel { overflow-wrap: break-word; word-break: break-word; }
.side-panel { padding: 16px; }
.side-panel .panel-head { margin-bottom: 12px; }
.side-panel .panel-title { font-size: 15px; }

/* 右侧热门资讯 */
.side-news-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px dashed var(--border);
}
.side-news-list li:last-child { border-bottom: none; }
.side-news-rank {
  width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: #f3f4f6; color: var(--muted);
}
.side-news-rank.hot { background: var(--theme); color: #fff; }
.side-news-list li a {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; color: var(--text);
}
.side-news-list li a:hover { color: var(--theme); }

/* 右侧热门站点 */
.side-site-list li { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.side-site-list li:last-child { border-bottom: none; }
.side-site-list a { display: flex; align-items: center; gap: 10px; }
.side-site-list .fav { width: 32px; height: 32px; border-radius: 8px; font-size: 14px; flex-shrink: 0; }
.side-site-info { flex: 1; min-width: 0; }
.side-site-name { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-site-desc { display: block; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }

/* SEO 工具快捷入口 */
/* v1.8.4（需求6）：原为固定 grid-template-columns:1fr 1fr，
   在侧栏较窄时每格只有 ~100px，工具名（如「站长之家 SEO」）放不下被压成两行，
   用户反馈「有一行」的观感就来自这里。改为按可用宽度自适应：
   侧栏够宽时排 2 列，变窄自动降到 1 列，并给按钮设最小高度保证对齐。 */
.seo-tool-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.seo-tool-btn {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  text-align: center; padding: 8px 6px; min-height: 36px;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 8px;
  font-size: 12px; color: var(--text); transition: .15s;
  white-space: nowrap;
}
.seo-tool-btn:hover { background: var(--theme); color: #fff; border-color: var(--theme); }
/* 极窄屏（侧栏被折叠成单列）时允许两列并排，避免变成一长条 */
@media (max-width: 420px) {
  .seo-tool-links { grid-template-columns: repeat(2, 1fr); }
  .seo-tool-btn { font-size: 11.5px; padding: 7px 4px; }
}

.site-hero { padding: 20px; }
.site-hero-top { display: flex; gap: 16px; align-items: flex-start; }
.site-hero-info { flex: 1; min-width: 0; }
.site-hero-name { font-size: 22px; font-weight: 700; }
.site-hero-url { color: var(--muted); font-size: 13px; margin: 2px 0 8px; word-break: break-all; }
.site-hero-desc { color: var(--text); font-size: 14px; }
.site-hero-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; flex-shrink: 0; }
.site-stats { display: flex; gap: 16px; }
.stat { text-align: center; }
.stat b { display: block; font-size: 18px; color: var(--theme); }
.stat span { font-size: 12px; color: var(--muted); }
.site-hero-meta { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; }
.badge-ok { color: #047857; }
.badge-warn { color: #b45309; }
.badge-info { color: #2563eb; }
.site-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  display: inline-block; padding: 2px 10px; background: #eef2ff; color: var(--theme);
  border-radius: 999px; font-size: 12px;
}
.tag.danger { background: #fef2f2; color: #b91c1c; }
.tag.ok { background: #ecfdf5; color: #047857; }
.tag.ai { background: #fdf4ff; color: #a21caf; }
.score-high { color: #16a34a; } .score-mid { color: var(--gold); } .score-low { color: #dc2626; }

/* 详情 tab */
.detail-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tab-btn {
  padding: 9px 16px; border: none; background: none; cursor: pointer;
  font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent;
  white-space: nowrap; flex-shrink: 0;
}
.tab-btn.active { color: var(--theme); border-bottom-color: var(--theme); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.info-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.info-table th, .info-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.info-table th { width: 110px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.info-table td { overflow-wrap: anywhere; word-break: break-word; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }

.code-box {
  width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #f9fafb; font-family: Consolas, monospace; font-size: 13px; resize: vertical; min-height: 70px;
}

/* SEO 查询结果展示 */
.index-result { padding: 8px 0; }
.index-engine { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.seo-section { margin-bottom: 18px; }
.seo-section:last-child { margin-bottom: 0; }
.seo-section-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid var(--theme); display: inline-block; }
.seo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.seo-item { display: flex; padding: 8px 0; border-bottom: 1px dashed var(--border); min-height: 32px; align-items: center; }
.seo-item-full { grid-column: 1 / -1; }
.seo-label { width: 90px; flex-shrink: 0; color: var(--muted); font-size: 13px; }
.seo-value { flex: 1; font-size: 13px; color: var(--text); word-break: break-all; }
.seo-value.seo-title { font-weight: 600; color: var(--theme); }

/* 对联广告 */
.couplet { position: fixed; top: 120px; width: 120px; z-index: 40; }
.couplet-left { left: 6px; }
.couplet-right { right: 6px; }
/* v2.2：对联广告关闭按钮 */
.couplet-close { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; background: #333; color: #fff; border: none; font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: .7; transition: opacity .15s; z-index: 41; }
.couplet-close:hover { opacity: 1; }

/* v2.2：站内随机推荐兜底卡片 */
/* v3.0.1 B4：栅格轨道用 minmax(0,1fr) 而非 1fr——1fr 等价 minmax(auto,1fr)，
   卡片最小内容（图标+文字）会撑爆轨道，390 宽下整页横向溢出。minmax(0,1fr) 允许轨道收缩，
   配合 .site-rec-info 的 min-width:0 + 省略号，卡片在窄屏不再顶宽。 */
.site-rec-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 8px 0; }
.site-rec-card { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 10px; text-decoration: none; transition: border-color .15s; min-width: 0; }
.site-rec-card:hover { border-color: #2563eb; }
.site-rec-logo { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.site-rec-favicon-default { width: 28px; height: 28px; border-radius: 6px; background: #2563eb; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.site-rec-info { display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.site-rec-name { font-size: 13px; font-weight: 600; color: var(--text, #1f2937); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-rec-desc { font-size: 11px; color: var(--muted, #6b7280); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-style: normal; }
.article-rec-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.article-rec-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; text-decoration: none; border-radius: 6px; transition: background .15s; }
.article-rec-item:hover { background: var(--bg, #f8fafc); }
.article-rec-cover { width: 40px; height: 30px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.article-rec-title { font-size: 13px; color: var(--text, #1f2937); }
@media (max-width: 768px) {
  .site-rec-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============ 申请页 ============ */
.apply-hero { text-align: center; padding: 28px 0 18px; }
.apply-hero h1 { font-size: 26px; font-weight: 800; }
.apply-hero p { color: var(--muted); margin-top: 8px; max-width: 680px; margin-left: auto; margin-right: auto; }
.apply-cols { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.apply-form .form-row { margin-bottom: 14px; }
.apply-form label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 13px; }
.apply-form label em { color: #dc2626; font-style: normal; }
.apply-form input, .apply-form select, .apply-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; outline: none; font-family: inherit;
}
.apply-form input:focus, .apply-form select:focus, .apply-form textarea:focus { border-color: var(--theme); }
.form-note { color: var(--muted); font-size: 12px; margin-top: 10px; text-align: center; }
.rule-list li { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.rule-list li:last-child { border-bottom: none; }

/* ============ 会员中心 ============ */
.member-page { max-width: 980px; margin: 0 auto; }
.member-hero { text-align: center; padding: 28px 16px 18px; }
.member-hero h1 { font-size: 26px; margin-bottom: 8px; color: var(--theme); }
.member-hero p { color: var(--muted); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.plan-card { background: #fff; border: 2px solid var(--border); border-radius: var(--radius); padding: 22px 18px; text-align: center; transition: all .2s; }
.plan-card:hover { border-color: var(--theme); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,99,235,.1); }
.plan-card.plan-pro { border-color: #fbbf24; background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%); }
.plan-card.plan-ent { border-color: #a78bfa; background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%); }
.plan-name { font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.plan-price { font-size: 28px; font-weight: 800; color: var(--theme); margin-bottom: 10px; }
.plan-card.plan-pro .plan-price { color: #f59e0b; }
.plan-card.plan-ent .plan-price { color: #7c3aed; }
.plan-desc { color: var(--muted); font-size: 13px; min-height: 36px; margin-bottom: 12px; }
.plan-order input { width: 100%; padding: 8px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.plan-order .pay-method-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 8px; font-size: 12px; }
.plan-order .pay-method-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; background: #f9fafb; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; }
.plan-order .pay-method-chip input { width: 13px; height: 13px; margin: 0; }
.plan-order .pay-method-chip:has(input:checked) { background: #eff6ff; border-color: var(--theme); color: var(--theme); font-weight: 600; }
.member-lookup-form { display: flex; gap: 8px; margin-top: 12px; }
.member-lookup-form input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; }

/* 支付页 */
.pay-wrap { max-width: 720px; margin: 28px auto; padding: 20px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); }
.pay-wrap h2 { text-align: center; margin-bottom: 16px; color: var(--theme); }
.pay-summary { border: 1px dashed var(--border); border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; }
.pay-summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.pay-summary-row span { color: var(--muted); }
.pay-amount { color: #f59e0b; font-size: 20px; font-weight: 800; }
.pay-qr { text-align: center; padding: 20px; }
.pay-qr img { width: 200px; height: 200px; border: 1px solid var(--border); border-radius: 8px; }

/* 结果页 */
.result-card { max-width: 760px; margin: 20px auto; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.result-status { text-align: center; padding: 28px 20px; }
.result-status.approved { background: #ecfdf5; }
.result-status.rejected { background: #fef2f2; }
.result-status.manual, .result-status.pending { background: #fffbeb; }
.result-status.result-pending { background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%); }
.result-icon { font-size: 42px; }
.result-status h1 { font-size: 22px; margin: 6px 0; }
.result-score b { font-size: 20px; color: var(--theme); }
.result-reason { color: var(--muted); margin-top: 4px; }
.result-steps, .result-code { padding: 18px 22px; border-top: 1px solid var(--border); }
.result-steps h3, .result-code h3 { margin-bottom: 12px; }
.step-item { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.step-item:last-child { border-bottom: none; }
.step-head { display: flex; justify-content: space-between; align-items: center; }
.step-name { font-weight: 600; }
.step-score { color: var(--theme); font-weight: 700; }
.step-flag { font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.step-flag.ok { background: #ecfdf5; color: #047857; }
.step-flag.bad { background: #fef2f2; color: #b91c1c; }
.step-notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.step-notes span { font-size: 12px; color: var(--muted); background: #f3f4f6; padding: 2px 8px; border-radius: 6px; }
.result-actions { display: flex; gap: 12px; padding: 18px 22px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* ============ 资讯 ============ */
.news-tabs { display: flex; gap: 4px; margin: 16px 0; flex-wrap: wrap; }
.news-tabs a { padding: 8px 18px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.news-tabs a.active { background: var(--theme); color: #fff; border-color: var(--theme); }
.article-list { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.article-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.article-item:last-child { border-bottom: none; }
.article-item:hover { background: #f9fafb; }
.article-item h3 { font-size: 15px; font-weight: 600; }
.article-source { font-size: 12px; color: var(--muted); }
.article-time { color: var(--muted); font-size: 12px; white-space: nowrap; }

.article-detail { display: grid; grid-template-columns: 1fr 300px; gap: 16px; margin-top: 14px; }
.article-main { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; min-width: 0; }
.article-title { font-size: 22px; font-weight: 700; line-height: 1.4; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 13px; margin: 10px 0; }
.article-content { margin-top: 16px; font-size: 15px; line-height: 1.8; }
.article-content p { margin-bottom: 14px; }
.article-content img { border-radius: 8px; }

/* ============ 搜索 ============ */
.search-title { font-size: 20px; margin: 18px 0 14px; }
.search-page mark, .search-page .hot-tag mark {
  background: #fef08a; color: #b91c1c; padding: 0 2px; border-radius: 2px;
}

/* 搜索结果卡片 */
.site-card-wrap { position: relative; min-width: 0; overflow: hidden; }
.site-card-wrap .site-card { padding-right: 56px; min-width: 0; }
.site-card-wrap .site-visit-inline {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  padding: 4px 9px; font-size: 12px; line-height: 1;
  background: var(--theme); color: #fff !important; border-radius: 999px;
  text-decoration: none !important; opacity: .85;
  transition: opacity .15s, transform .15s;
}
.site-card-wrap .site-visit-inline:hover { opacity: 1; transform: translateY(-50%) scale(1.04); box-shadow: 0 4px 10px rgba(37,99,235,.25); }

/* 热门关键词 + 分类胶囊 */
.hot-keywords { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-tag {
  display: inline-block; padding: 6px 14px; font-size: 13px;
  background: #f1f5f9; color: var(--text); border-radius: 999px;
  text-decoration: none; transition: .15s;
}
.hot-tag:hover { background: var(--theme); color: #fff; }
.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pill {
  display: inline-block; padding: 7px 14px; font-size: 13px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  text-decoration: none; color: var(--text); transition: .15s;
}
.cat-pill:hover { border-color: var(--theme); color: var(--theme); }

/* ============ 搜索建议（下拉联想） ============ */
.search-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15,23,42,.14);
  max-height: 420px; overflow-y: auto; z-index: 200;
  padding: 6px 0;
}
.search-suggest .suggest-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; color: var(--text); text-decoration: none;
  transition: background .12s;
}
.search-suggest .suggest-item:hover,
.search-suggest .suggest-item.active { background: #eff6ff; }
.search-suggest .suggest-letter {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--theme); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.search-suggest .suggest-name { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggest .suggest-name mark { background: #fef08a; color: #b91c1c; padding: 0 1px; }
.search-suggest .suggest-domain { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.search-suggest .suggest-foot {
  display: block; padding: 10px 14px; font-size: 13px; color: var(--theme);
  border-top: 1px solid var(--border); margin-top: 4px; text-align: center;
}

/* ============ 分页 ============ */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 18px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 13px;
}
.pagination a:hover { border-color: var(--theme); color: var(--theme); }
.pagination .cur { background: var(--theme); border-color: var(--theme); color: #fff; }

/* ============ 广告 ============ */
.ad-item { margin: 14px 0; text-align: center; overflow: hidden; border-radius: 8px; }
.ad-item img { max-width: 100%; }

/* ============ 页脚 ============ */
.site-footer { background: #fff; border-top: 1px solid var(--border); margin-top: 30px; padding: 24px 0; }
.footer-inner { text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 10px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 13px; }
.footer-links a:hover { color: var(--theme); }
.footer-copy { color: var(--muted); font-size: 12px; }
.footer-copy a { color: var(--muted); }

/* 404 */
.error-page { text-align: center; padding: 60px 20px; }
.error-page h1 { font-size: 64px; color: var(--theme); font-weight: 800; }
.error-page p { color: var(--muted); margin: 10px 0 20px; }

/* 站点状态标签 */
.status-approved { background: #ecfdf5; color: #047857; }
.status-pending { background: #fffbeb; color: #b45309; }
.status-rejected { background: #fef2f2; color: #b91c1c; }
.status-manual { background: #eef2ff; color: #4f46e5; }

/* =============================================================
   响应式断点
   ============================================================= */

/* 中屏（1024px - 1200px）：顶部栏元素较多，逐步收起次要元素避免换行错位 */
@media (max-width: 1200px) {
  .topbar-inner { gap: 12px; padding: 16px 24px; }
  .search-wrap { max-width: 420px; }
  .logo-text { font-size: 20px; }
  .logo { font-size: 20px; }
  .logo-mark { width: 38px; height: 38px; font-size: 20px; }
  .btn-apply { padding: 9px 14px; font-size: 13px; }
  .btn-login, .btn-register { padding: 7px 14px; font-size: 13px; }
  .theme-toggle { width: 32px; height: 32px; font-size: 15px; }
}

/* 平板（768px - 1024px） */
@media (max-width: 1024px) {
  .container { padding: 0 18px; }
  .catnav-inner { padding: 0 18px; justify-content: flex-start; }
  .topbar-inner { padding: 14px 18px; gap: 10px; }
  /* 平板宽度下"提交网址"文字收起，仅留加号，避免顶部栏挤压换行 */
  .btn-apply { padding: 9px 12px; }
  .btn-apply-label { display: none; }
  .home-layout { grid-template-columns: 1fr 260px; gap: 14px; }
  .detail-cols { grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; }
  .article-detail { grid-template-columns: 1fr 260px; gap: 14px; }
  .apply-cols { grid-template-columns: 1fr 280px; gap: 14px; }
  /* v1.7.9：网格列数的响应式规则统一收敛到文件末尾「响应式降列」区块，
     此处不再重复定义（原先两处都写了 ≤1024px 的降列，属重复代码）。 */
  .couplet { display: none; }
  .logo { font-size: 20px; }
  .logo-mark { width: 36px; height: 36px; font-size: 20px; }
  .logo img { height: 32px; }
  .search-wrap { max-width: 480px; }
}

/* 手机（<768px） */
@media (max-width: 768px) {
  body { font-size: 13px; }
  .container { padding: 0 10px; }

  /* 顶部栏：手机端改为紧凑三行网格 */
  .topbar-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo user"
      "search search"
      "apply  apply";
    gap: 10px 12px;
    padding: 12px;
    align-items: center;
  }
  .topbar-inner > .logo { grid-area: logo; justify-content: flex-start; }
  .topbar-inner > .user-nav { grid-area: user; justify-self: end; }
  .topbar-inner > .search-wrap { grid-area: search; max-width: 100%; width: 100%; margin: 0; }
  .topbar-inner > .btn-apply { grid-area: apply; width: 100%; text-align: center; padding: 10px; }
  .logo { font-size: 18px; }
  .logo-mark { width: 32px; height: 32px; font-size: 18px; }
  .logo img { height: 28px; }
  .btn-login, .btn-register { padding: 7px 12px; font-size: 13px; }
  .search input { padding: 10px 14px; font-size: 13px; }
  .search button { padding: 10px 16px; font-size: 13px; }

  /* 分类导航 */
  .catnav a { padding: 11px 12px; font-size: 13px; }

  /* 快讯 */
  .flash60 { margin: 10px 0; }
  .flash-label { padding: 6px 10px; font-size: 12px; }
  .flash-roll li { padding: 0 10px; font-size: 13px; }

  /* 面板 */
  .panel { padding: 14px; margin-bottom: 12px; border-radius: 10px; }
  .panel-head { margin-bottom: 12px; }
  .panel-title { font-size: 15px; }

  /* 首页布局：单列 */
  .home-layout { grid-template-columns: 1fr; gap: 12px; }
  .home-side { order: 2; }

  /* 详情页布局：单列 */
  .detail-cols { grid-template-columns: 1fr; gap: 12px; }
  .detail-side { position: static; order: 2; }
  .article-detail { grid-template-columns: 1fr; gap: 12px; }
  .apply-cols { grid-template-columns: 1fr; gap: 12px; }

  /* 网格：单列（.site-grid/.hot-grid/.promote-grid 的降列统一见文件末尾区块） */
  .seo-grid { grid-template-columns: 1fr; }
  .seo-item-full { grid-column: auto; }

  /* 站点卡片 */
  .site-card { padding: 10px; gap: 8px; }
  .fav { width: 36px; height: 36px; font-size: 14px; }
  .fav-lg { width: 52px; height: 52px; font-size: 22px; }
  .site-name { font-size: 13px; }
  .site-desc { font-size: 11px; }
  .site-click { font-size: 12px; }

  /* 触屏设备无法 hover，默认显示访问按钮 */
  .site-visit {
    opacity: 1;
    position: static;
    transform: none;
    margin-left: auto;
    align-self: center;
    padding: 5px 10px;
  }

  /* 详情页 hero */
  .site-hero { padding: 16px; }
  .site-hero-top { flex-direction: column; gap: 12px; }
  .site-hero-actions { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .site-hero-name { font-size: 19px; }
  .site-stats { gap: 12px; }
  .stat b { font-size: 16px; }
  .site-hero-meta { gap: 8px; font-size: 12px; }

  /* 详情 tab */
  .tab-btn { padding: 8px 12px; font-size: 13px; }

  /* 信息表格 */
  .info-table th { width: 80px; font-size: 12px; }
  .info-table td { font-size: 13px; }
  .info-table th, .info-table td { padding: 8px 10px; }

  /* SEO 标签 */
  .seo-label { width: 75px; font-size: 12px; }
  .seo-value { font-size: 12px; }

  /* 右侧栏 */
  .side-panel { padding: 14px; }
  .side-news-list li a { font-size: 12px; }
  .side-site-name { font-size: 12px; }
  .side-site-desc { font-size: 11px; }
  .seo-tool-links { grid-template-columns: 1fr 1fr; }
  .seo-tool-btn { font-size: 11px; padding: 7px 4px; }

  /* 申请页 */
  .apply-hero { padding: 20px 0 14px; }
  .apply-hero h1 { font-size: 22px; }
  .apply-hero p { font-size: 13px; }

  /* 会员中心 */
  .member-hero { padding: 20px 12px 14px; }
  .member-hero h1 { font-size: 22px; }
  .plan-grid { grid-template-columns: 1fr; gap: 12px; }
  .member-lookup-form { flex-direction: column; }
  .member-lookup-form .btn { width: 100%; }

  /* 支付页 */
  .pay-wrap { margin: 16px auto; padding: 16px; }
  .pay-qr img { width: 180px; height: 180px; }

  /* 结果页 */
  .result-card { margin: 14px auto; }
  .result-status { padding: 24px 16px; }
  .result-status h1 { font-size: 20px; }
  .result-icon { font-size: 36px; }
  .result-steps, .result-code { padding: 14px 16px; }
  .result-actions { flex-direction: column; padding: 14px 16px; }
  .result-actions .btn { width: 100%; }

  /* 资讯 */
  .article-item { padding: 12px 14px; }
  .article-item h3 { font-size: 14px; }
  .article-main { padding: 18px; }
  .article-title { font-size: 19px; }
  .article-content { font-size: 14px; }

  /* 搜索 */
  .search-title { font-size: 17px; margin: 14px 0 10px; }
  .hot-tag { padding: 5px 12px; font-size: 12px; }
  .cat-pill { padding: 6px 12px; font-size: 12px; }

  /* 分页 */
  .pagination { padding: 14px 0; }
  .pagination a, .pagination span { min-width: 32px; height: 32px; font-size: 12px; }

  /* 搜索筛选器 */
  .filter-pill { padding: 6px 12px; font-size: 12px; }

  /* 页脚 */
  .site-footer { padding: 20px 0; margin-top: 20px; }
  .footer-links { gap: 14px; }
  .footer-links a { font-size: 12px; }

  /* 404 */
  .error-page { padding: 40px 16px; }
  .error-page h1 { font-size: 48px; }

  /* 按钮 */
  .btn-lg { padding: 11px 24px; font-size: 15px; }
  .btn { padding: 8px 14px; font-size: 13px; }
}

/* 小屏手机（<480px） */
@media (max-width: 480px) {
  .logo { font-size: 18px; }
  .logo-mark { width: 32px; height: 32px; font-size: 18px; }
  .search input { padding: 9px 12px; font-size: 12px; }
  .search button { padding: 9px 14px; font-size: 12px; }
  .site-hero-actions { flex-direction: column; align-items: stretch; }
  .site-hero-actions .btn { width: 100%; }
  .seo-tool-links { grid-template-columns: 1fr; }
  .pay-qr img { width: 160px; height: 160px; }
}

/* 超小屏手机（<360px） */
@media (max-width: 360px) {
  .container { padding: 0 8px; }
  .topbar-inner { padding: 10px 8px; gap: 8px 10px; }
  .btn-login, .btn-register { padding: 6px 10px; font-size: 12px; }
  .site-card { padding: 8px; gap: 6px; }
  .fav { width: 32px; height: 32px; font-size: 12px; }
  /* FAB 收紧，避免在 320px 宽屏上压住站点卡片右侧的「访问」按钮 */
  .fab-apply { right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding: 10px 14px; font-size: 13px; }
  .fab-apply.fab-compact { padding: 10px; }
  .filter-pill { padding: 6px 12px; font-size: 12px; }
}

/* =============================================================
   搜索筛选器 / 搜索空状态（P1）
   ============================================================= */
.search-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 14px;
}
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff;
  color: var(--text); font-size: 13px; line-height: 1;
  transition: .15s;
}
.filter-pill em {
  font-style: normal; font-size: 11px; font-weight: 600;
  background: #f1f5f9; color: var(--muted);
  border-radius: 999px; padding: 2px 7px;
}
.filter-pill:hover { border-color: var(--theme); color: var(--theme); }
.filter-pill.active {
  background: var(--theme); border-color: var(--theme); color: #fff;
}
.filter-pill.active em { background: rgba(255,255,255,.24); color: #fff; }

.search-empty-cta {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px;
}

/* =============================================================
   搜索下拉：最近搜索 / 热门搜索（P1）
   ============================================================= */
.search-suggest .suggest-group { padding: 4px 0 2px; }
.search-suggest .suggest-group + .suggest-group {
  border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px;
}
.search-suggest .suggest-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 14px 6px; font-size: 12px; color: var(--muted);
}
.search-suggest .suggest-clear {
  border: 0; background: none; color: var(--muted);
  font-size: 12px; cursor: pointer; padding: 2px 4px;
}
.search-suggest .suggest-clear:hover { color: var(--theme); }
.search-suggest .suggest-tags {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px;
}
.search-suggest .suggest-tag {
  display: inline-block; padding: 4px 10px;
  border-radius: 999px; background: #f1f5f9;
  color: var(--text); font-size: 12px; text-decoration: none;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: .12s;
}
.search-suggest .suggest-tag:hover { background: var(--theme); color: #fff; }

/* =============================================================
   移动端悬浮「提交网址」FAB（P1）
   默认只在小屏出现，桌面端隐藏
   ============================================================= */
.fab-apply {
  display: none;
  position: fixed; right: 16px; z-index: 300;
  align-items: center; gap: 6px;
  padding: 12px 18px; border-radius: 999px;
  background: var(--theme); color: #fff;
  font-size: 14px; font-weight: 600; text-decoration: none;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .38);
  transition: transform .18s, padding .18s, box-shadow .18s;
  /* 避开 iPhone 底部安全区 */
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.fab-apply:hover { color: #fff; transform: translateY(-2px); }
.fab-apply .fab-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255, 255, 255, .22); font-size: 15px; line-height: 1;
}
/* 向下滚动时收起文字，减少遮挡 */
.fab-apply.fab-compact { padding: 12px; }
.fab-apply.fab-compact .fab-text { display: none; }

@media (max-width: 768px) {
  .fab-apply { display: inline-flex; }

  /* 给页面底部预留 FAB 的空间，避免悬浮按钮压住最后一张站点卡片的
     「访问」按钮（实测 320px 下会重叠 2 个元素） */
  .site-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 360px) {
  .site-footer { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}

/* =============================================================
   v1.7.10 「一键到顶」火箭按钮
   右下角悬浮，滚动 >300px 才出现；外圈是滚动进度环（SVG 描边）
   ============================================================= */
.back-to-top {
  position: fixed; right: 24px; z-index: 320;
  width: 48px; height: 48px; padding: 0; border: 0;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, .38);
  /* 默认隐藏：visibility 一起过渡，避免隐藏时仍可点/被读屏读到 */
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.88);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, box-shadow .2s;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.back-to-top.is-show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { box-shadow: 0 14px 32px rgba(37, 99, 235, .5); }
.back-to-top:hover .btt-icon { transform: translateY(-2px); }
.back-to-top:active { transform: scale(.92); }
.back-to-top:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 3px; }

/* 进度环：rotate(-90deg) 让起点落在 12 点方向 */
.btt-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.btt-track { fill: none; stroke: rgba(255, 255, 255, .26); stroke-width: 3; }
.btt-bar {
  fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round;
  /* r=20 → 周长 125.66；JS 只改 stroke-dashoffset，不改 dasharray */
  stroke-dasharray: 125.66; stroke-dashoffset: 125.66;
  transition: stroke-dashoffset .12s linear;
}
.btt-icon {
  position: relative; z-index: 1;
  width: 20px; height: 20px;
  stroke: #fff;               /* 描边风格图标，跟随背景渐变变白 */
  transition: transform .2s ease;
}

@media (max-width: 768px) {
  /* 小屏右下角被「提交网址」FAB 占了，火箭上移一层，避免两个悬浮按钮叠在一起 */
  .back-to-top { right: 14px; width: 44px; height: 44px; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .back-to-top .btt-icon { width: 18px; height: 18px; }
  /* apply 页没有 FAB，可以回到正常位置 */
  .back-to-top.btt-no-fab { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
/* 尊重「减少动态效果」系统偏好 */
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity .2s linear, visibility .2s; }
  .back-to-top.is-show { transform: none; }
}

/* =============================================================
   用户登录注册
   ============================================================= */

/* 顶部用户导航 */
.user-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* -------------------------------------------------------------
   v1.8.4 消息通知铃铛
   顶栏红点是成本最低的「回访触发器」，样式上要够醒但目前不喧宾夺主。
   ------------------------------------------------------------- */
.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,.12);
  transition: .15s;
  flex-shrink: 0;
}
.notif-bell:hover {
  background: rgba(255,255,255,.24);
  color: #fff;
}
.notif-bell-icon { font-size: 17px; line-height: 1; }
/* 有未读时轻微摇晃，在满屏内容里能抓住视线 */
.notif-bell.has-unread .notif-bell-icon {
  animation: notif-ring 2.4s ease-in-out infinite;
  transform-origin: 50% 2px;
}
@keyframes notif-ring {
  0%, 88%, 100% { transform: rotate(0); }
  90%           { transform: rotate(11deg); }
  93%           { transform: rotate(-9deg); }
  96%           { transform: rotate(6deg); }
}
.notif-badge-count {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(37,99,235,.85);
  pointer-events: none;
}
/* 下拉菜单里的未读数字 */
.notif-menu-badge {
  display: inline-block;
  margin-left: 6px;
  min-width: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}
/* 暗色模式下顶栏底色变化，铃铛底色跟着调整 */
[data-theme="dark"] .notif-bell { background: rgba(255,255,255,.08); }
[data-theme="dark"] .notif-bell:hover { background: rgba(255,255,255,.16); }

.btn-login {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  transition: .15s;
}
.btn-login:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
  color: #fff;
}
.btn-register {
  background: #fff;
  color: var(--theme);
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: .15s;
}
.btn-register:hover {
  background: rgba(255,255,255,.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* 用户下拉菜单 */
.user-dropdown {
  position: relative;
}
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: .15s;
}
.user-menu-trigger:hover {
  background: rgba(255,255,255,.25);
}
.user-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}
.user-avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-name {
  font-size: 14px;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-arrow {
  font-size: 10px;
  opacity: .8;
}
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  padding: 6px;
  z-index: 100;
}
.user-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: .1s;
}
.user-dropdown-menu a:hover {
  background: #f3f4f6;
  color: var(--theme);
}
.user-dropdown-menu .logout-link {
  color: #dc2626;
}
.user-dropdown-menu .logout-link:hover {
  background: #fef2f2;
  color: #dc2626;
}
.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* 用户中心 */
.user-center {
  max-width: 800px;
  margin: 0 auto;
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
}
.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--theme), var(--theme-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-letter {
  color: #fff;
}
.user-info h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.user-info p {
  font-size: 13px;
  margin: 2px 0;
}
.user-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.user-actions .btn {
  flex: 1;
  min-width: 120px;
}

/* 响应式：登录注册 */
@media (max-width: 768px) {
  .auth-card {
    padding: 28px 20px;
  }
  .auth-header h2 {
    font-size: 20px;
  }
  /* v1.8.1 修复：这里原为 `order:2; width:100%; justify-content:center`，
     但同一断点（≤768px）的 .topbar-inner 已改为 grid 三行布局，
     .user-nav 通过 grid-area:user 定位在右上角。再给 width:100%
     会让它撑满整行、把「登录/注册」按钮挤到错误位置，
     表现为顶部错位变形。现直接移除冲突声明，交还 grid 布局管理。 */
  .user-nav {
    min-width: 0;
  }
  .btn-login, .btn-register {
    padding: 8px 16px;
    font-size: 13px;
  }
  .user-name {
    max-width: 80px;
  }
  .user-profile {
    flex-direction: column;
    text-align: center;
  }
  .user-actions {
    flex-direction: column;
  }
  .user-actions .btn {
    width: 100%;
  }
}

/* =============================================================
   广告位购买与网站置顶
   ============================================================= */

/* 首页顶部广告 */
.home-top-ad {
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
}
.home-top-ad img { max-width: 100%; display: block; }

/* 置顶面板 */
.promote-panel { border: 2px solid #fbbf24; background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%); }
.promote-panel .panel-title { color: #b45309; }
/* v3.0.1：付费置顶位提前到首屏后，再叠一层强调（投影 + 顶部金色光带），
   与今日发现/精选好券等免费位拉开视觉层级。只做强调，不改卡片内容与投放逻辑。 */
.promote-featured {
  position: relative;
  box-shadow: 0 8px 22px rgba(245,158,11,.20);
}
.promote-featured::before {
  content: "";
  position: absolute;
  top: -2px; left: -2px; right: -2px;
  height: 4px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, #f59e0b, #fcd34d, #f59e0b);
  pointer-events: none;
}
/* 置顶推荐栅格列数统一定义在文件下方「首页布局优化」区块，勿在此再写 */
/* v1.7.2：左侧留出角标宽度（角标在 6px 处、宽约 34px），
   否则角标会压住网站图标；右侧留出「访问」按钮宽度。
   注意：此处必须在 .promote-card 的其它 padding 规则之后生效，故一并写全四个方向。 */
.promote-card {
  position: relative;
  padding: 12px 56px 12px 46px;
}
.promote-badge {
  position: absolute;
  top: -8px;
  left: -8px;
  z-index: 2;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(245,158,11,.3);
}
.promote-current-list { display: flex; flex-direction: column; gap: 8px; }
.promote-current-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}
.promote-current-item .promote-badge {
  position: static;
  box-shadow: none;
}
.promote-site-name {
  flex: 1;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.promote-site-name:hover { color: var(--theme); }

/* 广告位购买页 */
.adspot-page { max-width: 1200px; margin: 0 auto; }
.adspot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.adspot-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.adspot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: linear-gradient(135deg, var(--theme), var(--theme-dark));
  color: #fff;
}
.adspot-header h3 { font-size: 16px; font-weight: 700; }
.adspot-price { font-size: 18px; font-weight: 800; }
.adspot-info {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.adspot-info p { font-size: 13px; margin: 4px 0; color: var(--muted); }
.adspot-info strong { color: var(--text); }
.adspot-preview {
  padding: 14px 16px;
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
  /* v1.7.1：原先写死 max-height:150px + overflow:hidden，
     会把 300px 高的对联广告、以及带边距的通栏广告裁掉半截（用户反馈「预览显示不完整」）。
     改为高度自适应 + 超宽时横向滚动，保证效果完整可见。 */
  overflow-x: auto;
}
.adspot-preview img { max-width: 100%; height: auto; }
.adspot-preview-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.adspot-form {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.adspot-form .form-group { margin-bottom: 12px; }
.adspot-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}
.adspot-form input, .adspot-form select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}
.adspot-form input:focus, .adspot-form select:focus {
  border-color: var(--theme);
}
.adspot-amount {
  padding: 12px;
  background: #eff6ff;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 12px;
  font-size: 14px;
}
.adspot-amount .amount { font-size: 20px; font-weight: 800; color: var(--theme); }

/* 支付页 */
.pay-method-info {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
}
.pay-method-info h3 { font-size: 15px; margin-bottom: 8px; color: #92400e; }
.pay-method-info p { font-size: 13px; margin: 6px 0; color: #78350f; }
.pay-tips {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 14px;
  margin: 16px 0;
}
.pay-tips p { font-size: 13px; margin: 6px 0; color: #1e40af; }
.pay-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

/* 表格 */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th, .table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table th {
  background: #f9fafb;
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
}
.table tr:hover { background: #f9fafb; }

/* 响应式 */
@media (max-width: 768px) {
  /* .promote-grid 的降列见文件末尾统一区块，此处不重复 */
  .adspot-grid { grid-template-columns: 1fr; }
  .pay-actions { flex-direction: column; }
  .pay-actions .btn { width: 100%; }
  .table { font-size: 12px; }
  .table th, .table td { padding: 8px 6px; }
}

/* 用户中心整合样式 */
.user-profile {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.user-member-info {
  margin-left: auto;
  flex-shrink: 0;
}
.member-card {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  min-width: 180px;
}
.member-card.member-active {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #f59e0b;
}
.member-card-title {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}
.member-card-tier {
  font-size: 20px;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 4px;
}
.member-active .member-card-tier {
  color: #b45309;
}
.member-card-expire {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}
.member-card-quota {
  font-size: 12px;
  color: #374151;
  background: rgba(255,255,255,.6);
  padding: 4px 8px;
  border-radius: 6px;
}
.vip-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 8px;
  vertical-align: middle;
}
.vip-pro {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
}
.vip-ent {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  color: #fff;
}
.member-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.benefit-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: #f9fafb;
  border-radius: 10px;
}
.benefit-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.benefit-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}
.benefit-item p {
  font-size: 12px;
  margin: 0;
}

@media (max-width: 768px) {
  .user-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .user-member-info {
    margin-left: 0;
    width: 100%;
  }
  .member-card {
    width: 100%;
  }
  .member-benefits {
    grid-template-columns: 1fr;
  }
}

/* =============================================================
   暗色模式（Dark Mode）
   通过 html[data-theme="dark"] 激活，支持系统偏好自动检测
   ============================================================= */
html[data-theme="dark"] {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: #334155;
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .site-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .member-card {
  background: var(--card);
  border-color: var(--border);
}

/* 通用按钮：原为白底 + 深色字，暗色下必须翻转，否则整个按钮是一块白板 */
html[data-theme="dark"] .btn {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}
html[data-theme="dark"] .btn:hover {
  border-color: var(--theme);
  color: var(--text);
}
html[data-theme="dark"] .btn-primary { background: var(--theme); border-color: var(--theme); color: #fff; }
html[data-theme="dark"] .btn-primary:hover { background: var(--theme-dark); border-color: var(--theme-dark); color: #fff; }
html[data-theme="dark"] .btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
html[data-theme="dark"] .btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }

html[data-theme="dark"] .search input {
  background: #0f172a;
  color: var(--text);
}
/* 搜索框外壳：暗色下仍为 #fff，会在深色输入框外面留一圈白边 */
html[data-theme="dark"] .search {
  background: var(--bg);
}

html[data-theme="dark"] .catnav {
  background: var(--card);
  border-color: var(--border);
}

html[data-theme="dark"] .catnav a {
  color: var(--muted);
}

html[data-theme="dark"] .catnav a.active,
html[data-theme="dark"] .catnav a:hover {
  color: #fff;
}

html[data-theme="dark"] table th {
  background: #0f172a;
  border-color: var(--border);
}

html[data-theme="dark"] table td {
  border-color: var(--border);
}

html[data-theme="dark"] .flash60 {
  background: var(--card);
  border-color: var(--border);
}

html[data-theme="dark"] .search-suggest {
  background: var(--card);
  border-color: var(--border);
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
}

html[data-theme="dark"] .suggest-item:hover,
html[data-theme="dark"] .suggest-item.active {
  background: #334155;
}

html[data-theme="dark"] .user-dropdown-menu {
  background: var(--card);
  border-color: var(--border);
}

html[data-theme="dark"] .user-dropdown-menu a {
  color: var(--text);
}

html[data-theme="dark"] .user-dropdown-menu a:hover {
  background: #334155;
}

html[data-theme="dark"] .dropdown-divider {
  border-color: var(--border);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0f172a;
  color: var(--text);
  border-color: var(--border);
}

html[data-theme="dark"] .btn-apply,
html[data-theme="dark"] .btn-login,
html[data-theme="dark"] .btn-register {
  color: #fff;
}
/* 修复：这三个按钮原本都是 #fff 背景，而上面又把文字强制成 #fff，
   暗色模式下就变成「白底白字」——注册、提交网址完全看不见。 */
html[data-theme="dark"] .btn-apply {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
}
html[data-theme="dark"] .btn-apply:hover {
  background: rgba(255, 255, 255, .24);
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
}
html[data-theme="dark"] .btn-register {
  background: var(--theme);
  border: 1px solid var(--theme);
  color: #fff;
}
html[data-theme="dark"] .btn-register:hover {
  background: var(--theme-dark);
  border-color: var(--theme-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}

html[data-theme="dark"] .site-meta .m-badge {
  background: #334155;
  color: var(--muted);
}

html[data-theme="dark"] .tag {
  background: #334155;
  color: var(--muted);
}

html[data-theme="dark"] .tag.ok { background: rgba(34,197,94,.15); color: #4ade80; }
html[data-theme="dark"] .tag.warn { background: rgba(245,158,11,.15); color: #fbbf24; }
html[data-theme="dark"] .tag.danger { background: rgba(239,68,68,.15); color: #f87171; }

/* 暗色模式切换按钮 */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  transition: background .2s, transform .2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: rgba(255,255,255,.25);
  transform: rotate(15deg);
}

/* 图片懒加载占位 */
img.lazy {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 减少动画偏好（无障碍） */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   v1.4.0 新增样式
   ============================================================ */

/* 底部热门资讯 */
.news-bottom-panel { margin-top: 24px; }

/* 首页热门资讯：列表行模式（替换原方块卡片） */
/* 热门资讯：两列列表（不是方块卡片），序号按行从左到右排列 1 2 / 3 4 … */
/* ============================================================
   v1.7.3 首页资讯区：左右分栏（左「最新资讯」10 条 / 右「热门事件」10 条）
   ============================================================ */
.news-duo-panel .news-duo-grid { display: grid; grid-template-columns: 1fr; row-gap: 8px; }
/* 有热门事件时：桌面端左右分栏，中缝画分隔虚线 */
.news-duo-panel.has-hot .news-duo-grid { grid-template-columns: 1fr 1fr; column-gap: 36px; }
.news-duo-panel.has-hot .news-col-hot { border-left: 1px dashed var(--border); padding-left: 36px; }
/* 单栏模式下资讯自身仍保持两列列表（下方 .news-row-list 的 grid 生效） */
.news-duo-panel .panel-head { margin-bottom: 6px; }

.news-row-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}
/* 分栏模式下：每栏 10 条 → 单列 10 行更易扫读（并排两列会把行高压得太挤） */
.news-duo-panel .news-row-list { grid-template-columns: 1fr; column-gap: 0; }
.news-row-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 2px;
  border-bottom: 1px dashed var(--border);
  min-width: 0;
}
/* 最后一行的两项不画收尾虚线（默认取 8 条，正好 4 行） */
.news-row-list li:nth-last-child(-n + 2) { border-bottom: none; }
/* 分栏单列模式：只有最后一条不画线 */
.news-duo-panel .news-row-list li:nth-last-child(-n + 2) { border-bottom: 1px dashed var(--border); }
.news-duo-panel .news-row-list li:last-child { border-bottom: none; }
.news-row-rank {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: #f3f4f6; color: var(--muted);
}
.news-row-rank.hot { background: var(--theme); color: #fff; }
/* 热门事件序号用暖色系，与左侧资讯区分 */
.news-row-rank.hot-ev { background: #fff7ed; color: #ea580c; }
.news-row-rank.hot-ev.top3 { background: linear-gradient(135deg, #f97316, #ef4444); color: #fff; }
html[data-theme="dark"] .news-row-rank { background: #334155; color: var(--muted); }
html[data-theme="dark"] .news-row-rank.hot-ev { background: rgba(249,115,22,.16); color: #fb923c; }

.news-row-title {
  flex: 1; min-width: 0;
  font-size: 14px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.news-row-title:hover { color: var(--theme); }
.news-row-meta { flex-shrink: 0; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* 移动端：分栏改上下堆叠，右栏分隔线改横线 */
@media (max-width: 900px) {
  .news-duo-panel.has-hot .news-duo-grid { grid-template-columns: 1fr; row-gap: 18px; }
  .news-duo-panel.has-hot .news-col-hot { border-left: none; padding-left: 0; border-top: 1px dashed var(--border); padding-top: 14px; }
  .news-duo-panel .news-row-list { grid-template-columns: 1fr; }
  .news-duo-panel .news-row-list li:nth-last-child(-n + 2) { border-bottom: 1px dashed var(--border); }
  .news-duo-panel .news-row-list li:last-child { border-bottom: none; }
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.news-card {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
}
.news-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}
.news-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* 网站快照 */
.snapshot-box { padding: 16px; }
.snapshot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.snapshot-url {
  font-size: 13px;
  color: var(--text-muted);
  font-family: monospace;
  word-break: break-all;
}
.snapshot-frame {
  width: 100%;
  min-height: 400px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.snapshot-frame img {
  width: 100%;
  height: auto;
  display: block;
}
.snapshot-tip {
  margin-top: 10px;
  font-size: 12px;
  text-align: center;
}

/* VIP徽章 */
.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  margin-left: 6px;
}
.vip-badge.enterprise {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.vip-badge.pro {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* 优先审核标记 */
.priority-audit-badge {
  display: inline-block;
  padding: 2px 6px;
  background: #fef3c7;
  color: #92400e;
  font-size: 11px;
  border-radius: 3px;
  margin-left: 6px;
}

/* 用户中心统一表单样式 */
.user-form-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 24px;
}
.user-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.user-form-card h2 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 22px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-row.form-inline {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.form-row.form-inline .form-group { flex: 1; }
.apply-form .form-row { display: block; }
.btn-verify {
  white-space: nowrap;
  padding: 10px 16px;
  font-size: 13px;
}
.btn-verify:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 60秒快讯 -> 综合新闻样式 */
.hot-news-ticker {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
}
.hot-news-ticker-title {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hot-news-ticker-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.hot-news-ticker-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.hot-news-ticker-list li:last-child { border-bottom: none; }
.hot-news-source {
  display: inline-block;
  padding: 1px 6px;
  background: var(--bg);
  border-radius: 3px;
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 8px;
}

/* 响应式 */
@media (max-width: 768px) {
  .news-grid { grid-template-columns: 1fr; }
  .user-form-card { padding: 20px; }
  .form-row { flex-direction: column; gap: 0; }
  .snapshot-frame { min-height: 250px; }
}

/* ============================================================
   v1.5.0 新增样式
   ============================================================ */

/* 分类横排切换标签 */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 16px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: sticky;
  top: 0;
  z-index: 10;
}
.cat-tab {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cat-tab:hover {
  border-color: var(--theme);
  color: var(--theme);
}
.cat-tab.active {
  background: var(--theme);
  border-color: var(--theme);
  color: #fff;
}

/* 分类内容区 */
.cat-pane { display: none; }
.cat-pane.active { display: block; }

/* 空占位样式 */
.empty-placeholder {
  padding: 40px 20px;
  text-align: center;
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.empty-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.empty-link {
  color: var(--theme);
  text-decoration: underline;
}

/* 优化网站卡片网格 - 电脑3列，平板3列，手机2列
   注意：列数必须与 .container 的 max-width 匹配，否则卡片会被挤出容器右侧被裁切 */
.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
/* v1.7.9：置顶推荐 / 热门排行固定 3 列。
   原先用 auto-fill minmax(280px,1fr)，列数随容器宽度浮动：
   1280px 屏出 3 列、>1400px 出 4 列、略窄又掉到 2 列，观感不稳定。
   改为显式列数，配合下方媒体查询逐级降为 2 列 / 1 列。
   v1.7.10：显式列数改由 CSS 变量驱动（--hot-cols / --promote-cols），
   值来自后台「系统设置 → 首页样式」，宽屏基准列数可设 2~6。
   窄屏自动降列见文件末尾「响应式降列」区块。 */
.hot-grid {
  display: grid;
  grid-template-columns: repeat(var(--hot-cols, 3), minmax(0, 1fr));
  gap: 12px;
}
.promote-grid {
  display: grid;
  grid-template-columns: repeat(var(--promote-cols, 3), minmax(0, 1fr));
  gap: 12px;
}

/* 优化热门资讯网格 - 电脑4列，平板2列，手机1列 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.news-card {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
  min-height: 80px;
}
.news-card:hover {
  border-color: var(--theme);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}
.news-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
}

/* 首页布局优化 */
.home-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.home-main {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
}
/* 卡片内部元素统一收敛，避免把主列撑宽（不裁剪内容，仅约束宽度） */
.home-main .site-card,
.home-main .panel { max-width: 100%; }
.home-side {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
}

/* 增强暗黑模式 - 覆盖更多元素 */
html[data-theme="dark"] .home-side .panel,
html[data-theme="dark"] .side-panel {
  background: var(--card);
  border-color: var(--border);
}
html[data-theme="dark"] .cat-tabs {
  background: var(--card);
  border-color: var(--border);
}
html[data-theme="dark"] .cat-tab {
  border-color: var(--border);
  color: var(--muted);
}
html[data-theme="dark"] .empty-placeholder {
  color: var(--muted);
}
html[data-theme="dark"] .news-card {
  background: var(--card);
  border-color: var(--border);
}
html[data-theme="dark"] .news-card-title {
  color: var(--text);
}
html[data-theme="dark"] .promote-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
html[data-theme="dark"] .rank-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
html[data-theme="dark"] .site-visit {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
}
html[data-theme="dark"] .site-visit:hover {
  background: var(--theme);
  color: #fff;
}
html[data-theme="dark"] .m-score.high { color: #4ade80; }
html[data-theme="dark"] .m-score.mid { color: #fbbf24; }
html[data-theme="dark"] .m-score.low { color: #f87171; }
html[data-theme="dark"] .m-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
html[data-theme="dark"] .m-date { color: var(--muted); }
html[data-theme="dark"] .site-click { color: var(--muted); }
html[data-theme="dark"] .site-click i { color: var(--muted); }
html[data-theme="dark"] .panel-title { color: var(--text); }
html[data-theme="dark"] .panel-tip { color: var(--muted); }
html[data-theme="dark"] .panel-more { color: var(--theme); }
html[data-theme="dark"] .site-name { color: var(--text); }
html[data-theme="dark"] .site-desc { color: var(--muted); }
html[data-theme="dark"] .topbar {
  background: var(--card);
  border-color: var(--border);
}
html[data-theme="dark"] .logo-text { color: var(--text); }
html[data-theme="dark"] .search input {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
html[data-theme="dark"] .flash60 {
  background: var(--card);
  border-color: var(--border);
}
html[data-theme="dark"] .hot-source { opacity: 0.8; }

/* =============================================================
   暗色模式补充：页脚 / SEO 工具 / 文章列表 / 筛选胶囊 / 分页
   （这些组件原本写死 #fff / #f8fafc，暗色下会露出白板）
   ============================================================= */
html[data-theme="dark"] .site-footer {
  background: var(--card);
  border-top-color: var(--border);
}
html[data-theme="dark"] .seo-tool-btn {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}
html[data-theme="dark"] .seo-tool-btn:hover {
  background: var(--theme);
  border-color: var(--theme);
  color: #fff;
}
html[data-theme="dark"] .article-list,
html[data-theme="dark"] .article-main,
html[data-theme="dark"] .article-side {
  background: var(--card);
  border-color: var(--border);
}
html[data-theme="dark"] .article-item:hover { background: #334155; }
html[data-theme="dark"] .cat-pill,
html[data-theme="dark"] .filter-pill {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}
html[data-theme="dark"] .filter-pill em { background: #334155; color: var(--muted); }
html[data-theme="dark"] .pagination a,
html[data-theme="dark"] .pagination span {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}
html[data-theme="dark"] .pagination .cur { background: var(--theme); border-color: var(--theme); color: #fff; }
html[data-theme="dark"] .hot-tag { background: #334155; color: var(--muted); }
html[data-theme="dark"] .hot-tag:hover { background: var(--theme); color: #fff; }
html[data-theme="dark"] .news-tabs a {
  background: var(--card);
  border-color: var(--border);
  color: var(--muted);
}
html[data-theme="dark"] .news-tabs a.active { background: var(--theme); border-color: var(--theme); color: #fff; }
html[data-theme="dark"] .news-card { background: var(--card); border-color: var(--border); }

/* v1.7.9：响应式降列（顺序必须自上而下由宽到窄，后写的覆盖先写的）
   分工：
     .site-grid     —— 保持自适应，列数随宽度流动（卡片多，铺满更耐看）
     .hot-grid /
     .promote-grid  —— 宽屏按后台设置的列数（v1.7.10 起为 2~6，默认 3），
                       宽度不足时逐级下降，避免卡片被挤扁。
   注意：≤1200px 这一段**不能**再给 .hot-grid/.promote-grid 用 auto-fill，
   否则会把桌面端的固定列数覆盖掉。

   v1.7.10 降列写法说明：
   用 min(上限, 后台列数) 而不是直接写死列数 —— 这样「后台设 2 列」时
   窄屏不会再被抬回 3 列，而「后台设 6 列」时窄屏也能正确收到 3/2/1 列。 */
@media (max-width: 1200px) {
  .site-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  .hot-grid     { grid-template-columns: repeat(min(3, var(--hot-cols, 3)), minmax(0, 1fr)); }
  .promote-grid { grid-template-columns: repeat(min(3, var(--promote-cols, 3)), minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .home-layout { flex-direction: column; }
  .home-side {
    width: 100%;
    position: static;
  }
  .site-grid { grid-template-columns: repeat(2, 1fr); }
  .hot-grid     { grid-template-columns: repeat(min(2, var(--hot-cols, 3)), minmax(0, 1fr)); }
  .promote-grid { grid-template-columns: repeat(min(2, var(--promote-cols, 3)), minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .site-grid { grid-template-columns: repeat(2, 1fr); }
  .hot-grid     { grid-template-columns: 1fr; }
  .promote-grid { grid-template-columns: repeat(min(2, var(--promote-cols, 3)), minmax(0, 1fr)); }
  .cat-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px;
  }
  .cat-tab { flex-shrink: 0; }
  /* 手机屏放不下两列资讯，收回单列 */
  .news-row-list { grid-template-columns: 1fr; }
  .news-row-list li:nth-last-child(-n + 2) { border-bottom: 1px dashed var(--border); }
  .news-row-list li:last-child { border-bottom: none; }
}
@media (max-width: 480px) {
  .site-grid { grid-template-columns: 1fr; }
  .hot-grid { grid-template-columns: 1fr; }
  .promote-grid { grid-template-columns: 1fr; }
}

/* v1.6.0 友情链接 */
.friend-links-section {
  background: var(--card, #fff);
  border-top: 1px solid var(--border, #e5e7eb);
  padding: 20px 0;
  margin-top: 30px;
}
.friend-links-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1f2937);
  margin-bottom: 12px;
}
.friend-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.friend-links-list a {
  font-size: 13px;
  color: var(--muted, #6b7280);
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.friend-links-list a:hover {
  color: var(--theme, #2563eb);
}
.friend-links-list img {
  height: 16px;
  width: auto;
}
html[data-theme="dark"] .friend-links-section {
  background: var(--card);
  border-color: var(--border);
}

/* ============================================================
   v1.6.0 用户中心统一布局（侧边栏 + 主内容区）
   ============================================================ */
.user-center-wrap {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.user-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
}
.user-info-card {
  background: var(--card, #fff);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.user-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 26px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  overflow: hidden;
}
.user-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-name-lg {
  font-size: 16px;
  font-weight: 600;
  color: var(--text, #1f2937);
  margin-bottom: 8px;
}
.user-balance-lg {
  font-size: 13px;
  color: var(--muted, #6b7280);
  background: var(--bg, #f3f4f6);
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-block;
}
.user-balance-lg span {
  color: #10b981;
  font-weight: 600;
}
.user-menu {
  background: var(--card, #fff);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.user-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text, #1f2937);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 2px;
  transition: all 0.15s;
}
.user-menu a:hover {
  background: var(--bg, #f3f4f6);
}
.user-menu a.active {
  background: #2563eb;
  color: #fff;
}
/* v1.8.4：侧栏菜单里的未读数字，靠右对齐 */
.side-menu-badge {
  margin-left: auto;
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.user-menu a.active .side-menu-badge {
  background: rgba(255,255,255,.9);
  color: #2563eb;
}
.user-menu .menu-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.user-menu .menu-divider {
  height: 1px;
  background: var(--border, #e5e7eb);
  margin: 8px 4px;
}
/* v1.8.10（用户反馈「把用户中心的菜单按分类设置下，太长了」）：
   用户中心菜单由 18 项平铺改为 5 个分组。
   分组标题设计原则：比菜单项弱、比普通说明文字强 ——
   小字号 + 灰色 + 字距略放开，作为「分隔感」存在，不与可点的菜单项抢注意力。
   第一个分组标题不要上外边距，避免侧栏顶部出现一段无谓留白。 */
.user-menu .user-menu-group-title {
  padding: 10px 14px 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #9ca3af);
  letter-spacing: 0.6px;
  user-select: none;
}
.user-menu .user-menu-group-title:first-child { padding-top: 4px; }
/* 组与组之间加一条淡分隔线（除第一个分组外），让 5 个分组的边界更清楚 */
.user-menu .user-menu-group-title:not(:first-child) {
  margin-top: 6px;
  border-top: 1px solid var(--border, #eef1f5);
  padding-top: 12px;
}
.user-main {
  flex: 1;
  min-width: 0;
}

/* 充值套餐 */
.recharge-packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.package-item {
  display: block;
  border: 2px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.package-item input {
  position: absolute;
  opacity: 0;
}
.package-item:hover {
  border-color: #2563eb;
}
.package-item.selected {
  border-color: #2563eb;
  background: #eff6ff;
}
.package-amount {
  font-size: 20px;
  font-weight: 700;
  color: var(--text, #1f2937);
}
.package-bonus {
  font-size: 12px;
  color: #10b981;
  margin-top: 4px;
  font-weight: 600;
}

/* 支付方式
   v1.7.3：改用 CSS 变量（原硬编码 #fff / #eff6ff 在暗黑模式下变「白底浅字」，金额看不清）；
   取消固定 flex 布局，交给页面按栅格自适应；卡片加大内边距与圆角。 */
.pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}
.pay-method-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 2px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 12px);
  background: var(--card, #fff);
  color: var(--text);
  padding: 20px 22px;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.pay-method-item input {
  display: none;
}
.pay-method-item:hover {
  border-color: var(--theme);
  box-shadow: 0 6px 18px rgba(37,99,235,.14);
}
.pay-method-item.selected {
  border-color: var(--theme);
  background: color-mix(in srgb, var(--theme) 10%, var(--card, #fff));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme) 18%, transparent);
}
/* 暗黑模式兜底：部分浏览器不支持 color-mix，用半透明主题色代替 */
html[data-theme="dark"] .pay-method-item { background: var(--card); color: var(--text); }
html[data-theme="dark"] .pay-method-item.selected { background: rgba(37,99,235,.22); }
/* 品牌 logo（微信/支付宝 SVG）：固定尺寸防变形 */
.pay-logo { width: 40px; height: 40px; flex-shrink: 0; border-radius: 9px; display: block; }
.pay-icon {
  font-size: 20px;
}

/* 余额显示卡片 */
.balance-display {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-radius: 12px;
  padding: 24px;
  color: #fff;
  text-align: center;
}
.balance-display.green {
  background: linear-gradient(135deg, #10b981, #059669);
}
.balance-label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
}
.balance-amount {
  font-size: 36px;
  font-weight: 700;
}

/* 余额支付区域 */
.pay-balance {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}
.pay-balance h3 {
  margin: 0 0 12px;
  color: #166534;
}

/* 提示区域 */
.recharge-tips,
.withdraw-tips {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg, #f9fafb);
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted, #6b7280);
}
.recharge-tips ul,
.withdraw-tips ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.recharge-tips li,
.withdraw-tips li {
  margin-bottom: 4px;
}

/* 余额汇总 */
.balance-summary {
  display: flex;
  gap: 24px;
  padding: 16px;
  background: var(--bg, #f9fafb);
  border-radius: 8px;
  margin-bottom: 16px;
}
.summary-item {
  flex: 1;
}
.summary-label {
  font-size: 13px;
  color: var(--muted, #6b7280);
  margin-bottom: 4px;
}
.summary-value {
  font-size: 24px;
  font-weight: 700;
}

/* 响应式 */
@media (max-width: 900px) {
  .user-center-wrap {
    flex-direction: column;
  }
  .user-sidebar {
    width: 100%;
    position: static;
  }
  .user-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
  .user-menu .menu-divider {
    display: none;
  }
}
@media (max-width: 600px) {
  .recharge-packages {
    grid-template-columns: repeat(2, 1fr);
  }
  .pay-methods {
    flex-direction: column;
  }
  .user-menu {
    grid-template-columns: 1fr;
  }
  .balance-amount {
    font-size: 28px;
  }
}

/* 统计卡片（广告统计等页面通用） */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stats-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
}
.stats-card-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #f3f4f6);
  border-radius: 12px;
}
.stats-card-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text, #1f2937);
  line-height: 1.2;
}
.stats-card-label {
  font-size: 13px;
  color: var(--muted, #6b7280);
  margin-top: 4px;
}
@media (max-width: 1024px) {
  .stats-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stats-cards { grid-template-columns: 1fr; }
}


/* ===== v1.7.1 时段选择（广告位/置顶共用，置于全局以便各页面复用） ===== */
.slot-row { display:flex; gap:8px; align-items:center; }
.slot-row input[type="date"] { flex:1; min-width:0; }
.slot-row select { width:92px; flex:none; }
.slot-picker { margin:10px 0 4px; }
.slot-picker-label { font-size:12px; color:#64748b; margin-bottom:6px; }
.slot-days { display:grid; grid-template-columns:repeat(7, 1fr); gap:6px; }
.slot-day {
  border:1px solid #e2e8f0; background:#fff; border-radius:8px; padding:6px 2px;
  cursor:pointer; text-align:center; font-size:11px; line-height:1.3;
}
.slot-day .slot-d { display:block; font-weight:600; color:#334155; }
.slot-day .slot-s { display:block; color:#16a34a; }
.slot-day:hover { border-color:#2563eb; }
.slot-day.partial { background:#fffbeb; border-color:#fde68a; }
.slot-day.partial .slot-s { color:#d97706; }
.slot-day.sold { background:#f1f5f9; border-color:#e2e8f0; cursor:not-allowed; opacity:.75; }
.slot-day.sold .slot-d, .slot-day.sold .slot-s { color:#94a3b8; }
.slot-day.active { border-color:#2563eb; background:#eff6ff; box-shadow:0 0 0 2px rgba(37,99,235,.15); }
.slot-tip { font-size:12px; color:#64748b; line-height:1.7; margin:8px 0 0; background:#f8fafc; padding:8px 10px; border-radius:8px; }
@media (max-width: 480px) {
  .slot-days { grid-template-columns: repeat(4, 1fr); }
}

/* ==================================================================
   v1.7.2 首页徽标完整显示 + 置顶彩色高亮
   ------------------------------------------------------------------
   问题：.site-card 上有 overflow:hidden（当初为修 nowrap 文本顶宽溢出），
        而「置顶」角标与「热门排行」序号用 top:-8px;left:-8px 悬在卡片外，
        于是被父级裁掉一半 —— 看起来就是「标记看不全」。
   方案：这两类卡片单独放开 overflow（文本截断由 .site-name/.site-desc
        自身的 overflow:hidden + ellipsis 保证，不会溢出）。
   ================================================================== */
.site-card.promote-card,
.site-card.hot-card { overflow: visible; }

/* 角标：稍微放大、加白描边，任何背景色下都清晰 */
.promote-badge {
  top: -9px; left: -9px;
  padding: 3px 9px;
  font-size: 12px;
  letter-spacing: .5px;
  border: 2px solid #fff;
  border-radius: 8px;
  white-space: nowrap;
  line-height: 1.4;
}
.rank-badge {
  top: -9px; left: -9px;
  width: 26px; height: 26px;
  font-size: 13px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .18);
}

/* 置顶网站：卡片整体高亮 + 站名彩色渐变，一眼就能认出来 */
.promote-card {
  border-color: #fcd34d;
  background: linear-gradient(135deg, #fffdf5 0%, #ffffff 60%);
  box-shadow: 0 2px 10px rgba(245, 158, 11, .12);
}
.promote-card:hover {
  border-color: #f59e0b;
  box-shadow: 0 8px 22px rgba(245, 158, 11, .22);
}
.promote-card .site-name {
  font-weight: 800;
  color: #d97706;                 /* 不支持渐变文字的老浏览器回退色 */
  font-size: 15px;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .promote-card .site-name {
    background-image: linear-gradient(92deg, #f97316 0%, #ef4444 42%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}
.promote-card .site-desc { color: #b45309; }
.promote-card:before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, #fbbf24, #f97316);
}
html[data-theme="dark"] .promote-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, .10) 0%, rgba(30, 41, 59, .6) 60%);
  border-color: rgba(245, 158, 11, .45);
}
html[data-theme="dark"] .promote-card .site-desc { color: #fbbf24; }
html[data-theme="dark"] .rank-badge { border-color: var(--card); }
html[data-theme="dark"] .promote-badge { border-color: var(--card); }

/* ==================================================================
   v1.7.2 广告槽位与招商占位
   ================================================================== */
.ad-slot { margin: 0 0 16px; }
.home-side .ad-slot { margin-bottom: 16px; }
.ad-slot:empty { display: none; }

.ad-recruit {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: repeating-linear-gradient(135deg, #f8fafc 0 12px, #f1f5f9 12px 24px);
  text-decoration: none; color: var(--text);
  transition: .18s;
}
.ad-recruit:hover { border-color: var(--theme); background: #eff6ff; }
.ad-recruit-badge {
  flex: none; padding: 3px 9px; border-radius: 6px;
  background: var(--theme); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
}
.ad-recruit-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ad-recruit-main b { font-size: 14px; font-weight: 700; }
.ad-recruit-main i { font-style: normal; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-recruit-price { flex: none; font-size: 18px; font-weight: 800; color: #ea580c; }
.ad-recruit-price i { font-style: normal; font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.ad-recruit-btn {
  flex: none; padding: 8px 16px; border-radius: 999px;
  background: var(--theme); color: #fff; font-size: 13px; font-weight: 600;
}
.ad-recruit:hover .ad-recruit-btn { background: #1d4ed8; }

/* ==================================================================
   v1.7.10 广告展示模板（.adx-*）—— 大气横幅版
   设计要点：
   1. 整块 <a> 可点击，内部一律用 span（避免 <a> 内嵌块级元素的兼容问题）
   2. 字段为空时用 :empty 自动收起，杜绝「QQ：」后面一片空白的尴尬
   3. 背景光晕用绝对定位 + pointer-events:none，不挡点击
   4. 窄屏（≤640px）自动改为上下堆叠，副区独占一行
   ================================================================== */
.adx-banner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 24px 32px; margin: 0 0 16px;
  border-radius: 16px; overflow: hidden;
  background: linear-gradient(120deg, #1e40af 0%, #2563eb 45%, #7c3aed 100%);
  color: #fff; text-decoration: none;
  box-shadow: 0 10px 30px rgba(37, 99, 235, .22);
  transition: transform .18s, box-shadow .18s;
}
.adx-banner:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(37, 99, 235, .3); color: #fff; }
/* 背景光晕：纯装饰，不能吃掉点击 */
.adx-glow { position: absolute; border-radius: 50%; pointer-events: none; }
.adx-glow-1 { top: -50px; right: -30px; width: 200px; height: 200px; background: rgba(255, 255, 255, .08); }
.adx-glow-2 { bottom: -60px; left: 30%; width: 160px; height: 160px; background: rgba(255, 255, 255, .05); }
.adx-main { position: relative; flex: 1; min-width: 240px; }
.adx-badge {
  display: inline-block; margin-bottom: 8px; padding: 3px 12px;
  border-radius: 999px; background: rgba(255, 255, 255, .18);
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
}
.adx-badge:empty { display: none; }
.adx-title { display: block; font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: .3px; }
.adx-desc { display: block; margin-top: 6px; font-size: 13px; line-height: 1.6; opacity: .92; }
.adx-side { position: relative; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.adx-contact { font-size: 12px; line-height: 1.6; opacity: .88; }
.adx-cta {
  flex: none; padding: 10px 22px; border-radius: 999px;
  background: #fff; color: #1e40af;
  font-size: 14px; font-weight: 700; white-space: nowrap;
}
.adx-cta i { font-style: normal; margin-left: 4px; }
/* 空字段自动收起：这才是「不会露出半截空标签」的关键 */
.adx-title:empty, .adx-desc:empty, .adx-contact:empty, .adx-cta:empty { display: none; }
.adx-cta:empty + .adx-contact { margin-left: 0; }

@media (max-width: 640px) {
  .adx-banner { padding: 20px; gap: 16px; border-radius: 14px; }
  .adx-title { font-size: 18px; }
  .adx-side { width: 100%; justify-content: space-between; }
  .adx-glow-2 { display: none; }
}

/* 变体：深色科技感（换配色，不改结构） */
.adx-banner.adx-dark {
  background: linear-gradient(120deg, #0f172a 0%, #1e3a8a 55%, #0e7490 100%);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .25);
}
.adx-banner.adx-dark .adx-cta { color: #0f172a; }

/* 变体：暖色促销（适合活动/招商） */
.adx-banner.adx-warm {
  background: linear-gradient(120deg, #b45309 0%, #ea580c 50%, #dc2626 100%);
  box-shadow: 0 10px 30px rgba(234, 88, 12, .22);
}
.adx-banner.adx-warm .adx-cta { color: #b45309; }

/* 变体：极简窄条（侧边栏 / 空间紧张处） */
.adx-mini {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; margin: 0 0 16px;
  border-radius: 12px; border: 1px solid var(--border);
  background: #fff; text-decoration: none; color: var(--text);
  transition: .18s;
}
.adx-mini:hover { border-color: var(--theme); box-shadow: 0 4px 14px rgba(37, 99, 235, .12); color: var(--text); }
.adx-mini .adx-main { min-width: 0; }
.adx-mini .adx-title { font-size: 15px; font-weight: 600; }
.adx-mini .adx-desc { font-size: 12px; color: var(--muted); opacity: 1; }
.adx-mini .adx-cta { padding: 6px 14px; font-size: 13px; background: var(--theme); color: #fff; }
.adx-mini .adx-cta:empty { display: none; }
html[data-theme="dark"] .ad-recruit {
  border-color: #334155;
  background: repeating-linear-gradient(135deg, rgba(30,41,59,.6) 0 12px, rgba(51,65,85,.45) 12px 24px);
}
html[data-theme="dark"] .ad-recruit:hover { background: rgba(37,99,235,.14); }

@media (max-width: 640px) {
  .ad-recruit { flex-wrap: wrap; }
  .ad-recruit-main { flex-basis: 100%; order: 3; }
  .ad-recruit-price { margin-left: auto; }
}

/* ==================================================================
   v1.7.2 用户中心表单：与登录 / 注册页表单风格统一
   ------------------------------------------------------------------
   问题：提现页用了 .form-grid / .form-col-2 两列布局，但这两个类
        只定义在后台的 admin.css 里，前台 style.css 根本没加载 →
        两列塌成一列、间距错乱、标签与输入框挤在一起。
   这里补齐，并把前台表单的行距、标签、输入框统一成登录注册页的观感。
   ================================================================== */
.user-main .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
.user-main .form-col-2 { grid-column: span 2; }
@media (max-width: 700px) {
  .user-main .form-grid { grid-template-columns: 1fr; }
  .user-main .form-col-2 { grid-column: span 1; }
}

/* 表单行：标签在上、控件在下，行距与登录页一致 */
.user-main .form-row { margin-bottom: 16px; }
.user-main .form-row > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
  line-height: 1.5;
}
.user-main .form-row > label .req { color: #ef4444; margin-left: 2px; }
.user-main .form-row input[type="text"],
.user-main .form-row input[type="number"],
.user-main .form-row input[type="email"],
.user-main .form-row input[type="tel"],
.user-main .form-row input[type="password"],
.user-main .form-row input[type="url"],
.user-main .form-row select,
.user-main .form-row textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--card, #fff);
  border: 1px solid var(--border);
  border-radius: 9px;
  line-height: 1.5;
  transition: border-color .16s, box-shadow .16s;
  -webkit-appearance: none;
  appearance: none;
}
.user-main .form-row input:focus,
.user-main .form-row select:focus,
.user-main .form-row textarea:focus {
  outline: none;
  border-color: var(--theme);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.user-main .form-row select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
  cursor: pointer;
}
.user-main .form-row small,
.user-main .form-row .muted {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
/* 说明类文本块 */
.user-main .withdraw-tips,
.user-main .recharge-tips {
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--bg, #f8fafc);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.user-main .withdraw-tips strong,
.user-main .recharge-tips strong { color: var(--text); }
.user-main .withdraw-tips ul,
.user-main .recharge-tips ul { margin: 6px 0 0; padding-left: 20px; }
.user-main .withdraw-tips li,
.user-main .recharge-tips li { margin-bottom: 4px; }

/* 余额展示条 */
.user-main .balance-display {
  padding: 20px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border: 1px solid #dbeafe;
}
.user-main .balance-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.user-main .balance-amount { font-size: 30px; font-weight: 800; color: var(--theme); line-height: 1.2; }
html[data-theme="dark"] .user-main .balance-display {
  background: linear-gradient(135deg, rgba(37,99,235,.14) 0%, rgba(124,58,237,.12) 100%);
  border-color: rgba(96,165,250,.3);
}
html[data-theme="dark"] .user-main .form-row select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .user-main .withdraw-tips,
html[data-theme="dark"] .user-main .recharge-tips { background: rgba(30, 41, 59, .5); }

/* v1.8.5 修复：用户中心「会员权益」与订阅中心「你会收到什么」卡片
   背景硬编码浅色（#f9fafb / #fafbfe），暗黑模式下是深底上的白块，
   标题浅色文字几乎不可读。统一翻转为深色卡片。 */
html[data-theme="dark"] .benefit-item {
  background: #263349;
}
html[data-theme="dark"] .sub-feature {
  background: #263349;
  border-color: var(--border);
}
html[data-theme="dark"] .sub-feature-desc,
html[data-theme="dark"] .sub-notes {
  color: var(--muted);
}

/* v1.8.5 修复：user.css 中暗黑模式下仍为浅色的零散硬编码。
   只加暗黑前缀规则，不影响亮色模式原样。 */
html[data-theme="dark"] .table tbody tr.row-clickable:hover { background: #263349; }
html[data-theme="dark"] .mer-table th,
html[data-theme="dark"] .mer-table th:first-child { background: #0f172a; }
html[data-theme="dark"] .mer-st-off { color: var(--muted); background: #334155; }
html[data-theme="dark"] .btn-ghost { background: transparent; }
html[data-theme="dark"] .btn-ghost:hover { background: rgba(255,255,255,.06); }
html[data-theme="dark"] .btn-ghost:active { background: rgba(255,255,255,.1); }
html[data-theme="dark"] .fav-card.is-selected { background: rgba(37, 99, 235, .16); }
html[data-theme="dark"] .fav-op-del:hover { background: rgba(220, 38, 38, .14); border-color: #7f1d1d; }

/* 必填星号统一样式（视图里原来用内联 style，这里给个类名兜底） */
.user-main .req-mark { color: #ef4444; margin-left: 3px; font-weight: 400; }

/* =============================================================
   v1.7.10 前台页脚订阅栏
   ============================================================= */
.subscribe-bar {
  margin-top: 28px;
  background: linear-gradient(120deg, #1e40af 0%, #2563eb 50%, #7c3aed 100%);
  color: #fff;
}
.subscribe-bar .sub-inner {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 22px 16px;
}
.sub-info { flex: 1 1 240px; display: flex; flex-direction: column; gap: 4px; }
.sub-info b { font-size: 16px; font-weight: 700; }
.sub-desc { font-size: 13px; opacity: .85; line-height: 1.5; }
.sub-form { display: flex; gap: 8px; flex: 0 1 380px; }
.sub-form input[type="email"] {
  flex: 1; min-width: 0;
  padding: 10px 14px; border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px; background: rgba(255,255,255,.95);
  color: #0f172a; font-size: 14px;
}
.sub-form input[type="email"]:focus {
  outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.35);
}
.sub-btn {
  flex: none; padding: 10px 26px; border: 0; border-radius: 999px;
  background: #fff; color: #1e40af; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.sub-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15,23,42,.25); }
.sub-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.sub-msg {
  flex: 1 1 100%; margin: 0; padding: 8px 14px; border-radius: 8px;
  font-size: 13px; line-height: 1.5;
}
.sub-msg.ok  { background: rgba(255,255,255,.92); color: #047857; }
.sub-msg.err { background: rgba(255,255,255,.92); color: #b91c1c; }
@media (max-width: 640px) {
  .subscribe-bar .sub-inner { padding: 18px 14px; gap: 14px; }
  .sub-form { flex: 1 1 100%; }
  .sub-btn { padding: 10px 20px; }
}

/* 友链代码（v1.7.11）：图文版 / 纯文字版 双 Tab + 复制 */
.embed-tabs { display: flex; gap: 8px; margin: 14px 0 10px; flex-wrap: wrap; }
.embed-tab {
  border: 1px solid #e6ebf2; background: #fff; color: #475569;
  padding: 7px 14px; border-radius: 10px; cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all .15s;
}
.embed-tab:hover { border-color: #2563eb; color: #2563eb; }
.embed-tab.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.embed-pane { margin-bottom: 8px; }
.embed-preview {
  background: #f8fafc; border: 1px dashed #e2e8f0; border-radius: 12px;
  padding: 20px; text-align: center; margin-bottom: 10px;
}
.embed-copy { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.embed-copy .code-box { flex: 1; min-width: 260px; }
.embed-status { margin-top: 12px; color: #64748b; font-size: 13px; }
.embed-status b { color: #0f172a; }

/* 用户中心会员卡 CTA（1.8.0） */
.member-card-cta { margin-top: 12px; }
.member-card-cta .btn { width: 100%; }

/* ===== v1.8.0 订阅中心 ===== */
.sub-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.sub-hero-left { display: flex; align-items: center; gap: 16px; }
.sub-icon {
  width: 54px; height: 54px; flex: 0 0 54px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #e0e7ff);
}
.sub-hero-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sub-hero-sub { color: #6b7280; font-size: 13px; margin-top: 6px; line-height: 1.7; max-width: 620px; }
.sub-pill {
  font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px;
}
.sub-pill-on   { background: #dcfce7; color: #15803d; }
.sub-pill-wait { background: #fef3c7; color: #b45309; }
.sub-pill-off  { background: #f1f5f9; color: #64748b; }

.sub-msg { margin: 14px 0 0; padding: 12px 16px; border-radius: 10px; font-size: 14px; }
.sub-msg-ok  { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.sub-msg-err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.sub-feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-top: 8px;
}
.sub-feature { padding: 16px; border: 1px solid #eef2f7; border-radius: 12px; background: #fafbfe; }
.sub-feature-icon { font-size: 22px; }
.sub-feature-title { font-weight: 600; margin: 8px 0 6px; font-size: 14px; }
.sub-feature-desc { color: #6b7280; font-size: 13px; line-height: 1.7; }

.sub-notes { margin: 8px 0 0; padding-left: 20px; color: #4b5563; font-size: 13px; line-height: 2; }

/* ===== v1.8.0 后台仪表盘待办提醒 =====
   v1.8.1：这套 .todo-* 样式已下沉到 css/admin.css。
   原因：它们只服务于**后台**仪表盘，而后台布局 admin_header.php
        仅加载 admin.css，写在前台样式表里会导致「后台样式依赖
        前台文件是否被引入」的隐患。此处整块移除，避免同一组件
        在两处各有一份定义、后续改动只改一处而产生样式漂移。 */

/* ===== v1.8.0 首页弹窗公告 ===== */
.popup-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, .48);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(2px);
}
.popup-mask[hidden] { display: none; }
.popup-box {
  position: relative; width: 100%; max-width: 420px;
  background: #fff; border-radius: 16px; padding: 26px 26px 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .22);
  animation: popupIn .22s ease;
}
@keyframes popupIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.popup-close {
  position: absolute; top: 10px; right: 12px;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: #f1f5f9; color: #64748b; font-size: 20px; line-height: 1;
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.popup-close:hover { background: #e2e8f0; color: #0f172a; }
.popup-title { margin: 0 0 10px; font-size: 18px; font-weight: 700; color: #0f172a; padding-right: 26px; }
.popup-content { color: #475569; font-size: 14px; line-height: 1.8; word-break: break-word; }
.popup-actions { display: flex; gap: 10px; margin-top: 20px; }
.popup-actions .btn { flex: 1; text-align: center; }
@media (max-width: 480px) {
  .popup-box { padding: 22px 18px 16px; border-radius: 14px; }
}

/* ==================================================================
   v1.8.1 修复：文字过长导致的页面/顶部变形
   ------------------------------------------------------------------
   反馈现象：站点名称、用户名、分类名、URL 等文字一长，
            顶部栏就被顶宽、错位甚至整个页面横向溢出。

   根因（三条，逐个解决）：
     1) flex 子项默认 min-width:auto，内部 nowrap 文本会把自身撑宽，
        进而顶破父容器。→ 给所有可能承载长文本的 flex 子项补 min-width:0。
     2) 顶栏右侧 .user-nav 在 ≤768px 被强制 width:100%，
        与同一断点已定义的 grid-area 布局互相打架，造成换行错位。
        → 移除该冲突声明，交由 grid 布局统一管理。
     3) 纯 CSS 截断只能防溢出，长串英文/URL 仍会撑破容器。
        → 补充 overflow-wrap/word-break 兜底，任何长串都能强制断行。

   放在文件末尾是为了让这些规则拥有最高优先级，
   无需回头改动分散在 1000+ 行处的旧规则。
   ================================================================== */

/* 1) 顶栏：任何子项都不允许被长文本顶宽 */
.topbar-inner > * { min-width: 0; }
.topbar-inner .logo { flex-shrink: 0; }
.topbar-inner .logo-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0; max-width: 42vw;   /* 超长站名截断，不挤走搜索框 */
}
.topbar-inner .search-wrap { flex: 1 1 auto; min-width: 0; }
.topbar-inner .user-nav { flex-shrink: 0; min-width: 0; }

/* 用户下拉触发器：昵称再长也不撑破顶栏 */
.user-menu-trigger { min-width: 0; max-width: 100%; }
.user-name {
  min-width: 0; max-width: 120px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-dropdown { min-width: 0; }

/* 2) ≤768px：顶栏是 grid 布局，user-nav 撑满整行会让「登录/注册」
   区域错位。这里撤销旧的 width:100% 与居中，交还给 grid 的 justify-self。 */
@media (max-width: 768px) {
  .topbar-inner .user-nav { width: auto; justify-content: flex-end; }
  .topbar-inner .logo-text { max-width: 46vw; }
}

/* 3) 分类导航：过长分类名不再撑破容器（仍是横向滚动条，不换行） */
.catnav-inner a {
  max-width: 190px; overflow: hidden; text-overflow: ellipsis;
  vertical-align: bottom;
}

/* 4) 长串文本（URL / 英文单词 / 无空格中文串）强制断行。
   覆盖首页卡片、详情页、用户中心、评论等所有常见文本容器。
   注意：.todo-* 属后台组件，其断行规则已在 admin.css 内定义，此处不再重复。 */
.site-name, .site-desc, .site-hero-name, .site-hero-url,
.news-row-title, .side-site-name, .side-site-desc,
.article-title, .article-content,
.user-name-lg, .member-card-tier, .member-card-quota,
.stats-cards, .stat-card,
.comment-content, .panel-title, .info-table td,
.promote-card, .hot-card {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 详情页正文/长链接保持强制断行（详情容器已有该规则，此处兜底更宽的范围） */
.article-content a, .detail-main a, .site-hero-url {
  overflow-wrap: anywhere;
  word-break: break-all;
}

/* 5) 用户中心：主内容区允许收缩，右侧卡片不被长文本顶宽 */
.user-center-wrap { min-width: 0; }
.user-center-wrap > .user-main { flex: 1 1 auto; min-width: 0; }
.user-sidebar { min-width: 0; }
.member-card, .balance-card { min-width: 0; overflow-wrap: anywhere; }
.member-card-quota { word-break: break-word; }
/* 配额已用完的红色提示 */
.quota-out {
  display: inline-block; margin-left: 4px; padding: 0 6px;
  border-radius: 999px; background: #fee2e2; color: #dc2626;
  font-size: 11px; font-weight: 600;
}

/* 6) 后台表格内的长文本（域名、标题、备注）不撑破表格 */
.table td { overflow-wrap: anywhere; }

/* ===================== v2.0 联盟导购栏目（规划 2.7） ===================== */
.deal-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.deal-chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border, #e5e7eb);
  font-size: 13px;
  color: var(--muted, #64748b);
  text-decoration: none;
  background: var(--card, #fff);
  white-space: nowrap;
}
.deal-chip:hover { border-color: var(--theme, #2563eb); color: var(--theme, #2563eb); }
.deal-chip.active { background: var(--theme, #2563eb); border-color: var(--theme, #2563eb); color: #fff; }
.deal-chip-cat { border-style: dashed; }

.deal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.deal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card, #fff);
  text-decoration: none;
  color: inherit;
  transition: transform .14s, box-shadow .14s;
}
.deal-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
/* 合规：《广告法》要求联盟推广必须标注「广告」 */
.deal-ad-badge {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 2;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0,0,0,.55);
  color: #fff;
}
.deal-thumb {
  height: 150px;
  display: flex; align-items: center; justify-content: center;
  background: #f1f5f9;
  overflow: hidden;
}
.deal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.deal-thumb-ph { font-size: 40px; opacity: .5; }
.deal-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.deal-title { font-size: 15px; font-weight: 700; margin: 0; overflow-wrap: break-word; word-break: break-word; }
.deal-summary {
  font-size: 12.5px;
  color: var(--muted, #64748b);
  line-height: 1.6;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}
.deal-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.deal-price { color: #ef4444; font-weight: 800; font-size: 16px; }
.deal-platform { font-size: 12px; color: var(--muted, #64748b); }
.deal-cat { font-size: 11.5px; color: var(--muted, #64748b); }
.deal-disclosure {
  margin-top: 22px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted, #64748b);
  background: #f8fafc;
  border-radius: 10px;
  border-left: 3px solid #94a3b8;
}

@media (max-width: 640px) {
  .deal-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .deal-thumb { height: 110px; }
}

/* =============================================================
   内容聚合专题页（v2.0 规划 3.1）
   {分类}+{场景} 组合页：导航站的 SEO 长尾落地页。
   站点卡片直接复用 .site-card，这里只定义专题容器与列表样式。
   ============================================================= */
.topic-hero { margin: 4px 0 18px; }
.topic-hero h1 { font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.topic-hero-desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; max-width: 720px; }

/* 专题列表卡片 */
.topic-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.topic-card {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  background: var(--card, #fff); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; transition: .18s;
}
.topic-card:hover {
  border-color: var(--theme); box-shadow: 0 6px 20px rgba(37,99,235,.10); transform: translateY(-2px);
}
.topic-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.topic-card-title { font-size: 16px; font-weight: 700; margin: 0; min-width: 0; word-break: break-word; }
.topic-card-count {
  flex-shrink: 0; font-size: 12px; color: var(--theme);
  background: rgba(37,99,235,.08); border-radius: 20px; padding: 3px 9px;
}
.topic-card-sub { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.topic-card-kws { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-kw {
  font-size: 11.5px; color: var(--muted); background: #f1f5f9;
  border-radius: 4px; padding: 2px 7px;
}
html[data-theme="dark"] .topic-kw { background: rgba(255,255,255,.06); }
.topic-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--muted);
}
.topic-card-go { color: var(--theme); font-weight: 600; }

/* 专题详情 */
.topic-detail { max-width: 100%; }
.topic-head { margin-bottom: 16px; }
.topic-head h1 { font-size: 25px; font-weight: 800; margin: 0 0 8px; line-height: 1.35; word-break: break-word; }
.topic-sub { margin: 0 0 10px; font-size: 14.5px; color: var(--muted); line-height: 1.7; }
.topic-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 12.5px; color: var(--muted);
}
.topic-meta a { color: var(--muted); }
.topic-meta a:hover { color: var(--theme); }

/* 专题正文：SEO 的正文部分，行高与间距按阅读体验调 */
.topic-intro {
  background: var(--card, #fff); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 18px;
  font-size: 14.5px; line-height: 1.85; color: var(--text, #1f2937);
}
.topic-intro p { margin: 0 0 10px; }
.topic-intro p:last-child { margin-bottom: 0; }

/* 站点网格：比首页卡片更宽松，便于阅读简介 */
.topic-site-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px;
}
.topic-site-card { padding: 14px; }
.topic-pick-badge {
  position: absolute; top: -7px; right: 8px; z-index: 2;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--theme);
  border-radius: 4px; padding: 1px 6px;
}

/* 相关资讯 */
.topic-news { list-style: none; margin: 0; padding: 0; }
.topic-news li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px dashed var(--border); min-width: 0;
}
.topic-news li:last-child { border-bottom: 0; }
.topic-news a {
  font-size: 14px; color: var(--text, #1f2937); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topic-news a:hover { color: var(--theme); }
.topic-news-date { flex-shrink: 0; font-size: 12px; color: var(--muted); }

/* 相关专题 */
.topic-related { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-rel-chip {
  font-size: 13px; padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--border); color: var(--muted);
  background: var(--card, #fff); transition: .15s;
}
.topic-rel-chip:hover { border-color: var(--theme); color: var(--theme); }

/* 站点详情页：所属专题（内链网络的反向出口） */
.site-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.site-topic-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; padding: 5px 11px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--card, #fff); color: var(--muted);
}
.site-topic-chip:hover { border-color: var(--theme); color: var(--theme); }

@media (max-width: 640px) {
  .topic-head h1 { font-size: 20px; }
  .topic-hero h1 { font-size: 19px; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-site-grid { grid-template-columns: 1fr; }
  .topic-intro { padding: 13px 14px; font-size: 14px; }
}

/* =============================================================
   v2.0 前台 UI/UX 全面美化升级（增强层）
   ----------------------------------------------------------------
   原则：在既有样式之上「叠加」而非重写。
   · 设计令牌（Design Tokens）统一收口，后续所有组件引用变量，
     便于一处改色/改阴影全站联动；
   · 暗色模式通过覆盖本层变量 + 少量针对性规则适配；
   · 所有改动均为追加规则，不删除/不改写历史选择器，
     老页面若用到同名类会得到「更圆润 + 更有层次」的观感。
   ============================================================= */

/* ---------- 1. 扩展设计令牌（与既有 :root 合并，后定义覆盖） ---------- */
:root {
  /* 阴影三级：sm 用于悬浮提示/输入框，md 用于卡片常态，lg 用于弹窗/上浮态 */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .14);
  /* 圆角三档：sm 小控件/标签，md 默认卡片，lg 大卡片/Hero */
  --radius-sm: 8px;
  --radius-lg: 16px;
  /* 统一过渡：交互元素（按钮/卡片/输入框/链接）共用，避免各处手感不一致 */
  --transition: all .2s ease;
  /* 语义色：成功/警告/危险（用于表单提示、状态徽章、操作反馈） */
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  /* 次级卡片底色：用于卡片内嵌区块、表格斑马纹等「比卡片再浅一点」的层次 */
  --card-2: #f8fafc;
}

/* 暗色模式下重写本层令牌：阴影更靠「加深层级」而非投影，
   语义色提亮以保证深色背景上的对比度 */
html[data-theme="dark"] {
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #f87171;
  --card-2: rgba(255, 255, 255, .03);
}

/* ---------- 2. 统一卡片体系 ----------
   既有 .panel / .site-card 已具备卡片观感；这里补一个通用 .card 工具类，
   供用户中心、活动页等「未被 panel 覆盖」的容器统一采用：
   圆角 14px + 柔和阴影 + hover 上浮（仅对 .card-hover 触发位移，避免误触） */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--theme) 35%, var(--border));
}

/* 既有 .panel 在本层统一收口阴影与圆角，让「面板」与「卡片」观感一致 */
.panel {
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  transition: box-shadow .2s ease;
}
.panel:hover { box-shadow: var(--shadow-md); }

/* 站点卡片：统一引用令牌，圆角加大、上浮更明显但克制 */
.site-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.site-card:hover {
  box-shadow: var(--shadow-md);
  /* 既有规则已写 translateY(-2px)，这里用变量让阴影随之上一个台阶 */
}

/* ---------- 3. 按钮体系 ----------
   既有 .btn / .btn-primary / .btn-danger 保留；
   补齐 .btn-secondary（次按钮）与 .btn-ghost（幽灵按钮），统一 padding/圆角/过渡 */
.btn {
  border-radius: var(--radius-sm);
  transition: var(--transition);
  box-shadow: none;
}
.btn-secondary {
  background: var(--card-2);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--border);
  border-color: var(--theme);
  color: var(--theme);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn-ghost:hover {
  background: var(--card-2);
  border-color: transparent;
  color: var(--theme);
}
html[data-theme="dark"] .btn-secondary {
  background: rgba(255, 255, 255, .06);
  color: var(--text);
}
html[data-theme="dark"] .btn-secondary:hover {
  background: rgba(255, 255, 255, .12);
  color: var(--theme);
}

/* 所有可交互元素统一过渡（性能友好：只过渡 transform/box-shadow/color/border） */
a, button, .btn, .cat-tab, .cat-pill, .seo-tool-btn, .news-row-title,
.site-card, .fav, .tag, .chip, input, select, textarea {
  transition: var(--transition);
}

/* ---------- 4. 骨架屏（Skeleton） ----------
   用法：占位容器加 .skeleton，内部按需要 .skeleton-line（行）/ .skeleton-block（块）。
   纯 CSS 渐变流光，不依赖任何 JS；SSR 场景可在图片/卡片加载前作为占位。 */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--card-2);
  border-radius: var(--radius-sm);
}
.skeleton::after {
  content: "";
  position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg,
    transparent,
    rgba(128, 140, 160, .12),
    transparent);
  animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer {
  100% { transform: translateX(100%); }
}
.skeleton-line {
  height: 12px; border-radius: 6px; margin: 8px 0;
}
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-block { height: 48px; border-radius: var(--radius); }
html[data-theme="dark"] .skeleton { background: rgba(255, 255, 255, .05); }
html[data-theme="dark"] .skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
}

/* ---------- 5. 页面内容淡入 ----------
   首屏主内容区整体淡入上移，避免「猛然出现」的生硬感。
   与 prefers-reduced-motion 配合：用户关闭动效时本动画自动失效。 */
.main {
  animation: page-fade-in .35s ease both;
}
@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 6. 首页热门搜索标签（Hero 区搜索框下方） ----------
   顶栏搜索框下方一行「大家都在搜」胶囊标签，缩短用户找词路径。 */
.hot-search-row {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px; margin-top: 8px; font-size: 12px;
}
.hot-search-row .hs-label { color: rgba(255, 255, 255, .8); margin-right: 2px; }
.hot-search-row .hs-chip {
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); color: #fff;
  font-size: 12px; text-decoration: none;
}
.hot-search-row .hs-chip:hover {
  background: rgba(255, 255, 255, .32);
}
/* 顶栏是渐变蓝底，标签用半透明白；窄屏时收进搜索框下一行 */
@media (max-width: 768px) {
  .hot-search-row { justify-content: center; }
}

/* ---------- 7. 分类/搜索筛选 chip 标签 ----------
   .chip 通用胶囊：选中态高亮（主题色填充），未选中为浅底描边 */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--card-2); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; cursor: pointer;
  text-decoration: none; transition: var(--transition);
}
.chip:hover { border-color: var(--theme); color: var(--theme); }
.chip.active {
  background: var(--theme); border-color: var(--theme);
  color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
}
/* 分类页已有 .cat-pill，这里复用同款高亮，保持全站筛选控件一致 */
.cat-pill { transition: var(--transition); }
.cat-pill:hover { border-color: var(--theme); color: var(--theme); transform: translateY(-1px); }

/* ---------- 8. 分页美化 ----------
   既有分页若用 .pagination，则统一圆角胶囊、当前页主题色高亮 */
.pagination {
  display: flex; align-items: center; gap: 6px;
  justify-content: center; flex-wrap: wrap;
  margin: 20px 0;
}
.pagination a, .pagination span.current, .pagination .page-info {
  min-width: 36px; height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 13px;
  border: 1px solid var(--border); background: var(--card);
  color: var(--text); transition: var(--transition);
}
.pagination a:hover { border-color: var(--theme); color: var(--theme); box-shadow: var(--shadow-sm); }
.pagination span.current, .pagination .current {
  background: var(--theme); border-color: var(--theme); color: #fff;
  font-weight: 700;
}

/* ---------- 9. 用户中心：侧边栏 active 左侧色条 + 统计大数字 ----------
   既有 .user-menu a.active 是整块蓝底；本层在其左侧加一条主题色竖条，
   让「当前所在」在长菜单里一眼可辨（active 态保留蓝底不变）。 */
.user-menu a.active {
  position: relative;
  box-shadow: var(--shadow-sm);
}
.user-menu a.active::before {
  content: "";
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: rgba(255, 255, 255, .9);
}
/* 统计卡片：数字大号加粗（用户中心各「数据卡片」通用 .stat-num / .balance-card-amount） */
.stat-num, .balance-card-amount { font-variant-numeric: tabular-nums; }

/* ---------- 10. 表格：斑马纹 + 行 hover ----------
   用户中心宽表格统一斑马纹，隔行浅底；hover 行高亮，便于横向对照。 */
.table tbody tr:nth-child(even) { background: var(--card-2); }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: color-mix(in srgb, var(--theme) 8%, transparent); }
html[data-theme="dark"] .table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .03); }
html[data-theme="dark"] .table tbody tr:hover { background: rgba(255, 255, 255, .06); }

/* ---------- 11. 表单统一 focus 态 ----------
   输入框/下拉/文本域聚焦时主题色描边 + 柔和外发光，替代浏览器默认 outline。 */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--theme) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme) 18%, transparent);
}

/* ---------- 12. 减少动效：与全局 prefers-reduced-motion 对齐 ---------- */
@media (prefers-reduced-motion: reduce) {
  .main, .skeleton::after { animation: none !important; }
}

/* ============================================================
   v2.7.0 前台 UI 统一美化层（只做增强，不覆盖既有契约）
   原则：复用既有设计令牌（--theme / --border / --shadow-* / --radius-*）；
         仅补充缺失的工具类与统一观感，不改动既有布局结构。
   ============================================================ */

/* 13. 屏幕阅读器专用：视觉隐藏但保留可访问性（用于首页 SEO H1 等） */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* 14. 卡片观感统一：更柔和的常态阴影 + 克制的 hover 上浮
   （既有 .site-card / .panel 已定义 hover，这里仅统一阴影与圆角节奏，
     避免不同卡片阴影深浅不一） */
.site-card, .panel, .card {
  border-radius: var(--radius, 12px);
}
.site-card {
  box-shadow: var(--shadow-sm);
}
.site-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
/* 内页面板 hover 时阴影上抬一档，交互更有反馈 */
.panel:hover {
  box-shadow: var(--shadow-md);
}
/* 站点卡片内的 favicon 图标 hover 轻微放大，增加可点感 */
.site-card:hover .fav {
  transform: scale(1.05);
}
.fav { transition: transform .18s ease; }

/* 15. 按钮统一观感：主按钮加柔和投影，禁用态降透明度 */
.btn-primary {
  box-shadow: 0 2px 8px color-mix(in srgb, var(--theme) 28%, transparent);
}
.btn-primary:hover {
  box-shadow: 0 4px 14px color-mix(in srgb, var(--theme) 36%, transparent);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[disabled] {
  opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important;
}
html[data-theme="dark"] .btn-primary {
  box-shadow: 0 2px 10px rgba(37, 99, 235, .35);
}

/* 16. 表单控件基础观感统一（聚焦态已有，这里补默认态） */
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"],
select, textarea {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

/* 17. 面包屑观感：字号统一、间距舒适、当前项弱化 */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--muted); transition: color .15s ease; }
.breadcrumb a:hover { color: var(--theme); }
.breadcrumb span { color: var(--text); font-weight: 500; }

/* 18. 移动端细节优化：小屏收紧容器左右留白、避免横向溢出 */
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .panel { padding: 14px; border-radius: var(--radius, 12px); }
  .panel-title { font-size: 16px; }
  /* 站点卡片在小屏更紧凑，描述截断为 1 行 */
  .site-card { padding: 10px; gap: 8px; }
  .site-desc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
  /* 按钮在小屏不挤 */
  .btn-lg { padding: 11px 20px; font-size: 15px; }
}

/* 19. 暗色模式下卡片/面板边框与背景统一提亮，避免死黑 */
html[data-theme="dark"] .panel,
html[data-theme="dark"] .site-card,
html[data-theme="dark"] .card {
  border-color: #2b3446;
}
html[data-theme="dark"] .site-card:hover {
  border-color: color-mix(in srgb, var(--theme) 45%, #2b3446);
}

