/* ===== 营销首页 ===== */
.chm-home {
    margin-top: -16px
}

/* 1. 基础背景：纯净底色 */
.chm-hero {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    padding: 64px 0 56px;
    --mx: 50%;
    --my: 50%;
}

/* 2. 背景底色渐变层：左右绝对一致，从上到下由深到浅 */
.chm-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -150px;
    pointer-events: none;
    /* 使用强调色混合，顶部深、中间过渡、底部完全透明融进背景 */
    background: linear-gradient(
        to bottom,
        color-mix(in srgb, var(--accent) 12%, var(--bg-mid)) 0%,
        var(--bg-mid) 60%,
        transparent 100%
    );
    z-index: 0;
}

/* 3. 装饰层：右上角光晕 + 网格（两者完美融合，并往下渐隐） */
.chm-hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -150px;
    pointer-events: none;
    /* 将光晕和网格叠加在一起 */
    background-image:
        /* 右上角的强调色光晕装饰 */
        radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 45%),
        /* 网格 */
        linear-gradient(color-mix(in srgb, var(--accent) 8%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent) 1px, transparent 1px);
    background-size: 100% 100%, 28px 28px, 28px 28px;
    background-position: center center;
    
    /* 装饰与网格从上往下渐隐 */
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.6) 40%, transparent 85%);
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.6) 40%, transparent 85%);
    z-index: 0;
}

/* 内容层级抬高，避免被背景遮挡 */
.chm-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    gap: 56px;
    align-items: center
}

.chm-hero-inner > * {
    animation: chm-fade-up .7s cubic-bezier(.22, 1, .36, 1) both
}

.chm-hero-inner > *:nth-child(2) {
    animation-delay: .12s
}

@keyframes chm-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px)
    }
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.chm-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--accent-soft);
    color: var(--accent-deep);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .2px;
    box-shadow: 0 2px 10px var(--brand-glow);
    backdrop-filter: blur(4px);
    transition: box-shadow .3s ease, transform .3s ease
}

.chm-badge:hover {
    box-shadow: 0 4px 18px var(--brand-glow);
    transform: translateY(-1px)
}

.chm-badge .chm-badge-new {
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 12px
}

.chm-title {
    margin: 22px 0 0;
    font-size: 44px;
    line-height: 1.28;
    font-weight: 800;
    color: var(--text);
    letter-spacing: .5px
}

.chm-title .chm-ch {
    visibility: hidden
}

.chm-title .chm-ch.on {
    visibility: visible
}

.chm-title .chm-caret {
    display: inline-block;
    width: 3px;
    height: .92em;
    margin-left: 3px;
    border-radius: 2px;
    background: var(--accent);
    vertical-align: -.08em;
    animation: chm-caret-blink .85s steps(1) infinite
}

@keyframes chm-caret-blink {

    0%,
    49% {
        opacity: 1
    }
    50%,
    100% {
        opacity: 0
    }
}

@media (prefers-reduced-motion: reduce) {
    .chm-title .chm-caret {
        animation: none
    }
}

.chm-title .chm-title-hl {
    color: var(--accent);
    background: linear-gradient(120deg, var(--accent) 10%, var(--brand-lite) 55%, color-mix(in srgb, var(--brand-lite) 60%, #fff) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent
}

.chm-desc {
    margin: 20px 0 0;
    max-width: 520px;
    font-size: 15px;
    line-height: 1.9;
    color: var(--muted)
}

.chm-actions {
    display: flex;
    gap: 14px;
    margin-top: 30px;
    flex-wrap: wrap
}

.chm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: .2s;
    position: relative;
    overflow: hidden
}

.chm-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .32) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform .55s ease;
    pointer-events: none
}

.chm-btn:hover::after {
    transform: translateX(120%)
}

.chm-btn:active {
    transform: translateY(0) scale(.98)
}

.chm-btn-primary {
    background: var(--accent);
    color: var(--accent-ink) !important;
    box-shadow: 0 8px 20px var(--brand-glow)
}

.chm-btn-primary:hover {
    background: var(--accent-deep);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px var(--brand-glow)
}

.chm-btn-ghost {
    background: var(--surface);
    color: var(--text) !important;
    border: 1px solid var(--line)
}

