/**
 * EduMaster 首页视觉精修（2026-11-24）
 * 作用域：仅 .ls-home-enhance（index.php 的 <main>），零外溢影响其它页面。
 * 设计方向：蓝色科技感 · 玻璃拟态 · 精致微交互（参考 Coursera / 学堂在线的现代极简）。
 * 安全原则：内容始终可见——不使用 JS 隐藏 section 的入场动画；仅首屏一个 0.5s 纯 CSS 淡入，
 * 且 prefers-reduced-motion 下自动禁用。JS 仅负责阅读进度条（纯装饰）。
 */

/* ---------- 1. 首屏顶部光晕 + 平滑滚动 ---------- */
.ls-home-enhance { position: relative; }
html { scroll-behavior: smooth; }
.ls-home-enhance > section:first-of-type::before {
    content: '';
    position: absolute;
    top: -160px; left: 50%;
    width: 900px; height: 420px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(59,130,246,.16) 0%, rgba(99,102,241,.08) 38%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ---------- 2. Hero 标题渐变文字 ---------- */
.ls-home-enhance h1 span.text-blue-600 {
    background: linear-gradient(100deg, var(--color-primary, #3b82f6) 0%, #6366f1 48%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    background-size: 200% auto;
    animation: ls-title-shine 6s ease-in-out infinite alternate;
}
@keyframes ls-title-shine { from { background-position: 0% center; } to { background-position: 100% center; } }

/* ---------- 3. 欢迎 Badge 精致化 ---------- */
.ls-home-enhance .inline-flex.items-center.gap-2.rounded-full {
    box-shadow: 0 2px 12px rgba(15,23,42,.06), 0 0 0 1px rgba(59,130,246,.06) inset;
    transition: box-shadow .25s ease, transform .25s ease;
}
.ls-home-enhance .inline-flex.items-center.gap-2.rounded-full:hover {
    box-shadow: 0 6px 20px rgba(59,130,246,.14);
    transform: translateY(-1px);
}

/* ---------- 4. 统计卡：悬浮光感 + 光泽扫过 ---------- */
.home-stats a.group > div { position: relative; overflow: hidden; }
.home-stats a.group > div::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
    transform: skewX(-18deg);
    transition: left .55s ease;
    pointer-events: none;
}
.home-stats a.group:hover > div::after { left: 160%; }
.home-stats a.group > div {
    transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s ease, border-color .28s ease;
}
.home-stats a.group:hover > div { box-shadow: 0 12px 28px rgba(37,99,235,.14); }

/* ---------- 5. 各区块标题统一「渐变竖条」视觉节奏 ---------- */
.ls-home-enhance section h2 { position: relative; padding-left: 14px; }
.ls-home-enhance section h2::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    width: 4px; height: 1.1em;
    transform: translateY(-50%);
    border-radius: 4px;
    background: linear-gradient(180deg, var(--color-primary, #3b82f6), #6366f1);
    box-shadow: 0 2px 8px rgba(59,130,246,.35);
}

/* ---------- 6. 内容卡片 hover 抬升一致性 ---------- */
.ls-home-enhance .group { transition: transform .28s cubic-bezier(.2,.7,.3,1); }

/* ---------- 7. 首屏轻量淡入（纯 CSS，内容始终可见，不依赖 JS） ---------- */
/* 2026-11-24 修正：移除原 JS+IntersectionObserver 的隐藏式入场（section 默认 opacity:0），
   避免脚本异常/observer 延迟时用户滚动看到空白区块、且负面影响速度感知。
   改为首屏仅做一次极短的纯 CSS 淡入，动画结束即完全可见；偏好减少动画时直接禁用。 */
.ls-home-enhance > section:first-of-type { animation: ls-hero-fade .5s ease-out both; }
@keyframes ls-hero-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .ls-home-enhance > section:first-of-type { animation: none; }
    .ls-home-enhance h1 span.text-blue-600 { animation: none; }
    html { scroll-behavior: auto; }
}

/* ---------- 8. 阅读进度条 ---------- */
#ls-read-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, var(--color-primary, #3b82f6), #6366f1, #8b5cf6);
    z-index: 9999; pointer-events: none;
    box-shadow: 0 0 10px rgba(59,130,246,.5);
    transition: width .1s linear;
}

/* ---------- 9. 暗色模式适配 ---------- */
html.dark-mode .ls-home-enhance > section:first-of-type::before {
    background: radial-gradient(ellipse at center, rgba(59,130,246,.14) 0%, rgba(99,102,241,.06) 40%, transparent 70%);
}
html.dark-mode .home-stats a.group > div::after {
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.09), transparent);
}

