/**
 * page.css - 卡片样式、网格、分类页、详情页组件
 */

/* ============================================================
   1. 内容卡片容器
   ============================================================ */
.dh-content {
    margin: 0 auto;
    width: 100%;
}
.content-item {
    /* 【性能优化】原为 rgba(255,255,255,0.75) + backdrop-filter: blur(12px)
       本元素是首页的每个分类区块，首屏同时存在十几块、每块整行宽。
       backdrop-filter 要求浏览器对「块背后的所有内容」实时高斯模糊且每帧重算，
       十几块合计每帧数百万像素，是滚动掉帧的首要原因。
       改为 94% 不透明底色：背景本身是浅色渐变，肉眼几乎无差别，开销降为纯色填充。 */
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04) !important;
    padding: 20px 24px !important;
    margin-bottom: 10px !important;
    /* 【性能优化】把布局与样式计算隔离在本元素内，滚动时不再牵连整页重排 */
    contain: layout style;
}
/* 说明：夜间模式底色由本文件末尾的 body.dark-mode .content-item 规则负责，
   去掉 backdrop-filter 后深色底的不透明度足够，无需另行覆盖。 */
.content-item-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 10px !important;
    gap: 10px !important;
}
.content-item-head-left {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
    overflow: hidden !important;
}
.content-item-head-left :is(h1, h2, h4) {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a202c !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
}
.content-item-head-left :is(h1, h2, h4) i { color: #4a6cf7 !important; }
.content-item-head a {
    color: #a0aec0 !important;
    font-size: 18px !important;
    flex: 0 0 auto !important;
}
.content-item-head a:hover { color: #4a6cf7 !important; }

/* ============================================================
   2. 卡片网格：电脑 7 列 / 手机 3 列
   ============================================================ */
.content-item-urls {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 10px !important;
    padding: 0 !important;
}
@media (max-width: 1279px) and (min-width: 1025px) {
    .content-item-urls { grid-template-columns: repeat(5, 1fr) !important; }
}
@media (max-width: 1024px) and (min-width: 769px) {
    .content-item-urls { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 768px) {
    .content-item-urls {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
}
@media (max-width: 400px) {
    .content-item-urls {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }
}

/* ============================================================
   3. 站点卡片
   ============================================================ */
.content-urls-card {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border: 1px solid #eef2f6 !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    padding: 8px 10px !important;
    min-height: 56px !important;
    min-width: 0 !important;
    overflow: hidden !important;
    /* 【性能优化】原为 transition: all —— 会让浏览器监视该元素「所有可动画属性」
       （含 background、padding、border-width 等根本不需要过渡的），
       hover 时多算一轮样式与布局。改为只过渡实际会变化的三个属性。 */
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    /* 【性能优化】把绘制与布局影响限制在卡片自身边界内，滚动时减少重绘面积。
       卡片原本就有 overflow:hidden，角标裁剪行为完全一致，视觉无变化。 */
    contain: layout paint;
}
.content-urls-card:hover {
    border-color: #4a6cf7 !important;
    box-shadow: 0 8px 24px rgba(74, 108, 247, 0.08) !important;
    transform: translateY(-4px) !important;
}
.content-urls-card.is-recommend {
    background: linear-gradient(145deg, #fffbeb, #fef3c7) !important;
    border-color: #f6e05e !important;
}
.content-urls-card.is-recommend:hover {
    border-color: #ecc94b !important;
    box-shadow: 0 8px 24px rgba(236, 201, 75, 0.15) !important;
}

/* ============================================================
   4. 卡片标签（斜角）
   ============================================================ */
.card-badge,
.card-badge-recommend {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    right: auto !important;
    z-index: 99 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 68px !important;
    padding: 3px 24px !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-align: center !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    pointer-events: none !important;
    transform: translate(-18px, 32px) rotate(-45deg) translateZ(0) !important;
    transform-origin: 0 0 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    transition: none !important;
    /* 【性能优化】原为 will-change: transform —— 但角标只做一次静态 rotate 定位、
       之后永不变化。will-change 会把它提升为常驻 GPU 合成层，首页十几个角标
       就是十几个白占显存的图层，拖慢合成。改用 auto。 */
    will-change: auto !important;
    box-shadow: none !important;
}
.card-badge-recommend { background: linear-gradient(135deg, #f89250, #f1404b) !important; }
.card-badge-hot       { background: linear-gradient(135deg, #f56565, #e53e3e) !important; }
.card-badge-default   { background: linear-gradient(135deg, #4a6cf7, #6a8cff) !important; }
.content-urls-card:hover .card-badge-recommend { background: #e4415f !important; }
@media (max-width: 768px) {
    .card-badge,
    .card-badge-recommend {
        min-width: 50px !important;
        padding: 2px 16px !important;
        font-size: 10px !important;
        transform: translate(-12px, 22px) rotate(-45deg) translateZ(0) !important;
    }
}

/* ============================================================
   5. 卡片内部（图标 + 文字）
   ============================================================ */
.content-urls-body {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0 !important;
    min-width: 0 !important;
}
.content-url-flex {
    display: flex !important;
    align-items: center !important;
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-decoration: none !important;
}
.content-card-body {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    gap: 8px !important;
    min-width: 0 !important;
}
.content-url-img {
    flex: 0 0 32px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #f7fafc !important;
    border: 1px solid #edf2f7 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.content-url-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 3px !important;
    display: block !important;
}
.content-url-info {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}
.content-url-info strong {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    /* 卡片配色由 .content-urls-card 上的 --card-accent 继承下来，
       不再为每个标题写 style="color:xxx !important"（首页 600 处内联样式） */
    color: var(--card-accent, #1a202c) !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    transition: color 0.2s !important;
}
.content-urls-card:hover .content-url-info strong { color: #4a6cf7 !important; }
.content-url-info p {
    display: none !important;
    font-size: 11.5px !important;
    color: #718096 !important;
    line-height: 1.3 !important;
    margin: 2px 0 0 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
@media (min-width: 1400px) {
    .content-url-info p { display: block !important; }
    .content-urls-card { min-height: 62px !important; }
}
@media (min-width: 1600px) {
    .content-url-info strong { font-size: 14px !important; }
    .content-url-img {
        flex: 0 0 36px !important;
        width: 36px !important;
        height: 36px !important;
    }
}

/* ============================================================
   6. 前往图标 - 桌面 hover 浮现 / 手机隐藏
   ============================================================ */
.content-url-togo {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: #4a6cf7 !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(74, 108, 247, 0.25) !important;
    z-index: 10 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-4px) scale(0.9) !important;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}
.content-urls-card:hover .content-url-togo {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
}
.content-url-togo:hover {
    background: #3a5cd9 !important;
    transform: translateY(0) scale(1.1) !important;
}
.content-url-togo svg {
    width: 12px !important;
    height: 12px !important;
    stroke: currentColor !important;
    stroke-width: 2.5 !important;
}
@media (max-width: 768px) {
    .content-url-togo { display: none !important; }
}

/* ============================================================
   7. 手机端卡片特殊处理
   ============================================================ */
@media (max-width: 768px) {
    .content-item {
        /* 【性能优化】同上，手机端同样去掉大面积毛玻璃。
           移动 GPU 更弱，这一条在小屏上的收益比桌面更明显。 */
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-radius: 14px !important;
        padding: 14px 14px !important;
        margin-bottom: 14px !important;
    }
    .content-item-head :is(h1, h2, h4) { font-size: 14px !important; }
    .content-urls-card {
        padding: 6px 8px !important;
        min-height: 48px !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.85) !important;
        border: 1px solid #edf2f7 !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02) !important;
        transition: none !important;
        transform: none !important;
    }
    .content-urls-card:hover {
        transform: none !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02) !important;
        border-color: #4a6cf7 !important;
    }
    .content-urls-card.is-recommend {
        background: rgba(255, 251, 235, 0.9) !important;
        border-color: #f6e05e !important;
    }
    .content-card-body { gap: 6px !important; }
    .content-url-img {
        flex: 0 0 28px !important;
        width: 28px !important;
        height: 28px !important;
        border-radius: 6px !important;
    }
    .content-url-info strong { font-size: 12px !important; }
    .category-main .rank-sidebar { display: none !important; }
    .ai-tools-section { display: block !important; }
}
@media (max-width: 400px) {
    .content-urls-card {
        padding: 5px 6px !important;
        min-height: 44px !important;
    }
    .content-url-img {
        flex: 0 0 24px !important;
        width: 24px !important;
        height: 24px !important;
    }
    .content-url-info strong { font-size: 11.5px !important; }
}

/* ============================================================
   8. 首页分组标签
   ============================================================ */
.home-group-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: 0 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    padding: 2px 0 !important;
}
.home-group-tabs::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
.home-group-tab {
    padding: 2px 14px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #4a5568 !important;
    background: #edf2f7 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    line-height: 1.6 !important;
    border: none !important;
    user-select: none !important;
    flex: 0 0 auto !important;
}
.home-group-tab:hover {
    background: #e2e8f0 !important;
    color: #2d3748 !important;
    transform: translateY(-1px) !important;
}
.home-group-tab.active {
    background: #4a6cf7 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.25) !important;
}
@media (max-width: 768px) {
    .home-group-tab {
        padding: 1px 10px !important;
        font-size: 12px !important;
        border-radius: 16px !important;
    }
    .content-item-head-left { gap: 8px !important; }
    .home-group-tabs { gap: 4px !important; }
    .content-item-head {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 6px !important;
        padding: 0 0 8px 0 !important;
    }
    .content-item-head > a {
        flex: 0 0 auto !important;
        font-size: 18px !important;
        padding: 2px 6px !important;
        color: #4a6cf7 !important;
    }
}

/* ============================================================
   9. 分类页布局
   ============================================================ */
.category-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 0 16px 0 !important;
    margin-bottom: 16px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}
.category-header h1 {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}
.category-header h1 i {
    color: #4a6cf7 !important;
    background: rgba(74, 108, 247, 0.10) !important;
    padding: 6px 10px !important;
    border-radius: 10px !important;
}
.category-header .category-count {
    font-size: 13px !important;
    color: #718096 !important;
    background: #edf2f7 !important;
    padding: 4px 16px !important;
    border-radius: 30px !important;
    white-space: nowrap !important;
}
.group-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 0 0 16px 0 !important;
}
.group-tab {
    padding: 6px 18px !important;
    border-radius: 30px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #4a5568 !important;
    background: #f1f4f9 !important;
    border: 1px solid transparent !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
}
.group-tab:hover {
    background: #e2e8f0 !important;
    color: #2d3748 !important;
}
.group-tab.active {
    background: #4a6cf7 !important;
    color: #fff !important;
    border-color: #4a6cf7 !important;
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.25) !important;
}
.group-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a202c !important;
    margin: 0 0 10px 0 !important;
    padding: 4px 16px !important;
    background: linear-gradient(135deg, #f0f5ff, #e8edfc) !important;
    border-radius: 30px !important;
    border-left: 4px solid #4a6cf7 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.category-main {
    display: flex !important;
    gap: 24px !important;
}
.category-main .main-list {
    flex: 1 !important;
    min-width: 0 !important;
}
.category-main .rank-sidebar {
    flex: 0 0 260px !important;
    width: 260px !important;
    position: sticky !important;
    top: 20px !important;
}
@media (max-width: 992px) {
    .category-main { flex-direction: column !important; }
    .category-main .rank-sidebar {
        width: 100% !important;
        position: static !important;
        margin-top: 16px !important;
    }
}
@media (max-width: 768px) {
    .category-header h1 { font-size: 18px !important; }
    .category-header .category-count {
        font-size: 11px !important;
        padding: 2px 12px !important;
    }
    .group-tab {
        font-size: 12px !important;
        padding: 4px 14px !important;
    }
    .group-title {
        font-size: 13px !important;
        padding: 3px 12px !important;
    }
}

/* ============================================================
   10. 排行榜
   ============================================================ */
.rank-card {
    background: #ffffff !important;
    border-radius: 14px !important;
    border: 1px solid #eef2f6 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02) !important;
    padding: 16px 18px !important;
}
.rank-card .rank-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1a202c !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid #f0f4f8 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.rank-card .rank-title i { color: #f6ad55 !important; }
.rank-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.rank-list li {
    display: flex !important;
    align-items: center !important;
    padding: 6px 0 !important;
    border-bottom: 1px solid #f7fafc !important;
}
.rank-list li:last-child { border-bottom: none !important; }
.rank-list li:hover {
    background: #f7fafc !important;
    border-radius: 6px !important;
    padding-left: 6px !important;
}
.rank-num {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin-right: 10px !important;
    flex-shrink: 0 !important;
}
.rank-num.top1    { background: linear-gradient(135deg, #f6ad55, #ed8936) !important; }
.rank-num.top2    { background: linear-gradient(135deg, #a0aec0, #718096) !important; }
.rank-num.top3    { background: linear-gradient(135deg, #f6ad55, #dd6b20) !important; }
.rank-num.default { background: #e2e8f0 !important; color: #718096 !important; }
.rank-name {
    flex: 1 !important;
    font-size: 13px !important;
    color: #2d3748 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.rank-name a:hover { color: #4a6cf7 !important; }
.rank-count {
    font-size: 11px !important;
    color: #a0aec0 !important;
    flex-shrink: 0 !important;
    background: #f7fafc !important;
    padding: 0 10px !important;
    border-radius: 30px !important;
}
.rank-empty {
    text-align: center !important;
    color: #a0aec0 !important;
    padding: 20px 0 !important;
}

/* ============================================================
   11. 分页
   ============================================================ */
.pagination {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px !important;
    margin-top: 20px !important;
    padding: 16px 0 0 0 !important;
    border-top: 1px solid #e2e8f0 !important;
    justify-content: center !important;
}
.pagination .pagination-total {
    color: #a0aec0 !important;
    font-size: 12px !important;
    margin-right: 12px !important;
}
.pagination a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 12px !important;
    border-radius: 8px !important;
    color: #4a6cf7 !important;
    transition: all 0.2s ease !important;
    border: 1px solid transparent !important;
}
.pagination a:hover {
    background: #f0f5ff !important;
    border-color: #d0d9f0 !important;
}
.pagination .pagination-page.active {
    background: #4a6cf7 !important;
    color: #fff !important;
    border-color: #4a6cf7 !important;
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.2) !important;
}
@media (max-width: 768px) {
    .pagination .pagination-total {
        width: 100% !important;
        text-align: center !important;
        margin-right: 0 !important;
        margin-bottom: 4px !important;
        font-size: 11px !important;
    }
    .pagination a {
        min-width: 30px !important;
        height: 30px !important;
        padding: 0 8px !important;
        font-size: 12px !important;
    }
}

/* ============================================================
   12. AI 工具
   ============================================================ */
.ai-tools-section { display: block !important; }
.ai-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    border-bottom: 1px solid #eef2f6;
    padding-bottom: 8px;
}
.ai-tab {
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f7fafc;
    border: 1px solid transparent;
}
.ai-tab:hover {
    background: #edf2f7;
    color: #2d3748;
}
.ai-tab.active {
    background: #4a6cf7;
    color: #fff;
    border-color: #4a6cf7;
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.2);
}
.ai-tab-add {
    margin-left: auto;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #4a6cf7;
    background: #ebf0ff;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px dashed #4a6cf7;
}
.ai-tab-add:hover { background: #dce5ff; }
@media (max-width: 768px) {
    .ai-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        gap: 6px !important;
        padding-bottom: 4px !important;
        border-bottom: 1px solid #eef2f6;
    }
    .ai-tab,
    .ai-tab-add {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        font-size: 12px !important;
        padding: 4px 12px !important;
        border-radius: 20px !important;
    }
    .ai-tab-add {
        background: #ebf0ff !important;
        border: 1px dashed #4a6cf7 !important;
        color: #4a6cf7 !important;
        margin-left: 0 !important;
    }
    .ai-tabs::-webkit-scrollbar { height: 3px; }
    .ai-tabs::-webkit-scrollbar-thumb {
        background: #cbd5e0;
        border-radius: 4px;
    }
}
.ai-tab-content { position: relative; }
.ai-tab-panel {
    display: none;
    animation: fadeIn 0.25s ease;
}
.ai-tab-panel.active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.ai-tools-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    overflow-x: auto !important;
    padding: 4px 2px 8px 2px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.ai-tools-grid::-webkit-scrollbar { height: 6px; }
.ai-tools-grid::-webkit-scrollbar-track {
    background: #f0f4f8;
    border-radius: 4px;
}
.ai-tools-grid::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}
.ai-tools-grid::-webkit-scrollbar-thumb:hover { background: #a0aec0; }
.ai-tool-card {
    flex: 0 0 auto !important;
    min-width: 120px !important;
    padding: 10px 16px !important;
    background: #f7fafc !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    color: #2d3748 !important;
    transition: all 0.25s ease !important;
    white-space: nowrap;
}
.ai-tool-card:hover {
    border-color: #4a6cf7 !important;
    box-shadow: 0 4px 16px rgba(74, 108, 247, 0.08) !important;
    transform: translateY(-2px) !important;
    background: #ffffff !important;
}
.ai-tool-icon {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
    object-fit: contain !important;
}
.ai-tool-card span {
    font-size: 13px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}

/* ============================================================
   13. AI 模态框（无 ID 场景兜底；首页用 style.css 的 #aiModal）
   ============================================================ */
.ai-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.ai-modal-overlay.active { display: flex; }
.ai-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
.ai-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ai-modal-title .close-btn {
    cursor: pointer;
    color: #a0aec0;
    font-size: 24px;
}
.ai-modal-title .close-btn:hover { color: #1a202c; }
.ai-modal-box .form-group { margin-bottom: 14px; }
.ai-modal-box label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 4px;
}
.ai-modal-box input[type="text"],
.ai-modal-box input[type="url"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}
.ai-modal-box input:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.08);
}
.ai-modal-box .btn-submit {
    width: 100%;
    padding: 10px;
    background: #4a6cf7;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.ai-modal-box .btn-submit:hover { background: #3a5cd9; }
@media (max-width: 768px) {
    .ai-modal-box { padding: 20px; width: 95%; }
}

/* ============================================================
   14. post.php 详情页
   ============================================================ */
.dh-breadcrumb {
    padding: 12px 0 16px 0;
    font-size: 14px;
    color: #888;
}
.dh-breadcrumb a {
    color: #4a6cf7;
    text-decoration: none;
}
.dh-breadcrumb a:hover { text-decoration: underline; }
.dh-breadcrumb i {
    margin: 0 6px;
    font-size: 12px;
    color: #ccc;
}
@media (max-width: 768px) {
    .dh-breadcrumb {
        padding: 8px 0 12px 0 !important;
        font-size: 13px !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
    }
    .dh-breadcrumb span {
        display: inline-block !important;
        max-width: 120px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        vertical-align: middle !important;
    }
}
.dh-site-card {
    display: flex !important;
    align-items: flex-start !important;
    gap: 20px !important;
    padding: 24px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    border: 1px solid #eef2f6 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02) !important;
    margin-bottom: 20px !important;
    flex-wrap: wrap !important;
}
.dh-site-avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: #f7fafc;
    border: 1px solid #edf2f7;
}
.dh-site-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}
.dh-site-info {
    flex: 1;
    min-width: 200px;
}
.dh-site-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
}
.dh-site-subtitle {
    font-size: 15px;
    color: #718096;
    margin-bottom: 10px;
    line-height: 1.6;
}
.dh-site-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #a0aec0;
    flex-wrap: wrap;
}
.dh-site-meta .dh-meta-item i { margin-right: 4px; }
.dh-site-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-self: center;
}
.dh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}
.dh-btn-primary {
    background: #4a6cf7;
    color: #fff;
    box-shadow: 0 4px 14px rgba(74, 108, 247, 0.2);
}
.dh-btn-primary:hover {
    background: #3a5cd9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.3);
}
.dh-btn-outline {
    background: transparent;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}
.dh-btn-outline:hover {
    background: #f7fafc;
    border-color: #4a6cf7;
    color: #4a6cf7;
}
@media (max-width: 768px) {
    .dh-site-card {
        padding: 16px !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 12px !important;
    }
    .dh-site-avatar { width: 64px; height: 64px; }
    .dh-site-title { font-size: 20px; }
    .dh-site-actions { width: 100%; justify-content: center; }
    .dh-site-actions .dh-btn {
        padding: 8px 16px;
        font-size: 14px;
        flex: 1;
        justify-content: center;
    }
}
@media (max-width: 420px) {
    .dh-site-title { font-size: 18px !important; }
    .dh-site-avatar { width: 52px !important; height: 52px !important; }
    .dh-site-actions .dh-btn {
        font-size: 13px !important;
        padding: 6px 12px !important;
    }
}
.dh-entry {
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 20px 24px !important;
    margin-top: 16px !important;
    border: 1px solid #eef2f6 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02) !important;
}
.dh-entry-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dh-entry-title i { color: #4a6cf7; }
.dh-entry-content {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.8;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.dh-entry-content p { margin: 0; }
.dh-entry-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    display: block;
    margin: 10px 0;
}
.dh-entry-content iframe,
.dh-entry-content video {
    max-width: 100% !important;
    border-radius: 8px;
    margin: 10px 0;
}
.dh-entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 14px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.dh-entry-content table th,
.dh-entry-content table td {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    text-align: left;
}
.dh-entry-content table th {
    background: #f7fafc;
    font-weight: 600;
}
.dh-entry-content div,
.dh-entry-content p,
.dh-entry-content ul,
.dh-entry-content ol {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
@media (max-width: 768px) {
    .dh-entry {
        padding: 14px !important;
        margin-top: 12px !important;
    }
    .dh-entry-title { font-size: 15px !important; }
    .dh-entry-content { font-size: 14px !important; line-height: 1.7 !important; }
    .dh-entry-content img { border-radius: 6px; margin: 8px 0; }
    .dh-entry-content iframe,
    .dh-entry-content video { height: auto !important; min-height: 180px; }
}
@media (max-width: 420px) {
    .dh-entry { padding: 10px !important; }
}
.dh-entry-xinxi p {
    padding: 6px 0;
    border-bottom: 1px solid #f7fafc;
    font-size: 14px;
    color: #4a5568;
    word-break: break-all;
}
.dh-entry-xinxi p:last-child { border-bottom: none; }
.dh-entry-xinxi a { color: #4a6cf7; }
.dh-entry-xinxi a:hover { text-decoration: underline; }
@media (max-width: 768px) {
    .dh-entry-xinxi p {
        font-size: 13px !important;
        padding: 4px 0 !important;
        word-break: break-word !important;
    }
}
.dh-entry-tips {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fffbeb;
    border-radius: 10px;
    font-size: 13px;
    color: #92400e;
    border-left: 4px solid #f6ad55;
}
.dh-entry-tips i { margin-right: 6px; }
@media (max-width: 768px) {
    .dh-entry-tips {
        font-size: 12px !important;
        padding: 10px 12px !important;
    }
}

/* ============================================================
   15. SEO 数据卡片
   ============================================================ */
.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin: 10px 0 16px 0;
}
.seo-item-box {
    background: #f7fafc;
    border-radius: 10px;
    padding: 10px 6px;
    text-align: center;
    border: 1px solid #edf2f7;
    transition: all 0.25s ease;
}
.seo-item-box:hover {
    border-color: #4a6cf7;
    background: #f0f5ff;
    transform: translateY(-2px);
}
.seo-item-box i {
    font-size: 22px;
    color: #4a6cf7;
    display: block;
    margin-bottom: 4px;
}
.seo-item-box .seo-label {
    font-size: 11px;
    color: #a0aec0;
    display: block;
    margin-bottom: 2px;
}
.seo-item-box .seo-value {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    display: block;
}
.seo-item-box .seo-value.highlight { color: #4a6cf7; }
@media (max-width: 768px) {
    .seo-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }
    .seo-item-box { padding: 8px 4px !important; }
    .seo-item-box i { font-size: 18px !important; }
    .seo-item-box .seo-value { font-size: 16px !important; }
}
@media (max-width: 420px) {
    .seo-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
.query-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.query-links .ql-label {
    font-size: 14px;
    color: #a0aec0;
    margin-right: 4px;
    display: flex;
    align-items: center;
}
.query-links a {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 30px;
    font-size: 13px;
    color: #4a6cf7;
    background: #f0f5ff;
    border: 1px solid #e0e8f5;
    transition: all 0.25s ease;
    text-decoration: none;
    font-weight: 500;
}
.query-links a:hover {
    background: #4a6cf7;
    color: #fff;
    border-color: #4a6cf7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.15);
}
@media (max-width: 768px) {
    .query-links { gap: 4px !important; }
    .query-links a {
        font-size: 12px !important;
        padding: 2px 10px !important;
    }
}

/* ============================================================
   16. 相关推荐
   ============================================================ */
.dh-related-nav { margin-top: 0; }
.dh-related-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.dh-related-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
}
.dh-related-title i {
    margin-right: 8px;
    color: #4a6cf7;
}
.dh-reload-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #718096;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}
.dh-reload-btn:hover {
    background: #f7fafc;
    border-color: #4a6cf7;
    color: #4a6cf7;
}
.dh-related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.dh-related-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fafbfc;
    border: 1px solid #eef2f6;
    border-radius: 10px;
    transition: all 0.25s ease;
    position: relative;
}
.dh-related-card:hover {
    border-color: #4a6cf7;
    box-shadow: 0 4px 16px rgba(74, 108, 247, 0.06);
    background: #ffffff;
}
.dh-related-card.dh-card-recommend {
    border-color: #f6e05e;
    background: #fffbeb;
}
.dh-card-badge {
    position: absolute;
    top: -6px;
    right: 8px;
    background: #f56565;
    color: #fff;
    font-size: 9px;
    padding: 0 10px;
    border-radius: 30px;
    line-height: 18px;
    height: 18px;
}
.dh-card-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}
.dh-card-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f7fafc;
}
.dh-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}
.dh-card-info {
    flex: 1;
    min-width: 0;
}
.dh-card-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a202c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dh-card-desc {
    font-size: 12px;
    color: #a0aec0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 768px) {
    .dh-related-head { flex-wrap: wrap !important; gap: 6px !important; }
    .dh-related-title { font-size: 15px !important; }
    .dh-related-list { grid-template-columns: 1fr !important; gap: 8px !important; }
    .dh-related-card { padding: 10px 12px !important; }
    .dh-card-icon { width: 32px !important; height: 32px !important; }
    .dh-card-name { font-size: 13px !important; }
    .dh-card-desc { font-size: 11px !important; }
}
@media (max-width: 420px) {
    .dh-related-card { padding: 8px 10px !important; }
}

/* ============================================================
   17. post 布局
   ============================================================ */
.post-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.post-main {
    flex: 1;
    min-width: 0;
}
.post-sidebar-right {
    flex: 0 0 260px;
    width: 260px;
    position: sticky;
    top: 20px;
}
@media (max-width: 768px) {
    .post-layout {
        flex-direction: column;
        gap: 0 !important;
    }
    .post-main { width: 100% !important; }
    .post-sidebar-right {
        width: 100% !important;
        flex: 1 !important;
        position: static !important;
        margin-top: 16px !important;
    }
}

/* ============================================================
   18. 福利社
   ============================================================ */
.welfare-card {
    background: linear-gradient(145deg, #fffbeb, #fef3c7);
    border: 1px solid #f6e05e;
    border-radius: 16px;
    padding: 18px 20px;
}
.welfare-card .welfare-title {
    font-size: 16px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.welfare-card .welfare-title i {
    color: #f6ad55;
    font-size: 20px;
}
.welfare-card .welfare-title span {
    font-size: 12px;
    font-weight: 400;
    color: #b7791f;
    margin-left: auto;
}
.welfare-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.welfare-list .welfare-item {
    display: flex;
    align-items: center;
    gap: 12px !important;
    padding: 10px 14px !important;
    /* 【性能优化】原为 rgba(255,255,255,0.7) + backdrop-filter: blur(4px)。
       福利位可能有多条并列，滚动时要逐条实时模糊。改成 92% 不透明底色，
       与原来的 hover 态 (0.9) 接近，视觉几乎一致。 */
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 10px !important;
    border: 1px solid #fef3c7 !important;
    transition: background 0.2s ease !important;
    margin-bottom: 6px !important;
}
.welfare-list .welfare-item:last-child { margin-bottom: 0 !important; }
.welfare-list .welfare-item:hover { background: rgba(255, 255, 255, 0.9) !important; }
.welfare-list .welfare-item a,
.welfare-list .welfare-item span {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-decoration: none !important;
    color: inherit !important;
    width: 100% !important;
}
.welfare-list .welfare-item .wi-icon {
    flex-shrink: 0 !important;
    width: 32px !important;
    text-align: center !important;
    font-size: 20px !important;
    color: #f6ad55 !important;
}
.welfare-list .welfare-item .wi-content {
    flex: 1 !important;
    min-width: 0 !important;
}
.welfare-list .welfare-item .wi-content h5 {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1a202c !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}
.welfare-list .welfare-item .wi-content p {
    font-size: 12px !important;
    color: #a0aec0 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}
@media (max-width: 768px) {
    .welfare-card { padding: 14px 16px !important; }
    .welfare-card .welfare-title { font-size: 15px !important; }
    .welfare-list .welfare-item { padding: 6px 10px !important; }
    .welfare-list .welfare-item .wi-icon { font-size: 18px !important; width: 26px !important; }
    .welfare-list .welfare-item .wi-content h5 { font-size: 13px !important; }
    .welfare-list .welfare-item .wi-content p { font-size: 11px !important; }
}
@media (max-width: 420px) {
    .welfare-list .welfare-item { padding: 4px 8px !important; }
    .welfare-list .welfare-item .wi-content h5 { font-size: 12px !important; }
}

/* ============================================================
   19. 反馈弹窗
   ============================================================ */
.dh-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.dh-modal-overlay.active { display: flex; }
.dh-modal-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
.dh-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dh-modal-title .close-btn {
    cursor: pointer;
    color: #a0aec0;
    font-size: 24px;
    transition: 0.2s;
}
.dh-modal-title .close-btn:hover { color: #1a202c; }
.dh-modal-body .form-group { margin-bottom: 16px; }
.dh-modal-body label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 4px;
}
.dh-modal-body .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dh-modal-body .radio-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: normal;
    cursor: pointer;
    background: #f7fafc;
    padding: 6px 16px;
    border-radius: 20px;
    transition: 0.2s;
    font-size: 14px;
}
.dh-modal-body .radio-group label:hover { background: #edf2f7; }
.dh-modal-body .radio-group input[type="radio"] { accent-color: #4a6cf7; }
.dh-modal-body textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: 0.2s;
    background: #f7fafc;
}
.dh-modal-body textarea:focus {
    border-color: #4a6cf7;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.08);
}
.dh-modal-body .btn-submit-feedback {
    width: 100%;
    padding: 12px;
    background: #4a6cf7;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.dh-modal-body .btn-submit-feedback:hover {
    background: #3a5cd9;
    transform: translateY(-1px);
}
.dh-modal-body .btn-submit-feedback:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.dh-feedback-success {
    text-align: center;
    padding: 20px 0;
}
.dh-feedback-success i {
    font-size: 48px;
    color: #48bb78;
    display: block;
    margin-bottom: 10px;
}
.dh-feedback-success p {
    font-size: 16px;
    color: #2d3748;
}
.feedback-tip {
    background: #ebf8ff;
    padding: 12px 16px;
    border-radius: 10px;
    border-left: 4px solid #4a6cf7;
    font-size: 14px;
    color: #2b6cb0;
    margin-bottom: 16px;
    line-height: 1.6;
}
@media (max-width: 768px) {
    .dh-modal-box { padding: 20px !important; width: 95% !important; }
    .dh-modal-title { font-size: 18px !important; }
    .dh-modal-body .radio-group label { font-size: 13px !important; padding: 4px 12px !important; }
    .dh-modal-body textarea { font-size: 13px !important; }
    .feedback-tip { font-size: 13px !important; padding: 10px 12px !important; }
}

/* ============================================================
   20. 首页卡片 - 温和悬浮效果
   ============================================================ */
.page-home .content-urls-card {
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}
.page-home .content-urls-card:hover {
    transform: translateY(-3px) !important;
    border-color: #4a6cf7 !important;
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.08) !important;
    background: #ffffff !important;
}
.page-home .content-urls-card.is-recommend:hover {
    background: linear-gradient(145deg, #fff8e7, #fffbeb) !important;
    border-color: #ecc94b !important;
    box-shadow: 0 6px 20px rgba(236, 201, 75, 0.15) !important;
}
.page-home .content-urls-card:hover .content-url-img img {
    transform: scale(1.04) !important;
    transition: transform 0.3s ease !important;
}
.page-home .content-urls-card:hover .content-url-info strong {
    color: #4a6cf7 !important;
}

/* ============================================================
   21. 分类页渐变背景
   ============================================================ */
body.category-page .main-content {
    background: linear-gradient(145deg, #f0f6ff 0%, #dce5f5 50%, #c8d4ec 100%) !important;
    min-height: 100vh;
    padding-bottom: 40px !important;
}
body.category-page .dh-content { background: transparent !important; }
body.category-page .content-item,
body.category-page .rank-card {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}
body.category-page .category-header {
    background: transparent !important;
    border-bottom: none !important;
    padding: 16px 0 12px 0 !important;
}
body.category-page .group-tabs {
    background: transparent !important;
    padding: 0 0 16px 0 !important;
}

/* ============================================================
   22. 回到顶部
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a6cf7, #6a8cff);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(74, 108, 247, 0.35);
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.back-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 28px rgba(74, 108, 247, 0.45);
    background: linear-gradient(135deg, #3a5cd9, #5a7cf7);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top i {
    font-size: 22px;
    line-height: 1;
}
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* ============================================================
   23. 推荐资源卡片 - 精致版
   ============================================================ */
.recommend-featured .content-item-urls {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 12px !important;
}
.recommend-featured .content-urls-card {
    position: relative !important;
    background: #ffffff !important;
    border: 1px solid #eef2f6 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}
.recommend-featured .content-urls-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4a6cf7, #7c3aed, #a855f7);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.recommend-featured .content-urls-card:hover {
    border-color: #4a6cf7 !important;
    background: #ffffff !important;
    box-shadow: 0 8px 24px rgba(74, 108, 247, 0.10) !important;
    transform: translateY(-3px) !important;
}
.recommend-featured .content-urls-card:hover::before { opacity: 1; }
.recommend-featured .content-url-img {
    flex: 0 0 46px !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #f0f5ff, #e8edfc) !important;
    border: 1px solid #e0e7f7 !important;
    padding: 7px !important;
    transition: all 0.3s ease !important;
}
.recommend-featured .content-urls-card:hover .content-url-img {
    background: linear-gradient(135deg, #e8edfc, #d6e4ff) !important;
    border-color: #c7d2fe !important;
    transform: scale(1.05) !important;
}
.recommend-featured .content-url-img img { transform: none !important; }
.recommend-featured .content-url-info strong {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1a202c !important;
    margin-bottom: 3px !important;
    line-height: 1.35 !important;
    transition: color 0.2s ease !important;
}
.recommend-featured .content-urls-card:hover .content-url-info strong { color: #4a6cf7 !important; }
.recommend-featured .content-url-info p {
    display: block !important;
    font-size: 12px !important;
    color: #a0aec0 !important;
    margin: 2px 0 0 0 !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.recommend-featured .content-url-togo { display: none !important; }
.recommend-featured .content-card-body {
    gap: 12px !important;
    align-items: center !important;
}
@media (max-width: 768px) {
    .recommend-featured .content-item-urls {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .recommend-featured .content-urls-card {
        padding: 10px 12px !important;
        min-height: 60px !important;
    }
    .recommend-featured .content-url-img {
        flex: 0 0 36px !important;
        width: 36px !important;
        height: 36px !important;
        padding: 5px !important;
    }
    .recommend-featured .content-url-info strong { font-size: 13px !important; }
    .recommend-featured .content-url-info p { font-size: 11px !important; }
    .recommend-featured .content-card-body { gap: 8px !important; }
}

/* ============================================================
   24. 深色模式 - 卡片/详情/分类相关
   ============================================================ */
body.dark-mode .content-item {
    background: rgba(26, 32, 44, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}
body.dark-mode .content-item-head-left :is(h1, h2, h4) { color: #e2e8f0 !important; }
body.dark-mode .content-urls-card {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
}
body.dark-mode .content-urls-card:hover {
    border-color: #4a6cf7 !important;
    background: #3a4460 !important;
}
body.dark-mode .content-urls-card.is-recommend {
    background: #3a3830 !important;
    border-color: #5a4a2a !important;
}
body.dark-mode .content-urls-card.is-recommend:hover {
    background: #3a3830 !important;
    border-color: #5a4a2a !important;
}
body.dark-mode .content-url-info strong { color: #e2e8f0 !important; }
body.dark-mode .content-urls-card:hover .content-url-info strong { color: #6a8cff !important; }
body.dark-mode .content-url-info p { color: #a0aec0 !important; }
body.dark-mode .content-url-img {
    background: #4a5568 !important;
    border-color: #5a6b7a !important;
}
body.dark-mode .content-url-togo {
    background: #4a5568 !important;
    color: #a0aec0 !important;
}
body.dark-mode .content-url-togo:hover {
    background: #4a6cf7 !important;
    color: #fff !important;
}
body.dark-mode .category-header {
    border-bottom-color: #4a5568 !important;
}
body.dark-mode .category-header h1 { color: #e2e8f0 !important; }
body.dark-mode .category-header h1 i { background: rgba(74, 108, 247, 0.2) !important; }
body.dark-mode .category-header .category-count {
    background: #4a5568 !important;
    color: #a0aec0 !important;
}
body.dark-mode .group-tab {
    color: #a0aec0 !important;
    background: #4a5568 !important;
}
body.dark-mode .group-tab:hover {
    background: #5a6b7a !important;
    color: #e2e8f0 !important;
}
body.dark-mode .group-tab.active {
    background: #4a6cf7 !important;
    color: #fff !important;
}
body.dark-mode .group-title {
    background: linear-gradient(135deg, #2d3748, #4a5568) !important;
    color: #e2e8f0 !important;
}
body.dark-mode .rank-card {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
}
body.dark-mode .rank-card .rank-title {
    color: #e2e8f0 !important;
    border-bottom-color: #4a5568 !important;
}
body.dark-mode .rank-name { color: #cbd5e0 !important; }
body.dark-mode .rank-list li { border-bottom-color: #4a5568 !important; }
body.dark-mode .rank-list li:hover { background: #3a4460 !important; }
body.dark-mode .rank-count {
    background: #4a5568 !important;
    color: #a0aec0 !important;
}
body.dark-mode .rank-num.default {
    background: #5a6b7a !important;
    color: #cbd5e0 !important;
}
body.dark-mode .pagination { border-top-color: #4a5568 !important; }
body.dark-mode .pagination .pagination-total { color: #a0aec0 !important; }
body.dark-mode .pagination a { color: #6a8cff !important; }
body.dark-mode .pagination a:hover {
    background: #4a5568 !important;
    border-color: #5a6b7a !important;
}
body.dark-mode .pagination .pagination-page.active {
    background: #4a6cf7 !important;
    color: #fff !important;
}
body.dark-mode .ai-tool-card {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
    color: #cbd5e0 !important;
}
body.dark-mode .ai-tool-card:hover {
    background: #3a4460 !important;
    border-color: #4a6cf7 !important;
}
body.dark-mode .ai-tool-card span { color: #e2e8f0 !important; }
body.dark-mode .ai-modal-box { background: #2d3748; }
body.dark-mode .ai-modal-title { color: #e2e8f0; }
body.dark-mode .ai-modal-title .close-btn { color: #a0aec0; }
body.dark-mode .ai-modal-title .close-btn:hover { color: #fff; }
body.dark-mode .ai-modal-box label { color: #cbd5e0; }
body.dark-mode .ai-modal-box input[type="text"],
body.dark-mode .ai-modal-box input[type="url"] {
    background: #4a5568;
    border-color: #5a6b7a;
    color: #cbd5e0;
}
body.dark-mode .ai-modal-box input:focus { border-color: #4a6cf7; }
body.dark-mode .dh-site-card {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
}
body.dark-mode .dh-site-title { color: #e2e8f0 !important; }
body.dark-mode .dh-site-subtitle { color: #a0aec0 !important; }
body.dark-mode .dh-site-meta { color: #a0aec0 !important; }
body.dark-mode .dh-btn-outline {
    color: #a0aec0 !important;
    border-color: #4a5568 !important;
}
body.dark-mode .dh-btn-outline:hover { background: #4a5568 !important; }
body.dark-mode .dh-entry {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
}
body.dark-mode .dh-entry-title { color: #e2e8f0 !important; }
body.dark-mode .dh-entry-content { color: #cbd5e0 !important; }
body.dark-mode .dh-entry-xinxi p {
    color: #cbd5e0 !important;
    border-bottom-color: #4a5568 !important;
}
body.dark-mode .dh-entry-tips {
    background: #3a3830 !important;
    color: #d69e2e !important;
}
body.dark-mode .seo-item-box {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
}
body.dark-mode .seo-item-box .seo-value { color: #e2e8f0 !important; }
body.dark-mode .query-links a {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
    color: #6a8cff !important;
}
body.dark-mode .query-links a:hover {
    background: #4a6cf7 !important;
    color: #fff !important;
}
body.dark-mode .dh-related-card {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
}
body.dark-mode .dh-related-card:hover {
    background: #3a4460 !important;
    border-color: #4a6cf7 !important;
}
body.dark-mode .dh-card-name { color: #e2e8f0 !important; }
body.dark-mode .dh-card-desc { color: #a0aec0 !important; }
body.dark-mode .dh-reload-btn {
    color: #a0aec0 !important;
    border-color: #4a5568 !important;
}
body.dark-mode .dh-reload-btn:hover { background: #4a5568 !important; }
body.dark-mode .welfare-card {
    background: linear-gradient(145deg, #3a3830, #2d3748) !important;
    border-color: #5a4a2a !important;
}
body.dark-mode .welfare-card .welfare-title { color: #d69e2e !important; }
body.dark-mode .welfare-list .welfare-item {
    background: rgba(45, 55, 72, 0.7) !important;
    border-color: #4a5568 !important;
}
body.dark-mode .welfare-list .welfare-item:hover { background: rgba(45, 55, 72, 0.9) !important; }
body.dark-mode .welfare-list .welfare-item .wi-content h5 { color: #e2e8f0 !important; }
body.dark-mode .welfare-list .welfare-item .wi-content p { color: #a0aec0 !important; }
body.dark-mode .dh-modal-box { background: #2d3748 !important; }
body.dark-mode .dh-modal-title { color: #e2e8f0 !important; }
body.dark-mode .dh-modal-title .close-btn { color: #a0aec0 !important; }
body.dark-mode .dh-modal-title .close-btn:hover { color: #fff !important; }
body.dark-mode .dh-modal-body label { color: #cbd5e0 !important; }
body.dark-mode .dh-modal-body .radio-group label {
    background: #4a5568 !important;
    color: #cbd5e0 !important;
}
body.dark-mode .dh-modal-body .radio-group label:hover { background: #5a6b7a !important; }
body.dark-mode .dh-modal-body textarea {
    background: #4a5568 !important;
    border-color: #5a6b7a !important;
    color: #cbd5e0 !important;
}
body.dark-mode .feedback-tip {
    background: #2a3a4a !important;
    color: #6a8cff !important;
}
body.dark-mode .back-to-top {
    background: linear-gradient(135deg, #5a7cf7, #4a6cf7);
    box-shadow: 0 4px 16px rgba(74, 108, 247, 0.25);
}
body.dark-mode .back-to-top:hover { box-shadow: 0 8px 28px rgba(74, 108, 247, 0.4); }
body.dark-mode.category-page .main-content {
    background: linear-gradient(145deg, #1a2848 0%, #0f1a2e 50%, #0a1520 100%) !important;
}
body.dark-mode.category-page .content-item,
body.dark-mode.category-page .rank-card {
    background: rgba(26, 32, 44, 0.8) !important;
}
body.dark-mode .recommend-featured .content-urls-card {
    background: #16213e !important;
    border-color: #2a3a5a !important;
}
body.dark-mode .recommend-featured .content-urls-card:hover {
    border-color: #4a6cf7 !important;
    background: #1a2a4a !important;
    box-shadow: 0 8px 24px rgba(74, 108, 247, 0.15) !important;
}
body.dark-mode .recommend-featured .content-url-img {
    background: linear-gradient(135deg, #1e2a4a, #2a3a5a) !important;
    border-color: #3a4a6a !important;
}
body.dark-mode .recommend-featured .content-urls-card:hover .content-url-img {
    background: linear-gradient(135deg, #2a3a5a, #3a4a6a) !important;
    border-color: #4a6cf7 !important;
}
body.dark-mode .recommend-featured .content-url-info strong { color: #e2e8f0 !important; }
body.dark-mode .recommend-featured .content-urls-card:hover .content-url-info strong { color: #6a8cff !important; }
body.dark-mode .recommend-featured .content-url-info p { color: #718096 !important; }

/* ============================================================
   25. 企业查询结果浮层
   ============================================================ */
#searchModeCompany.active {
    z-index: 9999;
}
.company-search-result {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 10px;
    max-height: 480px;
    overflow-y: auto;
    z-index: 9999;
}
.company-search-result:empty { display: none; }
.company-search-result::-webkit-scrollbar { width: 4px; }
.company-search-result::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}
.company-search-result .cs-loading,
.company-search-result .cs-empty,
.company-search-result .cs-error {
    text-align: center;
    padding: 20px 16px;
    font-size: 13px;
    color: #a0aec0;
}
.company-search-result .cs-error { color: #e53e3e; }
.company-card {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.company-search-result .company-card:last-child { margin-bottom: 0; }
.company-card:hover {
    border-color: #4a6cf7;
    box-shadow: 0 4px 16px rgba(74, 108, 247, 0.08);
    transform: translateY(-1px);
}
.company-card .cs-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f7fafc;
    border: 1px solid #edf2f7;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.company-card .cs-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}
.company-card .cs-logo .cs-logo-placeholder {
    font-size: 18px;
    font-weight: 700;
    color: #4a6cf7;
}
.company-card .cs-info { flex: 1; min-width: 0; }
.company-card .cs-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.company-card .cs-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 12px;
    color: #718096;
    margin-bottom: 4px;
}
.company-card .cs-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.company-card .cs-meta i { font-size: 13px; color: #a0aec0; }
.company-card .cs-status {
    display: inline-block;
    font-size: 11px;
    padding: 1px 10px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 2px;
}
.company-card .cs-status.normal    { background: #f0fff4; color: #38a169; }
.company-card .cs-status.cancelled { background: #fff5f5; color: #e53e3e; }
.company-card .cs-status.revoked   { background: #fffbeb; color: #d69e2e; }
.company-card .cs-scope {
    font-size: 11.5px;
    color: #a0aec0;
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* 企业详情弹窗 */
.cs-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.cs-modal-overlay.active { display: flex; opacity: 1; }
.cs-modal {
    background: #ffffff;
    border-radius: 18px;
    width: 100%;
    max-width: 640px;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    transform: translateY(12px);
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.cs-modal-overlay.active .cs-modal { transform: translateY(0); }
.cs-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid #f0f2f5;
    position: relative;
}
.cs-modal-header .cs-modal-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #f7fafc;
    border: 1px solid #edf2f7;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cs-modal-header .cs-modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}
.cs-modal-header .cs-modal-logo .cs-logo-placeholder {
    font-size: 22px;
    font-weight: 700;
    color: #4a6cf7;
}
.cs-modal-header .cs-modal-title { flex: 1; min-width: 0; }
.cs-modal-header .cs-modal-title h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 6px;
    line-height: 1.4;
    word-break: break-all;
}
.cs-modal-header .cs-modal-status {
    display: inline-block;
    font-size: 11.5px;
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: 600;
}
.cs-modal-header .cs-modal-status.normal    { background: #f0fff4; color: #38a169; }
.cs-modal-header .cs-modal-status.cancelled { background: #fff5f5; color: #e53e3e; }
.cs-modal-header .cs-modal-status.revoked   { background: #fffbeb; color: #d69e2e; }
.cs-modal-header .cs-modal-status.default   { background: #f1f4f9; color: #718096; }
.cs-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #a0aec0;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}
.cs-modal-close:hover {
    background: #f1f4f9;
    color: #1a202c;
    transform: rotate(90deg);
}
.cs-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 24px;
}
.cs-modal-body::-webkit-scrollbar { width: 6px; }
.cs-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 6px;
}
.cs-modal-section { margin-bottom: 22px; }
.cs-modal-section:last-child { margin-bottom: 0; }
.cs-modal-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #4a6cf7;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3px solid #4a6cf7;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cs-modal-section-title i { font-size: 15px; }
.cs-modal-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}
.cs-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.cs-field-label { font-size: 12px; color: #a0aec0; font-weight: 500; }
.cs-field-value {
    font-size: 13.5px;
    color: #2d3748;
    line-height: 1.6;
    word-break: break-word;
}
.cs-field-value.link a { color: #4a6cf7; text-decoration: none; }
.cs-field.full { grid-column: 1 / -1; }
.cs-field.full .cs-field-value {
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.75;
    color: #4a5568;
    max-height: 200px;
    overflow-y: auto;
}
.cs-field.full .cs-field-value::-webkit-scrollbar { width: 4px; }
.cs-field.full .cs-field-value::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}
@media (max-width: 768px) {
    .company-search-result {
        left: -8px;
        right: -8px;
        max-height: 60vh;
    }
    .company-card { padding: 12px; gap: 10px; }
    .company-card .cs-logo { width: 38px; height: 38px; }
    .company-card .cs-name { font-size: 13px; }
    .company-card .cs-meta { font-size: 11px; gap: 4px 10px; }
    .company-card .cs-scope { -webkit-line-clamp: 1; }
}
@media (max-width: 640px) {
    .cs-modal-overlay {
        padding: 12px;
        align-items: flex-end;
    }
    .cs-modal {
        max-height: 90vh;
        border-radius: 18px 18px 0 0;
        transform: translateY(100%);
    }
    .cs-modal-overlay.active .cs-modal { transform: translateY(0); }
    .cs-modal-header { padding: 18px 18px 14px; gap: 12px; }
    .cs-modal-header .cs-modal-logo { width: 46px; height: 46px; }
    .cs-modal-header .cs-modal-title h3 { font-size: 15px; }
    .cs-modal-body { padding: 16px 18px 20px; }
    .cs-modal-fields { grid-template-columns: 1fr; gap: 10px; }
    .cs-modal-close {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
}

/* 企业查询 - 深色模式 */
body.dark-mode .company-search-result {
    background: #16213e;
    border-color: #2a3a5a;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
}
body.dark-mode .company-card {
    background: #1a2a4a;
    border-color: #2a3a5a;
}
body.dark-mode .company-card:hover {
    border-color: #4a6cf7;
    background: #1e2a4a;
}
body.dark-mode .company-card .cs-name { color: #e2e8f0; }
body.dark-mode .company-card .cs-meta { color: #a0aec0; }
body.dark-mode .company-card .cs-logo { background: #16213e; border-color: #2a3a5a; }
body.dark-mode .company-card .cs-scope { color: #718096; }
body.dark-mode .company-search-result .cs-loading,
body.dark-mode .company-search-result .cs-empty { color: #718096; }
body.dark-mode .cs-modal { background: #16213e; }
body.dark-mode .cs-modal-header { border-bottom-color: #2a3a5a; }
body.dark-mode .cs-modal-header .cs-modal-logo {
    background: #1a2a4a;
    border-color: #2a3a5a;
}
body.dark-mode .cs-modal-header .cs-modal-title h3 { color: #e2e8f0; }
body.dark-mode .cs-modal-close { color: #718096; }
body.dark-mode .cs-modal-close:hover { background: #2a3a5a; color: #e2e8f0; }
body.dark-mode .cs-modal-section-title { color: #6a8cff; border-left-color: #6a8cff; }
body.dark-mode .cs-field-label { color: #718096; }
body.dark-mode .cs-field-value { color: #cbd5e0; }
body.dark-mode .cs-field-value.link a { color: #6a8cff; }
body.dark-mode .cs-field.full .cs-field-value {
    background: #1a2a4a;
    border-color: #2a3a5a;
    color: #a0aec0;
}

/* ============================================================
   26. 推荐资源斜角标签恢复
   ============================================================ */
.recommend-featured .content-urls-card .card-badge,
.recommend-featured .content-urls-card .card-badge-recommend,
.recommend-featured .content-urls-card .card-badge-hot,
.recommend-featured .content-urls-card .card-badge-default {
    display: inline-flex !important;
}
@media (min-width: 769px) {
    .recommend-featured .content-urls-card .card-badge,
    .recommend-featured .content-urls-card .card-badge-recommend,
    .recommend-featured .content-urls-card .card-badge-hot,
    .recommend-featured .content-urls-card .card-badge-default {
        min-width: 76px !important;
        padding: 3px 28px !important;
        transform: translate(-20px, 40px) rotate(-45deg) translateZ(0) !important;
    }
}
@media (max-width: 768px) {
    .recommend-featured .content-urls-card .card-badge,
    .recommend-featured .content-urls-card .card-badge-recommend,
    .recommend-featured .content-urls-card .card-badge-hot,
    .recommend-featured .content-urls-card .card-badge-default {
        min-width: 56px !important;
        padding: 2px 18px !important;
        font-size: 10px !important;
        transform: translate(-14px, 26px) rotate(-45deg) translateZ(0) !important;
    }
}
.recommend-featured .content-urls-card::before { z-index: 1; }

/* ============================================================
   27. 移动端搜索框 placeholder 居中
   ============================================================ */
@media (max-width: 768px) {
    form input[type="text"]:not([name="password"]):not([name="email"]):not([name="captcha"]),
    input[type="search"],
    input[placeholder*="搜索"],
    input[placeholder*="搜寻"],
    input[placeholder*="输入企业"] {
        text-align: center !important;
    }
    form input::placeholder { text-align: center !important; }
    input::placeholder { text-align: center; }
}

/* ============================================================
   28. 全局 SEO 补丁（精简版，仅保留 style.css 没有的）
   ============================================================ */
.latest-time,
.latest-type,
.latest-meta,
.news-date,
.news-views,
.app-stats-row span,
.friend-links-list,
.meta-item,
.dh-site-meta span,
.sidebar-title,
.rec-date,
.list-item p,
.dp-stat-label,
.dp-tag,
.dp-author-id {
    font-size: 12px !important;
}

/* ============================================================
   29. 移动端性能补丁（只在小屏生效，PC 端零影响；删除本节即回滚）
   ------------------------------------------------------------
   小屏 / 浏览器「切换成手机端」时特别卡的原因（按影响排序）：
   ① 顶栏 .header-nav-top 是 sticky + backdrop-filter: blur(12px)，
      而页面背景有一层无限循环动画 → 背景每帧都在变 → 顶栏背后的
      模糊每帧都要重新计算。手机模拟的 DPR 通常是 2~3，
      等于按 4~9 倍设备像素做高斯模糊，这一条就能吃掉大半帧预算。
   ② 背景装饰层（dynamic-bg.css）14 个元素无限动画，fixed 满屏。
      → 已在 dynamic-bg.css 中：小屏不渲染、方块动画改 transform。
   ③ 页脚 .site-footer 也带 backdrop-filter: blur(8px) 满屏宽。
   做法：小屏把这三处「实时模糊」换成高不透明度纯色，肉眼几乎无差别，
   但每帧的模糊计算全部消失。
   ============================================================ */
@media (max-width: 768px) {
    /* ① 顶栏：去实时毛玻璃 */
    .header-nav-top {
        background: rgba(255, 255, 255, 0.97) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    body.dark-mode .header-nav-top {
        background: rgba(26, 32, 44, 0.97) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* ② 页脚：去实时毛玻璃 */
    .site-footer {
        background: rgba(255, 255, 255, 0.96) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    body.dark-mode .site-footer {
        background: rgba(26, 32, 44, 0.96) !important;
    }

    /* ③ 弹窗遮罩的模糊也一并关掉（手机上打开弹窗时最明显） */
    #aiModal.ai-modal-overlay,
    .cs-modal-overlay {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* ============================================================
   30. 系统级「减弱动态效果」尊重（无障碍 + 老机器救星）
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .page-dynamic-bg { display: none !important; }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   31. 文字头像类（缩 HTML 用）
   ------------------------------------------------------------
   原来每张卡片的兜底头像都带一大串内联样式（约 340 字节/个），
   首页 600 张卡片 = 约 200KB 纯样式字符串，还要被解析成 600 个
   独立的内联样式声明参与每帧的样式计算。
   改成：样式入 CSS，HTML 里只留 2 个短变量（--av-bg / --av-fs / --av-r）。
   ============================================================ */
.perf-av,
.perf-av-fb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background: var(--av-bg, #4a6cf7);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 600;
    line-height: 1;
    font-size: var(--av-fs, 16px);
    border-radius: var(--av-r, 8px);
}
/* 兜底头像默认不显示，图片加载失败时（onerror 加类）由下面两条规则切换 */
.perf-av-fb { display: none; }
img.perf-img-err,
.content-url-img img.perf-img-err { display: none !important; }
img.perf-img-err + .perf-av-fb,
.content-url-img img.perf-img-err + .perf-av-fb { display: flex; }

/* ============================================================
   32. 「前往」箭头：CSS 画，不再输出内联 SVG
   ------------------------------------------------------------
   原来每张卡片内部都有一份 <svg>（4 个节点、约 142 字节），
   首页 600 张 = 2400 个节点 + 85KB HTML，而这只是个 24px 圆钮里的箭头。
   改用两个伪元素边框画一个 ↗，节点归零、视觉一致。
   ============================================================ */
/* 只在「HTML 里已经没有 <svg>」时才画，避免还没替换模板的页面出现两个箭头 */
.content-url-togo:not(:has(svg))::after {
    content: "";
    width: 12px;
    height: 12px;
    background: currentColor;
    /* 用原图标同一条路径做蒙版：形状与原来 100% 一致，但页面上少 600 个 <svg> 节点 */
    -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M17 7H7M17 7V17'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: 12px 12px;
    mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M17 7H7M17 7V17'/%3E%3C/svg%3E");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: 12px 12px;
    flex: 0 0 auto;
}
/* 过渡只保留真正会变的属性（原为 transition: all，600 个元素各自监视全部属性） */
.content-url-togo {
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s !important;
}

/* ============================================================
   33. 小屏进一步降低绘制成本
   ============================================================ */
@media (max-width: 768px) {
    /* 大半径投影（blur 32px）在手机上要给每个分类区块单独光栅化，
       滚动时是纯浪费；换成小半径投影，观感几乎一致。 */
    .content-item {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    }
    /* 卡片投影在手机上几乎看不见，直接去掉，减少每张卡的一次绘制 */
    .content-urls-card,
    .content-urls-card:hover {
        box-shadow: none !important;
    }
    .content-urls-card.is-recommend:hover {
        box-shadow: none !important;
    }
}

/* ============================================================
   34. 小屏「屏幕外的分类块不渲染」（已启用）
   ------------------------------------------------------------
   首页 13 个分类块、200+ 张卡片，手机上首屏只看到 1~2 块，
   其余本来也要先完整排一遍版、算一遍样式。
   content-visibility: auto 让浏览器跳过屏幕外区块的布局与绘制，
   切到移动视口、上下滑动时省掉大头。
   contain-intrinsic-size 用 `auto 600px`：首次按 600px 估算，
   渲染过一次后浏览器会记住真实高度，滚动条几乎不跳。
   ============================================================ */
@media (max-width: 768px) {
    .content-item {
        content-visibility: auto;
        contain-intrinsic-size: auto 600px;
    }
}
/* ============================================================
   35. 首页 H1（SEO 修复）
   ------------------------------------------------------------
   原来首页内容区一个 H1 都没有（只有侧边栏 logo 用了 H1），
   标题层级从 h1 直接跳到 h4。现在首页有一个真实 H1，
   侧边栏 logo 已改为 div，标题层级变成 h1 → h2 → 卡片标题。
   视觉上只是一行小字，不想显示可以把 index.php 里
   <h1 class="home-h1"> 那一行删掉（SEO 会少一个 H1）。
   ============================================================ */
.home-h1 {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 10px 2px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: #1a202c;
}

.home-h1 span {
    font-size: 12px;
    font-weight: 400;
    color: #a0aec0;
}

body.dark-mode .home-h1 { color: #e2e8f0; }
body.dark-mode .home-h1 span { color: #718096; }

@media (max-width: 768px) {
    .home-h1 { font-size: 15px; gap: 6px; margin-bottom: 8px; }
    .home-h1 span { font-size: 11px; }
}

/* ============================================================
   36. 顶栏导航重构（视觉重做，不改功能）
   ------------------------------------------------------------
   原来那版的问题（对照截图逐条）：
   ① .header-nav-top-inner 用 justify-content:center，把「导航 + 登录 + 主题」
      当成一坨整体居中 → 左侧贴得很紧、右侧空一大片，重心偏左。
   ② 每个导航项是 inline-block + padding + vertical-align:middle，
      中文和 16px 图标基线对不齐，字看起来上下飘。
   ③ 导航项 8px 间距 + 16px 内边距，比例失衡：组内挤、组间散。
   ④ 登录和主题按钮光秃秃挂在导航末尾，没有任何分组边界，
      和导航项混成一条，分不清"这是页面导航"还是"这是操作"。
   ⑤ 顶栏白底叠在浅灰页面上，没有清晰底边，整块发糊。
   ⑥ hover 带 translateY(-1px) + transition:all，鼠标扫过会抖。

   这一版：
   • 左导航 / 右工具组，两端对齐（space-between），中间自然留白
   • 导航项改 inline-flex + 固定 36px 高 + 居中对齐，图标文字严格垂直居中
   • 胶囊收紧（间距 2px、内边距 14px），hover 只变底色不做位移
   • 右侧「登录 + 夜间模式」包进一个浅灰圆角容器，成为独立工具组
   • 顶栏改 88% 白 + 清晰 1px 底边 + 底部渐变高光线
   ============================================================ */

/* ---------- 外壳 ---------- */
.header-nav-top {
    height: 60px !important;
    padding: 0 20px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(14px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
}

/* 顶栏是全宽 sticky，而左侧 .main-sidebar 是 fixed 180px 盖在它上面。
   原来靠「整体居中」碰巧避开了侧边栏；改成两端对齐后必须显式让位，
   并且让导航左边缘和内容区左边缘（sidebar 180 + 内容 padding 68）对齐。

   【2026-11 侧栏重构】原来用 body:has(.main-sidebar.collapsed) 判断折叠状态：
   折叠类一变，body 整棵子树的选择器都要重算（首页 3000+ 节点，实测每次点击
   触发 20+ 次样式重算），而且 :has() 无法被浏览器缓存。现在改成读 --sb-w
   变量：sidebar.css 里桌面 =180px、折叠 =60px、手机 =0，一处变更、全部跟随。 */
@media (min-width: 769px) {
    .header-nav-top {
        padding-left: calc(var(--sb-w, 180px) + 68px) !important;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .header-nav-top {
        padding-left: calc(var(--sb-w, 180px) + 20px) !important;
    }
}

/* 底部一条极淡的渐变色线，替代原来的大范围投影 */
.header-nav-top::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(74, 108, 247, 0.16) 22%,
        rgba(74, 108, 247, 0.16) 78%,
        transparent 100%);
    pointer-events: none;
}

.header-nav-top-inner {
    justify-content: space-between !important;
    gap: 16px !important;
    max-width: 1400px !important;
}

/* ---------- 左侧导航 ---------- */
.header-nav-top ul {
    gap: 2px !important;
    padding: 0 !important;
    align-items: center !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    overflow-x: auto !important;
}

.header-nav-top ul li a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 36px !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
    border: 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    letter-spacing: 0.01em !important;
    color: #55606f !important;
    background: transparent !important;
    /* 用内阴影占位 1px 边框，避免 hover 时尺寸跳变 */
    box-shadow: inset 0 0 0 1px transparent !important;
    transition: background-color 0.18s ease, color 0.18s ease,
                box-shadow 0.18s ease !important;
}

.header-nav-top ul li a:hover {
    background: rgba(74, 108, 247, 0.07) !important;
    color: #3b5bdb !important;
    box-shadow: inset 0 0 0 1px rgba(74, 108, 247, 0.12) !important;
    transform: none !important;
}

.header-nav-top ul li a.active {
    background: linear-gradient(135deg, #4a6cf7 0%, #6b8cff 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px -4px rgba(74, 108, 247, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

/* 焦点环：浏览器默认的 outline 是黑色描边，而 ul 为了横向滚动设了 overflow:auto，
   上下两边被裁掉，只剩左右两段弧，视觉上就是两个「黑括号」。改用内描边，
   既不会被裁剪，也保住了键盘焦点的可见性（无障碍要求）。 */
.header-nav-top ul li a:focus { outline: none !important; }

.header-nav-top ul li a:focus-visible {
    outline: none !important;
    box-shadow: inset 0 0 0 2px #4a6cf7,
                0 0 0 3px rgba(74, 108, 247, 0.16) !important;
}

.header-nav-top ul li a.active:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9),
                0 4px 12px -4px rgba(74, 108, 247, 0.55) !important;
}

body.dark-mode .header-nav-top ul li a:focus-visible {
    box-shadow: inset 0 0 0 2px #8ba4f5,
                0 0 0 3px rgba(107, 140, 255, 0.22) !important;
}

/* 同一个坑：横向滚动的标签条里，默认 outline 也会被裁成左右两段弧 */
.home-group-tab:focus,
.ai-tabs a:focus { outline: none !important; }

.home-group-tab:focus-visible,
.ai-tabs a:focus-visible {
    outline: none !important;
    box-shadow: inset 0 0 0 2px #4a6cf7 !important;
}

/* 图标：固定宽度做成一个视觉格子，中文和图标才能真对齐 */
.header-nav-top ul li a i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    vertical-align: baseline !important;
    opacity: 0.85 !important;
}

.header-nav-top ul li a.active i,
.header-nav-top ul li a:hover i {
    opacity: 1 !important;
}

/* ---------- 右侧工具组 ---------- */
.header-nav-right {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 3px !important;
    border-radius: 13px !important;
    background: rgba(15, 23, 42, 0.05) !important;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04) !important;
    flex-shrink: 0 !important;
    flex-wrap: nowrap !important;
}

.header-nav-right .user-nav-login,
.header-nav-right .user-nav-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    height: 32px !important;
    padding: 0 12px !important;
    border-radius: 9px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    color: #55606f !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    transition: background-color 0.18s ease, color 0.18s ease,
                box-shadow 0.18s ease !important;
}

.header-nav-right .user-nav-login:hover,
.header-nav-right .user-nav-link:hover {
    background: #ffffff !important;
    color: #3b5bdb !important;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.10) !important;
}

.header-nav-right .user-nav-login i,
.header-nav-right .user-nav-link i {
    font-size: 16px !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.header-nav-right .user-nav-logout {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
    background: rgba(229, 62, 62, 0.10) !important;
    box-shadow: none !important;
}

.header-nav-right .theme-toggle {
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    border-radius: 9px !important;
    font-size: 17px !important;
    color: #55606f !important;
    background: transparent !important;
    transition: background-color 0.18s ease, color 0.18s ease !important;
}

.header-nav-right .theme-toggle:hover {
    background: #ffffff !important;
    color: #3b5bdb !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.10) !important;
}

/* ---------- 暗色模式 ---------- */
body.dark-mode .header-nav-top {
    background: rgba(26, 32, 44, 0.90) !important;
    border-bottom-color: rgba(255, 255, 255, 0.07) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18) !important;
}

body.dark-mode .header-nav-top::after {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(107, 140, 255, 0.22) 22%,
        rgba(107, 140, 255, 0.22) 78%,
        transparent 100%);
}

body.dark-mode .header-nav-top ul li a {
    color: #9aa5b8 !important;
}

body.dark-mode .header-nav-top ul li a:hover {
    background: rgba(107, 140, 255, 0.12) !important;
    color: #c3d0ff !important;
    box-shadow: inset 0 0 0 1px rgba(107, 140, 255, 0.18) !important;
}

body.dark-mode .header-nav-top ul li a.active {
    background: linear-gradient(135deg, #4a6cf7 0%, #6b8cff 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px -4px rgba(74, 108, 247, 0.7) !important;
}

body.dark-mode .header-nav-right {
    background: rgba(255, 255, 255, 0.06) !important;
}

body.dark-mode .header-nav-right .user-nav-login,
body.dark-mode .header-nav-right .user-nav-link,
body.dark-mode .header-nav-right .theme-toggle {
    color: #9aa5b8 !important;
}

body.dark-mode .header-nav-right .user-nav-login:hover,
body.dark-mode .header-nav-right .user-nav-link:hover,
body.dark-mode .header-nav-right .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
    .header-nav-top-inner { gap: 10px !important; }
    .header-nav-top ul li a {
        padding: 0 10px !important;
        font-size: 13px !important;
        gap: 5px !important;
    }
    .header-nav-top ul li a i { width: 16px !important; font-size: 14px !important; }
}

@media (max-width: 768px) {
    .header-nav-top {
        height: 48px !important;
        padding: 0 10px !important;
    }
    /* 手机端导航放不下 6 项，靠横向滑动；
       右边缘加渐隐，提示"后面还有"，避免看起来像被裁断 */
    .header-nav-top-inner { gap: 6px !important; }
    .header-nav-top ul {
        padding-right: 10px !important;
        -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
        mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
    }
    .header-nav-top ul li a {
        height: 32px !important;
        padding: 0 9px !important;
        font-size: 12.5px !important;
        border-radius: 9px !important;
        gap: 4px !important;
    }
    .header-nav-top ul li a i { width: 15px !important; font-size: 13px !important; }
    .header-nav-right { padding: 2px !important; border-radius: 10px !important; gap: 2px !important; }
    .header-nav-right .user-nav-login,
    .header-nav-right .user-nav-link {
        height: 30px !important;
        padding: 0 10px !important;
        font-size: 12.5px !important;
    }
    .header-nav-right .user-nav-logout,
    .header-nav-right .theme-toggle { width: 30px !important; height: 30px !important; }
}

@media (max-width: 480px) {
    .header-nav-top { height: 44px !important; padding: 0 8px !important; }
    .header-nav-top ul li a {
        height: 30px !important;
        padding: 0 8px !important;
        font-size: 12px !important;
    }
    .header-nav-top ul li a i { width: 14px !important; font-size: 12px !important; }
}

/* ============================================================
   32. 全站页脚 v2（四栏：品牌 / 热门分类 / 逛一逛 / 站点数据）
   ------------------------------------------------------------
   旧页脚是 style.css 里的 .site-footer + .footer-inner 一行版权，
   这里用 .sf 命名空间重写，避免与旧规则互相打断；只覆盖
   .site-footer 必需的背景/描边/内边距，其余全部走新类名。
   ============================================================ */
.sf.site-footer {
    margin-top: 26px;
    padding: 42px 0 18px;
    background: #ffffff;
    border-top: 1px solid #e8edf4;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    font-size: 13px;
    color: #8a94a6;
    text-align: left;
    flex-shrink: 0;
}

.sf-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 28px;
}

/* 页脚是 body 的直接子元素，而左侧 .main-sidebar 是 180px 固定定位：
   不给偏移的话，整块页脚会压在侧栏底下、版心还整体左移 90px。
   侧栏折叠（60px）时同步跟随 —— 走 --sb-w 变量，不再用兄弟选择器 + 固定值。 */
@media (min-width: 769px) {
    body > .sf.site-footer { margin-left: var(--sb-w, 180px); }
}

.sf-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

/* ---------- ① 品牌 ---------- */
.sf-brand {
    flex: 0 1 392px;
    min-width: 260px;
}

.sf-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
}
.sf-logo img {
    height: 26px;
    width: auto;
    max-width: 190px;
    box-sizing: content-box;
    padding: 5px 9px;
    background: #ffffff;
    border: 1px solid #eef1f6;
    border-radius: 9px;
    object-fit: contain;
    flex: 0 0 auto;
}
/* logo 是深色字标，暗色底上必须给白底板才看得清 */
body.dark-mode .sf-logo img {
    background: #ffffff;
    border-color: transparent;
}
/* 图片挂了才显示文字名，正常情况下不重复品牌名 */
.sf-logo span {
    display: none;
    font-size: 19px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: .2px;
    line-height: 1;
}
.sf-logo.is-text span { display: inline; }
.sf-logo:hover span { color: #4a6cf7; }

.sf-desc {
    margin: 15px 0 0;
    max-width: 372px;
    font-size: 12.5px;
    line-height: 1.95;
    color: #8a94a6;
}

/* ---------- ②③ 链接列 ---------- */
.sf-col {
    flex: 0 0 auto;
    min-width: 106px;
}

.sf-h {
    margin: 0 0 15px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1a202c;
    letter-spacing: .2px;
    line-height: 1.4;
}

.sf-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sf-col li + li { margin-top: 9px; }

.sf-col a {
    display: inline-block;
    font-size: 12.5px;
    line-height: 1.5;
    color: #8a94a6;
    text-decoration: none;
    transition: color .18s ease, transform .18s ease;
}
.sf-col a:hover {
    color: #4a6cf7;
    transform: translateX(2px);
}
.sf-col a:focus-visible,
.sf-logo:focus-visible,
.sf-meta a:focus-visible,
.sf-copy a:focus-visible {
    outline: 2px solid #4a6cf7;
    outline-offset: 3px;
    border-radius: 3px;
}

/* ---------- ④ 站点数据 ---------- */
.sf-stats {
    flex: 0 0 244px;
}

.sf-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px 18px;
}

.sf-stat span {
    display: block;
    margin-bottom: 4px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #9aa4b6;
}
.sf-stat b {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: #2d3748;
    letter-spacing: .2px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}
.sf-stat.is-accent b { color: #4a6cf7; }

/* ---------- 底部版权条 ---------- */
.sf-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    flex-wrap: wrap;
    margin-top: 36px;
    padding-top: 17px;
    border-top: 1px solid #eef1f6;
    font-size: 12px;
    color: #9aa4b6;
}
.sf-copy { margin: 0; }
.sf-copy a {
    color: #4a6cf7;
    text-decoration: none;
}
.sf-copy a:hover { text-decoration: underline; }

.sf-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}
.sf-meta a {
    color: #8a94a6;
    text-decoration: none;
    transition: color .18s ease;
}
.sf-meta a:hover { color: #4a6cf7; }
.sf-meta i {
    font-style: normal;
    color: #c8d0dd;
}
.sf-disclaim { color: #aab3c2; }

/* ---------- 暗色 ---------- */
body.dark-mode .sf.site-footer {
    background: #0e1a2e;
    border-top-color: #22304a;
    color: #8b98ad;
}
body.dark-mode .sf-logo span { color: #e2e8f0; }
body.dark-mode .sf-logo:hover span { color: #6a8cff; }
body.dark-mode .sf-desc { color: #8b98ad; }
body.dark-mode .sf-h { color: #e2e8f0; }
body.dark-mode .sf-col a,
body.dark-mode .sf-meta a { color: #8b98ad; }
body.dark-mode .sf-col a:hover,
body.dark-mode .sf-meta a:hover { color: #6a8cff; }
body.dark-mode .sf-stat span { color: #7d8aa1; }
body.dark-mode .sf-stat b { color: #e2e8f0; }
body.dark-mode .sf-stat.is-accent b { color: #6a8cff; }
body.dark-mode .sf-bottom {
    border-top-color: #1e2b42;
    color: #7d8aa1;
}
body.dark-mode .sf-copy a { color: #6a8cff; }
body.dark-mode .sf-meta i { color: #33415a; }
body.dark-mode .sf-disclaim { color: #6b7789; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
    .sf-main { gap: 24px; }
    .sf-brand { flex: 0 1 330px; min-width: 220px; }
    .sf-stats { flex: 0 0 232px; }
    .sf-stat b { font-size: 17px; }
}

/* 平板（含固定侧栏吃掉 180px 的情况）：品牌独占一行，
   下面三样（分类 / 逛一逛 / 数据）并排，避免链接列被拉成 50% 宽后中间空一大片 */
@media (max-width: 1024px) {
    .sf-main {
        flex-wrap: wrap;
        gap: 22px 24px;
    }
    .sf-brand {
        flex: 1 1 100%;
        min-width: 100%;
    }
    .sf-desc { max-width: 560px; }
    .sf-col {
        flex: 0 1 auto;
        min-width: 92px;
    }
    .sf-stats {
        flex: 0 1 224px;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .sf.site-footer { padding: 30px 0 16px; margin-top: 18px; }
    .sf-inner { padding: 0 18px; }
    .sf-main { gap: 24px 20px; }
    .sf-col { flex: 1 1 40%; min-width: 0; }
    .sf-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 16px;
    }
    .sf-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-top: 26px;
        padding-top: 14px;
    }
    /* 窄屏免责声明单独占一行，避免「·」孤零零挂在行尾 */
    .sf-disclaim {
        flex-basis: 100%;
        margin-top: 2px;
    }
    .sf-meta i:last-of-type { display: none; }
}

@media (max-width: 420px) {
    .sf-logo span { font-size: 17px; }
    .sf-stat b { font-size: 16px; }
    .sf-meta { gap: 4px 5px; }
}