.chm-btn-ghost:hover {
    border-color: var(--accent-soft);
    color: var(--accent) !important;
    transform: translateY(-1px)
}

.chm-btn-ghost .chm-arrow {
    transition: transform .2s
}

.chm-btn-ghost:hover .chm-arrow {
    transform: translateX(3px)
}

.chm-stats {
    display: flex;
    gap: 44px;
    margin-top: 44px;
    flex-wrap: wrap
}

.chm-stat {
    transition: transform .25s ease
}

.chm-stat:hover {
    transform: translateY(-3px)
}

.chm-stat-num {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    transition: color .2s ease
}

.chm-stat:hover .chm-stat-num {
    color: var(--accent)
}

.chm-stat-num em {
    font-style: normal;
    color: var(--accent)
}

.chm-stat-label {
    margin-top: 5px;
    font-size: 12.5px;
    color: var(--muted)
}

.chm-panel {
    background: var(--card);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--line);
    transform: perspective(1000px) rotateY(-4deg) rotateX(4deg);
    transition: transform .4s cubic-bezier(.22, 1, .36, 1), box-shadow .4s ease
}

.chm-panel:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
    box-shadow: 0 18px 50px -12px color-mix(in srgb, var(--accent) 18%, transparent), var(--card-shadow-hover)
}

.chm-panel-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line)
}

.chm-dots {
    display: flex;
    gap: 6px
}

.chm-dots i {
    width: 11px;
    height: 11px;
    border-radius: 50%
}

.chm-dots i:nth-child(1) {
    background: #fc5f57
}

.chm-dots i:nth-child(2) {
    background: #febc2e
}

.chm-dots i:nth-child(3) {
    background: #28c840
}

.chm-panel-url {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    background: var(--chip);
    border-radius: 8px;
    padding: 5px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.chm-panel-body {
    padding: 16px 18px 8px
}

.chm-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px
}

.chm-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text)
}

.chm-panel-more {
    font-size: 12.5px;
    color: var(--accent);
    text-decoration: none
}

.chm-panel-more:hover {
    text-decoration: underline
}

.chm-feed {
    list-style: none;
    margin: 0;
    padding: 0
}

.chm-feed li {
    border-bottom: 1px dashed var(--line)
}

.chm-feed li:last-child {
    border-bottom: 0
}

.chm-feed a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 2px;
    text-decoration: none;
    transition: padding-left .25s ease, background .25s ease
}

.chm-feed a:hover {
    padding-left: 6px;
    background: color-mix(in srgb, var(--accent) 5%, transparent);
    border-radius: 8px;
    padding:11px
}

.chm-feed .uc-avatar.chm-feed-av {
    flex-shrink: 0;
    overflow: visible
}

.chm-feed-main {
    flex: 1;
    min-width: 0
}

.chm-feed-title {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.chm-feed a:hover .chm-feed-title {
    color: var(--accent)
}

.chm-feed-meta {
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--muted);
    display: flex;
    gap: 12px
}

.chm-feed-meta i {
    font-size: 12px;
    margin-right: 2px
}

.chm-feed-date {
    flex-shrink: 0;
    font-size: 11.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums
}

.chm-spark {
    padding: 10px 18px 16px
}

.chm-spark svg {
    display: block;
    width: 100%;
    height: 64px
}

.chm-section {
    margin-top: 64px
}

.chm-section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 50px;
}

.chm-section-title {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: .5px;
    position: relative;
    display: inline-block
}

.chm-section-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 0;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
    transform: translateX(-50%);
    transition: width .35s cubic-bezier(.22, 1, .36, 1)
}

.chm-section-head:hover .chm-section-title::after {
    width: 48px
}

.chm-section-desc {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.8;
    color: var(--muted)
}

.chm-feats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px
}

.chm-feat {
    background: var(--card);
    border-radius: 16px;
    padding: 28px 24px;
    border: 1px solid var(--line);
    box-shadow: var(--card-shadow);
    transition: .22s;
    position: relative;
    overflow: hidden
}

.chm-feat:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover)
}

.chm-feat::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background: radial-gradient(320px circle at var(--fx, 50%) var(--fy, 50%), color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%);
    transition: opacity .3s ease
}