/* ---------- 10. Hero 整区背景轮播 Banner (2026-11-24) ---------- */
.ls-hero-banner { position: absolute; inset: 0; z-index: 0; }
.ls-banner-track { position: absolute; inset: 0; overflow: hidden; background: #0f172a; }
.ls-banner-slide {
    position: absolute; inset: 0; opacity: 0; visibility: hidden;
    transition: opacity .8s ease, visibility .8s;
}
.ls-banner-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.ls-banner-slide img {
    width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
}
/* 遮罩：让图上文字/统计清晰可读 */
.ls-banner-overlay {
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: linear-gradient(180deg, rgba(15,23,42,.55) 0%, rgba(15,23,42,.62) 55%, rgba(15,23,42,.72) 100%);
}
/* 文字阴影，浮在图片上更清晰 */
.ls-hero-text { text-shadow: 0 2px 14px rgba(0,0,0,.55); }
/* 控制层：箭头与圆点 */
.ls-banner-controls { pointer-events: none; }
.ls-banner-arrow {
    position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,.18); color: #fff; font-size: 28px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    transition: background .2s, transform .2s;
}
.ls-banner-arrow:hover { background: rgba(255,255,255,.34); }
.ls-banner-prev { left: 14px; }
.ls-banner-next { right: 14px; }
.ls-banner-dots {
    position: absolute; z-index: 3; left: 0; right: 0; bottom: 12px;
    display: flex; justify-content: center; gap: 8px;
}
.ls-banner-dot {
    width: 8px; height: 8px; padding: 0; border-radius: 999px; border: none;
    background: rgba(255,255,255,.5); cursor: pointer; transition: all .25s;
}
.ls-banner-dot.is-active { width: 24px; background: #fff; }
@media (max-width: 640px) {
    .ls-banner-arrow { width: 32px; height: 32px; font-size: 22px; }
    .ls-banner-prev { left: 6px; }
    .ls-banner-next { right: 6px; }
    .ls-banner-dots { bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .ls-banner-slide { transition: none; }
}

/* ---------- 11. Hero 背景/控制层补充（兼容精简 Tailwind 缺失的类）---------- */
.ls-hero-banner.ls-banner-bg { position: absolute; inset: 0; z-index: 0; }
.ls-banner-controls { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.ls-banner-controls .ls-banner-arrow,
.ls-banner-controls .ls-banner-dots { pointer-events: auto; }
.ls-hero-ghost:hover { background: rgba(255,255,255,.15); }

/* ---------- 12. Hero 补充：精简 Tailwind 缺失的既有类 ---------- */
.ls-hero-section .align-middle { vertical-align: middle; }
.ls-hero-section svg.mr-1\.5 { margin-right: .375rem; }
@media (min-width: 1024px) {
    .ls-hero-section { padding-top: 2rem; padding-bottom: 1.5rem; }
}

/* ---------- 13. 创作者核心权益：徽标 + 三张小卡片（Hero 亮点并入）---------- */
.ls-cf-head .ls-cf-perks { margin-top: .25rem; }
.ls-cf-perk {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.ls-cf-perk:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px -8px rgba(37, 99, 235, .28);
    border-color: rgba(59, 130, 246, .5) !important;
}
.ls-cf-perk svg { transition: transform .25s ease; }
.ls-cf-perk:hover svg { transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) {
    .ls-cf-perk, .ls-cf-perk svg { transition: none; }
    .ls-cf-perk:hover { transform: none; }
}

/* ---------- 14. Hero 标题与统计卡视觉升级（一看就喜欢）---------- */
/* 主标题：加大字号、收紧字距、蓝色渐变强调第二行 */
.ls-home-enhance .ls-hero-title {
    font-size: clamp(1.85rem, 5.2vw, 3.1rem);
    letter-spacing: -.025em;
}
.ls-home-enhance .ls-hero-text {
    text-shadow: 0 2px 14px rgba(2, 6, 23, .72), 0 1px 3px rgba(2, 6, 23, .6);
}
.ls-home-enhance .ls-hero-title .ls-hero-gradient {
    background: linear-gradient(92deg, #ffffff 0%, #7dd3fc 48%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 2px 10px rgba(56, 189, 248, .45));
}
/* 副标题：深色半透明胶囊 + 毛玻璃，提升深色背景上的可读性 */
.ls-home-enhance .ls-hero-desc {
    display: inline-block;
    padding: .45rem 1.15rem;
    background: rgba(15, 23, 42, .42);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    text-shadow: none;
}

/* 统计卡：玻璃态融入深色 Hero，让轮播背景透出来 */
.ls-home-enhance .ls-glass-stats {
    background: rgba(15, 23, 42, .38) !important;
    border-color: rgba(255, 255, 255, .18) !important;
    box-shadow: 0 18px 45px -18px rgba(2, 6, 23, .7) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.ls-home-enhance .ls-glass-stats [class*="bg-white"] {
    background: rgba(255, 255, 255, .1) !important;
    border-color: rgba(255, 255, 255, .13) !important;
    box-shadow: none !important;
}
.ls-home-enhance .ls-glass-stats .text-gray-900 { color: #fff !important; }
.ls-home-enhance .ls-glass-stats .text-gray-600,
.ls-home-enhance .ls-glass-stats .text-gray-700 { color: rgba(255, 255, 255, .9) !important; }
.ls-home-enhance .ls-glass-stats .text-gray-500 { color: rgba(255, 255, 255, .7) !important; }
.ls-home-enhance .ls-glass-stats .border-gray-100 { border-color: rgba(255, 255, 255, .13) !important; }
.ls-home-enhance .ls-glass-links { border-top-color: rgba(255, 255, 255, .16) !important; }

/* 图标 hover 阴影兜底（精简 CSS 未覆盖 group-hover:shadow-lg）*/
.ls-home-enhance [class*="group-hover:shadow-lg"] { transition: box-shadow .25s ease; }
.ls-home-enhance .group:hover [class*="group-hover:shadow-lg"] {
    box-shadow: 0 10px 18px -6px rgba(15, 23, 42, .45);
}

/* md:col-span-6 兜底（精简 CSS 未覆盖，用于排行榜空状态占满整行）*/
@media (min-width: 768px) {
    .home-cards-3 [class*="md:col-span-6"] { grid-column: span 6 / span 6; }
}

/* ---------- 14.5 热门排行榜：缩小一号字体 + 精致排版 ---------- */
.ls-home-enhance .home-rank-tabs button { font-size: 13px !important; padding: 6px 13px !important; }
.home-cards-3 a h3 { font-size: 12px !important; }
.home-cards-3 a > div.flex.flex-col.flex-1 > div:first-child span { font-size: 9px !important; }
.home-cards-3 a > div.flex.flex-col.flex-1 > div.flex.items-center.justify-between > span:first-child { font-size: 12px !important; }
.home-cards-3 a > div.flex.flex-col.flex-1 > div.flex.items-center.justify-between > span:last-child { font-size: 10px !important; }

/* ---------- 14.6 为你推荐：更紧凑 + 破图优雅占位 ---------- */
.ls-trending-grid .ls-trending-cover { aspect-ratio: 16 / 10 !important; }
.ls-trending-grid a h3 { font-size: 12px !important; line-height: 1.45 !important; }
.ls-trending-grid a > div.p-2 { padding: 8px !important; }
/* 图片加载失败隐藏后，父容器显示柔和渐变占位（替代灰色空洞） */
.ls-trending-grid .ls-trending-cover {
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%) !important;
}

/* ---------- 15. 首页顶部：消除导航栏与 Hero Banner 之间的白色断层 ----------
   原因：header 为 fixed，其占位 spacer 已与 header 高度对齐；但 main 还有
   pt-4(16px)/lg:pt-6(24px)，这段纯白内边距把深色 Banner 往下挤，形成断层。
   做法：仅首页把 main 顶部内边距归零，Banner(absolute 铺满 Hero) 即紧贴导航栏底边；
   Hero 自身 pt-4/lg:pt-8 保留，标题仍稳稳落在导航栏下方，视觉更聚焦。 */
.ls-home-enhance { padding-top: 0 !important; }

/* ---------- 16. 手机端排版修复：标签栏/卡片/页脚 ---------- */
@media (max-width: 767px) {
    /* 排行榜标签栏：7 个按钮改为横向滚动，不再均分挤压导致文字竖排 */
    .home-rank-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100% !important;
        justify-content: flex-start !important;
    }
    .home-rank-tabs::-webkit-scrollbar { display: none; }
    .home-rank-tabs button {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        padding: 6px 14px !important;
        font-size: 13px !important;
        letter-spacing: .02em;
    }

    /* 排行榜卡片：手机 2 列下让"免费/学习人数"底部行不竖排换行 */
    .home-cards-3 a > div.flex.flex-col.flex-1 > div.flex.items-center.justify-between {
        flex-wrap: nowrap !important;
        gap: 2px;
    }
    .home-cards-3 a > div.flex.flex-col.flex-1 > div.flex.items-center.justify-between > span {
        white-space: nowrap !important;
    }

    /* 统计卡区：隐藏突兀的左右悬浮箭头，保留圆点导航与自动轮播 */
    .ls-hero-section .ls-banner-arrow { display: none !important; }

    /* 统计卡：降低彩色图标饱和度，减少满屏彩色方块的视觉噪音 */
    .ls-glass-stats .home-stats [class*="bg-gradient-to-br"] {
        filter: saturate(.72) !important;
    }
    /* 统计卡背景：更干净通透，弱化深色遮罩的脏灰感 */
    .ls-home-enhance .ls-glass-stats {
        background: rgba(15, 23, 42, .28) !important;
        border-color: rgba(255, 255, 255, .22) !important;
    }
    /* 底部 4 入口：强制整齐一行（原 global-base 的 >a 规则对 div 未生效） */
    .ls-glass-links {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    .ls-glass-links > div {
        padding: 9px 2px !important;
        gap: 3px !important;
        font-size: 10.5px !important;
        white-space: nowrap !important;
    }
    .ls-glass-links svg { width: 13px !important; height: 13px !important; }

    /* 创作者核心权益：3 张权益卡改为横向一排紧凑排列（原竖排占满屏） */
    .ls-cf-perks { grid-template-columns: repeat(3, 1fr) !important; gap: 6px !important; }
    .ls-cf-perk {
        flex-direction: column !important;
        gap: 5px !important;
        padding: 12px 4px !important;
        text-align: center;
    }
    .ls-cf-perk svg { width: 20px !important; height: 20px !important; }
    .ls-cf-perk span { font-size: 11px !important; white-space: nowrap !important; }

    /* 8 个功能卡：2×2 小格改为单列横向列表（左图标 + 右标题描述），更像现代 App */
    .home-cards-2 { grid-template-columns: 1fr !important; gap: 9px !important; }
    .home-cards-2 > a {
        display: grid !important;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 13px;
        align-items: center;
        padding: 12px 14px !important;
    }
    .home-cards-2 > a > div.absolute { display: none !important; }
    .home-cards-2 > a > div.relative.z-10 {
        display: contents !important;
    }
    .home-cards-2 > a > div.relative.z-10 > div.w-9 {
        grid-column: 1; grid-row: 1 / 3;
        margin: 0 !important;
        width: 38px !important; height: 38px !important;
    }
    .home-cards-2 > a h3 {
        grid-column: 2; grid-row: 1;
        align-self: end;
        font-size: 13px !important;
        margin: 0 0 2px !important;
    }
    .home-cards-2 > a p {
        grid-column: 2; grid-row: 2;
        align-self: start;
        font-size: 11px !important;
    }

    /* Hero 收紧：Banner 背景只覆盖顶部标题/CTA 区，避免统计卡周围大片深色空白 */
    .ls-hero-section .ls-banner-bg {
        height: 300px !important;
        bottom: auto !important;
        -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
    }
    .ls-hero-section .ls-banner-controls {
        height: 300px !important;
        bottom: auto !important;
    }
    /* 统计卡区改为清爽浅色卡片，上移贴合，不再透出深色 Banner 形成压抑空白 */
    .ls-home-enhance .ls-glass-stats {
        background: #ffffff !important;
        border: 1px solid #e8eef6 !important;
        box-shadow: 0 6px 20px rgba(15, 23, 42, .06) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    .ls-glass-stats [class*="bg-white"] {
        background: #f8fafc !important;
        border-color: #eef2f7 !important;
    }
    /* 统计卡日夜统一白底深字（用户选定白色卡片），提高优先级压过全局 dark-mode 白字规则 */
    .ls-home-enhance .ls-glass-stats,
    html.dark-mode .ls-home-enhance .ls-glass-stats {
        background: #ffffff !important;
        border-color: #e8eef6 !important;
    }
    .ls-glass-stats [class*="bg-white"],
    html.dark-mode .ls-glass-stats [class*="bg-white"] {
        background: #f8fafc !important;
        border-color: #eef2f7 !important;
    }
    /* 数字：显式深色，压过 .dark-mode .text-gray-900 的白字 */
    .ls-home-enhance .ls-glass-stats p.font-extrabold,
    html.dark-mode .ls-home-enhance .ls-glass-stats p.font-extrabold,
    .ls-home-enhance .ls-glass-stats .text-gray-900,
    html.dark-mode .ls-home-enhance .ls-glass-stats .text-gray-900 {
        color: #1f2937 !important;
    }
    /* 标签：中灰色 */
    .ls-home-enhance .ls-glass-stats p.text-xs,
    html.dark-mode .ls-home-enhance .ls-glass-stats p.text-xs,
    .ls-home-enhance .ls-glass-stats .text-gray-500,
    html.dark-mode .ls-home-enhance .ls-glass-stats .text-gray-500 {
        color: #64748b !important;
    }
    .ls-glass-stats .border-gray-100 { border-color: #eef2f7 !important; }
    .ls-glass-links,
    html.dark-mode .ls-glass-links {
        background: #f8fafc !important;
        border-top-color: #eef2f7 !important;
        color: #475569 !important;
    }
    /* 底部入口文字 span 直接强制深色（不靠继承，压过 dark-mode 的任何灰色规则） */
    .ls-glass-links > div span,
    html.dark-mode .ls-glass-links > div span,
    .ls-glass-links > div,
    html.dark-mode .ls-glass-links > div.text-gray-600 {
        color: #475569 !important;
    }

    /* 数字资源中心：4 大卡改单列横向列表（左图标+右标题描述），更紧凑美观 */
    .ls-res-grid { grid-template-columns: 1fr !important; gap: 8px !important; }
    .ls-res-card {
        display: flex !important;
        align-items: center !important;
        gap: 13px !important;
        padding: 11px 13px !important;
    }
    .ls-res-card-ico {
        margin: 0 !important;
        flex-shrink: 0;
        width: 38px !important; height: 38px !important;
    }
    .ls-res-card > h3 { margin: 0 0 2px !important; font-size: 14px !important; }
    .ls-res-card > p { font-size: 11px !important; line-height: 1.4 !important; }
    /* 底部入口：统一小胶囊标签，整齐紧凑 */
    .ls-res-quick-list { gap: 7px !important; }
    .ls-res-quick-item {
        font-size: 11px !important;
        padding: 5px 11px !important;
        background: #f1f5f9;
        border-radius: 999px;
        color: #475569 !important;
        line-height: 1.3;
    }
    html.dark-mode .ls-res-quick-item { background: #1e293b !important; color: #cbd5e1 !important; }
}

/* ---------- 17. 手机端页脚：压缩单列堆叠留白 ---------- */
@media (max-width: 639px) {
    footer.bg-white { padding-top: 28px !important; padding-bottom: 18px !important; }
    footer.bg-white > div.max-w-7xl > div.grid {
        gap: 22px !important;
        margin-bottom: 24px !important;
    }
    footer.bg-white h4 { margin-bottom: 12px !important; }
    footer.bg-white ul > li { margin-bottom: 8px !important; }
}

/* ---------- 18. 夜间模式首页配色修正（消除灰蒙蒙不协调）----------
   根因：全局 dark-mode 覆盖了 .bg-white/.bg-gray-50，但未覆盖带透明度的
   .bg-gray-50/50 等斜杠变体，导致首页区块仍是浅灰半透明，与深色 header/卡片
   形成灰白混杂。这里统一把首页各区块背景改为深蓝系，形成协调的深色科技感。 */
html.dark-mode .ls-home-enhance { background: #0b1120 !important; }
html.dark-mode .ls-home-enhance .bg-gray-50\/50 { background-color: #0f172a !important; }
html.dark-mode .ls-home-enhance .bg-white { background-color: #131d2e !important; }

/* 区块切换处用细微色差制造层次，避免整片死黑 */
html.dark-mode .ls-home-enhance > section:nth-of-type(even) { background-color: #0d1526 !important; }

/* 卡片在深色下的边框与文字对比 */
html.dark-mode .ls-home-enhance article,
html.dark-mode .ls-home-enhance .bg-white.rounded-xl,
html.dark-mode .ls-home-enhance .bg-white.rounded-2xl {
    background-color: #16223a !important;
    border-color: #24334c !important;
}
html.dark-mode .ls-home-enhance .text-gray-900 { color: #f1f5f9 !important; }
html.dark-mode .ls-home-enhance .text-gray-800 { color: #e2e8f0 !important; }
html.dark-mode .ls-home-enhance .text-gray-700 { color: #cbd5e1 !important; }
html.dark-mode .ls-home-enhance .text-gray-600 { color: #94a3b8 !important; }
html.dark-mode .ls-home-enhance .text-gray-500 { color: #94a3b8 !important; }

/* 徽标/标签在深色下更清晰 */
html.dark-mode .ls-cf-perk { background-color: #16223a !important; border-color: #24334c !important; }
html.dark-mode .ls-cf-perk span { color: #e2e8f0 !important; }
html.dark-mode .ls-cf-head > span.bg-blue-100 {
    background-color: rgba(59,130,246,.2) !important;
    color: #93c5fd !important;
}

/* 排行榜标签栏在深色下的激活态 */
html.dark-mode .home-rank-tabs { background-color: #131d2e !important; }
html.dark-mode .home-rank-tabs button { color: #94a3b8 !important; }
html.dark-mode .ls-home-enhance .border-gray-100 { border-color: #24334c !important; }
html.dark-mode .ls-home-enhance .border-gray-200 { border-color: #2c3f58 !important; }
html.dark-mode .ls-home-enhance .divide-gray-50 > * + * { border-color: #24334c !important; }

/* ---------- 19. AI 全域获客区块（手机端紧凑横向列表 + 蓝色科技感；2026-11-25 恢复）---------- */
.ls-acq-section { background: linear-gradient(180deg,#f7fbff 0%,#ffffff 100%); }
.ls-acq-head .ls-acq-badge {
    display: inline-block; padding: 5px 16px; border-radius: 999px;
    background: linear-gradient(135deg,#dbeafe,#e0e7ff); color: #1d4ed8;
    font-size: 12px; font-weight: 700; letter-spacing: .12em; margin-bottom: 12px;
}
.ls-acq-title {
    font-size: 25px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
    background: linear-gradient(135deg,#1e3a8a,#2563eb,#0ea5e9);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ls-acq-subtitle { font-size: 13px; color: #64748b; margin-top: 8px; line-height: 1.6; }
.ls-acq-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.ls-acq-card {
    display: flex; flex-direction: column;
    background: #ffffff; border: 1px solid #e6eef8; border-radius: 16px; padding: 18px;
    box-shadow: 0 2px 12px rgba(15,23,42,.04); text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.ls-acq-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(30,64,175,.12); border-color: #bfdbfe; }
.ls-acq-ico {
    width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    color: #fff; margin-bottom: 12px; flex-shrink: 0;
}
.ls-acq-ico svg { width: 22px; height: 22px; }
.ls-acq-card.tone-blue .ls-acq-ico { background: linear-gradient(135deg,#3b82f6,#1d4ed8); }
.ls-acq-card.tone-violet .ls-acq-ico { background: linear-gradient(135deg,#8b5cf6,#6d28d9); }
.ls-acq-card.tone-emerald .ls-acq-ico { background: linear-gradient(135deg,#10b981,#047857); }
.ls-acq-card.tone-amber .ls-acq-ico { background: linear-gradient(135deg,#f59e0b,#b45309); }
.ls-acq-name { font-size: 15px; font-weight: 700; color: #0f172a; margin-bottom: 6px; line-height: 1.35; }
.ls-acq-desc { font-size: 12px; line-height: 1.65; color: #64748b; flex: 1; }
.ls-acq-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 12px; font-weight: 600; color: #2563eb; }
.ls-acq-arrow { transition: transform .2s ease; }
.ls-acq-card:hover .ls-acq-arrow { transform: translateX(4px); }
.ls-acq-cta-wrap { text-align: center; margin-top: 22px; }
.ls-acq-cta {
    display: inline-flex; align-items: center; gap: 6px; padding: 12px 30px; border-radius: 999px;
    background: linear-gradient(135deg,#2563eb,#1d4ed8); color: #fff; font-size: 14px; font-weight: 600;
    text-decoration: none; box-shadow: 0 8px 20px rgba(37,99,235,.28);
    transition: transform .2s ease, box-shadow .2s ease;
}
.ls-acq-cta svg { width: 16px; height: 16px; }
.ls-acq-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(37,99,235,.36); }

@media (min-width: 768px) { .ls-acq-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; } }

/* 手机端：2×2 宫格，APP 入口风格，整齐紧凑 */
@media (max-width: 639px) {
    .ls-acq-section { padding-top: 22px !important; padding-bottom: 22px !important; }
    .ls-acq-title { font-size: 20px; }
    .ls-acq-subtitle { font-size: 12px; }
    .ls-acq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
    .ls-acq-card { flex-direction: column !important; align-items: flex-start !important; gap: 0; padding: 12px 11px; border-radius: 12px; min-height: 112px; }
    .ls-acq-ico { width: 36px; height: 36px; margin-bottom: 9px; border-radius: 10px; }
    .ls-acq-ico svg { width: 18px; height: 18px; }
    .ls-acq-body { flex: 1; min-width: 0; width: 100%; }
    /* 标题允许折行但不出现难看的单字断行，固定两行高度保证四卡对齐 */
    .ls-acq-name { font-size: 12.5px; margin-bottom: 4px; line-height: 1.3; min-height: 2.6em;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    /* 描述固定两行、两端对齐减少右侧参差 */
    .ls-acq-desc {
        font-size: 10.5px; line-height: 1.45; text-align: justify; text-justify: inter-ideograph;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    /* 隐藏"了解详情"文字，整卡可点，只留箭头做点缀 */
    .ls-acq-more { margin-top: 6px; font-size: 11px; }
    .ls-acq-more-text { display: none !important; }
    .ls-acq-arrow { font-size: 14px; }
    .ls-acq-cta-wrap { margin-top: 20px; }
    .ls-acq-cta { padding: 10px 24px; font-size: 13px; }
}

/* 夜间模式适配 */
html.dark-mode .ls-acq-section { background: #0b1120; }
html.dark-mode .ls-acq-card { background: #16223a !important; border-color: #24334c !important; }
html.dark-mode .ls-acq-name { color: #f1f5f9 !important; }
html.dark-mode .ls-acq-desc { color: #94a3b8 !important; }
html.dark-mode .ls-acq-subtitle { color: #94a3b8 !important; }
html.dark-mode .ls-acq-head .ls-acq-badge { background: rgba(59,130,246,.2); color: #93c5fd; }