.chm-feat:hover::before {
    opacity: 1
}

.chm-feat::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s ease;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent)
}

.chm-feat:hover::after {
    opacity: 1
}

.chm-feat-ico {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), background .25s ease
}

.chm-feat:hover .chm-feat-ico {
    transform: scale(1.08) rotate(-4deg);
    background: color-mix(in srgb, var(--accent) 18%, transparent)
}

.chm-feat-ico i {
    font-size: 23px;
    color: var(--accent);
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1)
}

.chm-feat:hover .chm-feat-ico i {
    transform: scale(1.12)
}

.chm-feat-title {
    margin: 18px 0 0;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text);
    transition: color .2s ease
}

.chm-feat:hover .chm-feat-title {
    color: var(--accent)
}

.chm-feat-desc {
    margin: 9px 0 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--muted)
}

.chm-apps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px
}

.chm-app {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--card-shadow);
    transition: .22s;
    text-decoration: none;
    padding: 15px;
    position: relative
}

.chm-app:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover)
}

.chm-app-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9.6;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: transform .4s cubic-bezier(.22, 1, .36, 1)
}

.chm-app:hover .chm-app-cover {
    transform: scale(1.03)
}

.chm-app-cover-bg {
    position: absolute;
    inset: -26px;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    filter: blur(28px) saturate(1.25);
    transform: scale(1.12)
}

.chm-app-cover img {
    position: relative;
    z-index: 1;
    width: min(26%, 80px);
    aspect-ratio: 1 / 1;
    border-radius: 99px;
    object-fit: contain;
    transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), filter .3s ease
}

.chm-app:hover .chm-app-cover img {
    transform: scale(1.12) rotate(3deg);
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18))
}

.chm-app-cover::after {
    content: "";
    position: absolute;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .28) 50%, transparent 60%);
    transform: translateX(-100%) rotate(8deg);
    transition: transform .65s cubic-bezier(.22, 1, .36, 1);
    pointer-events: none;
    z-index: 2
}

.chm-app:hover .chm-app-cover::after {
    transform: translateX(60%) rotate(8deg)
}

.chm-app-cover-0 {
    background: linear-gradient(135deg, #8b5cf6, #6366f1)
}

.chm-app-cover-1 {
    background: linear-gradient(135deg, #3b82f6, #2563eb)
}

.chm-app-cover-2 {
    background: linear-gradient(135deg, #f59e0b, #f97316)
}

.chm-app-cover-3 {
    background: linear-gradient(135deg, #06b6d4, #0ea5e9)
}

.chm-app-body {
    padding: 13px 0 0
}

.chm-app-titlerow {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0
}

.chm-app-title {
    margin: 0;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .2s ease, transform .25s ease
}

.chm-app:hover .chm-app-title {
    color: var(--accent);
    transform: translateX(2px)
}

.chm-app-tag {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 4px 7px;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    transition: transform .25s ease, background .2s ease
}

.chm-app:hover .chm-app-tag {
    transform: scale(1.06);
    background: var(--accent);
    color: var(--accent-ink)
}

.chm-app-foot {
    margin-top: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.chm-app-ver {
    font-size: 12px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 4px
}

.chm-app-ver i {
    font-size: 13px;
    transition: transform .3s ease
}

.chm-app:hover .chm-app-ver i {
    transform: rotate(-12deg) scale(1.1)
}

.chm-app-price {
    font-size: 12.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums
}

.chm-app-price-free {
    color: var(--success)
}

.chm-app-price-pay {
    color: var(--warning)
}

.chm-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 48px 0;
    color: var(--muted);
    background: var(--card);
    border: 1px dashed var(--line);
    border-radius: 16px;
    font-size: 14px
}

/* 营销首页暗色适配 */
html[data-uc-scheme="dark"] .chm-hero {
    background: var(--bg-mid);
}

html[data-uc-scheme="dark"] .chm-hero::before {
    background: linear-gradient(
        to bottom,
        color-mix(in srgb, var(--accent) 15%, var(--bg-mid)) 0%,
        var(--bg-mid) 60%,
        transparent 100%
    );
}

html[data-uc-scheme="dark"] .chm-hero::after {
    background-image:
        radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--accent) 25%, transparent) 0%, transparent 45%),
        linear-gradient(color-mix(in srgb, var(--accent) 12%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, transparent) 1px, transparent 1px);
}

html[data-uc-scheme="dark"] .chm-badge {
    background: var(--glass);
    border-color: var(--accent-soft)
}

html[data-uc-scheme="dark"] .chm-title,
html[data-uc-scheme="dark"] .chm-section-title,
html[data-uc-scheme="dark"] .chm-panel-title,
html[data-uc-scheme="dark"] .chm-feed-title,
html[data-uc-scheme="dark"] .chm-feat-title,
html[data-uc-scheme="dark"] .chm-app-title {
    color: var(--text)
}

html[data-uc-scheme="dark"] .chm-desc,
html[data-uc-scheme="dark"] .chm-stat-label,
html[data-uc-scheme="dark"] .chm-panel-url,
html[data-uc-scheme="dark"] .chm-feed-meta,
html[data-uc-scheme="dark"] .chm-feed-date,
html[data-uc-scheme="dark"] .chm-section-desc,
html[data-uc-scheme="dark"] .chm-feat-desc,
html[data-uc-scheme="dark"] .chm-app-ver,
html[data-uc-scheme="dark"] .chm-empty {
    color: var(--muted)
}

html[data-uc-scheme="dark"] .chm-btn-ghost {
    background: var(--surface);
    border-color: var(--line);
    color: var(--text) !important
}

html[data-uc-scheme="dark"] .chm-btn-ghost:hover {
    color: var(--accent) !important
}

html[data-uc-scheme="dark"] .chm-stat-num {
    color: var(--text)
}

html[data-uc-scheme="dark"] .chm-panel {
    background: var(--card);
    border-color: var(--line)
}

html[data-uc-scheme="dark"] .chm-feed li {
    border-bottom-color: var(--line)
}

html[data-uc-scheme="dark"] .chm-feat,
html[data-uc-scheme="dark"] .chm-app,
html[data-uc-scheme="dark"] .chm-empty {
    background: var(--card);
    border-color: var(--line)
}

html[data-uc-scheme="dark"] .chm-app-tag {
    background: var(--accent-soft);
    color: var(--accent)
}

html[data-uc-scheme="dark"] .chm-feat::before {
    background: radial-gradient(320px circle at var(--fx, 50%) var(--fy, 50%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%)
}

html[data-uc-scheme="dark"] .chm-feat:hover .chm-feat-ico {
    background: color-mix(in srgb, var(--accent) 24%, transparent)
}

html[data-uc-scheme="dark"] .chm-app-cover::after {
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .16) 50%, transparent 60%)
}

html[data-uc-scheme="dark"] .chm-feed a:hover {
    background: color-mix(in srgb, var(--accent) 8%, transparent)
}

/* 营销首页响应式 */
@media (max-width:1100px) {
    .chm-hero {
        padding: 48px 0 44px
    }
    .chm-hero-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px
    }
    .chm-hero-side {
        min-width: 0
    }
    .chm-feats,
    .chm-apps {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
    .chm-title {
        font-size: 36px
    }
    .chm-panel,
    .chm-panel:hover {
        transform: none
    }
}

@media (max-width:640px) {
    .chm-hero {
        padding: 20px 0
    }
    .chm-title {
        font-size: 29px
    }
    .chm-stats {
        gap: 26px
    }
    .chm-stat-num {
        font-size: 21px
    }
    .chm-feats,
    .chm-apps {
        grid-template-columns: 1fr
    }
    .chm-section {
        margin-top: 44px
    }
    .chm-section-title {
        font-size: 24px
    }
}

/* 减少动态偏好 */
@media (prefers-reduced-motion: reduce) {
    .chm-hero-inner > * {
        animation: none
    }
    .chm-feat::before,
    .chm-feat::after,
    .chm-app-cover::after,
    .chm-btn::after {
        transition: none
    }
    .chm-feat:hover .chm-feat-ico,
    .chm-app:hover .chm-app-cover img,
    .chm-stat:hover {
        transform: none
    }
}