/* ==========================================================================
 * 榜单 Hero：纯 CSS 动效背景（无图片）
 * 桌面偏大气；移动端紧凑底对齐
 * ========================================================================== */
.rank-hero {
    --rh-ink: #12151c;
    --rh-a: #ff522b;
    --rh-b: #f0a06a;
    --rh-c: #3d8bfd;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 15rem;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background: var(--rh-ink);
    box-sizing: border-box;
}

.rank-hero--download {
    --rh-a: #ff522b;
    --rh-b: #ffb080;
    --rh-c: #ff7a45;
}

.rank-hero--like {
    --rh-a: #ff6b6b;
    --rh-b: #ffb4a2;
    --rh-c: #e85d4c;
}

.rank-hero--view {
    --rh-a: #3d8bfd;
    --rh-b: #7eb6ff;
    --rh-c: #5a9cf5;
}

.rank-hero-fx {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.rank-hero-base {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 80% at 12% 0%, rgba(255, 255, 255, .06), transparent 55%),
        radial-gradient(90% 70% at 88% 100%, rgba(255, 255, 255, .04), transparent 50%),
        linear-gradient(160deg, #161a22 0%, #10131a 48%, #0e1117 100%);
}

.rank-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: .55;
    will-change: transform;
}

.rank-hero-orb-a {
    width: min(52vw, 28rem);
    height: min(52vw, 28rem);
    top: -18%;
    left: -8%;
    background: radial-gradient(circle, var(--rh-a) 0%, transparent 68%);
    animation: rhOrbA 18s ease-in-out infinite alternate;
}

.rank-hero-orb-b {
    width: min(44vw, 22rem);
    height: min(44vw, 22rem);
    right: -6%;
    bottom: -22%;
    background: radial-gradient(circle, var(--rh-b) 0%, transparent 70%);
    opacity: .4;
    animation: rhOrbB 22s ease-in-out infinite alternate;
}

.rank-hero-orb-c {
    width: min(36vw, 16rem);
    height: min(36vw, 16rem);
    left: 42%;
    top: 18%;
    background: radial-gradient(circle, var(--rh-c) 0%, transparent 72%);
    opacity: .28;
    animation: rhOrbC 16s ease-in-out infinite alternate;
}

.rank-hero-grid {
    position: absolute;
    inset: -20%;
    opacity: .18;
    background-image:
        linear-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .09) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
    animation: rhGrid 28s linear infinite;
}

.rank-hero-sheen {
    position: absolute;
    inset: -40% -20%;
    background: linear-gradient(
        115deg,
        transparent 35%,
        rgba(255, 255, 255, .07) 48%,
        transparent 62%
    );
    animation: rhSheen 9s ease-in-out infinite;
}

.rank-hero-spark {
    position: absolute;
    width: .35rem;
    height: .35rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    box-shadow: 0 0 12px 2px rgba(255, 255, 255, .35);
    opacity: 0;
    animation: rhSpark 5.5s ease-in-out infinite;
}

.rank-hero-spark-1 {
    left: 18%;
    top: 32%;
    animation-delay: 0s;
}

.rank-hero-spark-2 {
    left: 72%;
    top: 28%;
    width: .28rem;
    height: .28rem;
    animation-delay: 1.8s;
}

.rank-hero-spark-3 {
    left: 58%;
    top: 62%;
    width: .22rem;
    height: .22rem;
    animation-delay: 3.2s;
}

@keyframes rhOrbA {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(8%, 10%, 0) scale(1.12); }
}

@keyframes rhOrbB {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-10%, -8%, 0) scale(1.15); }
}

@keyframes rhOrbC {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-6%, 12%, 0) scale(1.2); }
}

@keyframes rhGrid {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(48px, 24px, 0); }
}

@keyframes rhSheen {
    0%, 100% { transform: translate3d(-12%, 0, 0); opacity: .35; }
    50% { transform: translate3d(10%, 0, 0); opacity: .7; }
}

@keyframes rhSpark {
    0%, 100% { opacity: 0; transform: scale(.6); }
    40% { opacity: .9; transform: scale(1); }
    70% { opacity: .2; transform: scale(.85); }
}

.rank-hero-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg,
            rgba(10, 12, 18, .15) 0%,
            rgba(10, 12, 18, .08) 40%,
            rgba(10, 12, 18, .55) 78%,
            rgba(10, 12, 18, .82) 100%);
}

.rank-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 1.75rem;
    text-align: center;
}

.rank-hero-kicker {
    margin: 0 0 .375rem;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .62);
}

.rank-hero-title {
    margin: 0;
    font-size: clamp(1.75rem, 3.2vw, 2.375rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

.rank-hero-desc {
    margin: .5rem 0 0;
    font-size: .9375rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, .82);
}

@media (max-width: 767.98px) {
    .rank-hero {
        /*
         * 移动端：为固定顶栏 + 公告让出文案区，避免标题被导航盖住；
         * 高度略增，让光斑氛围能露出来。
         */
        --rh-nav-clear: 3.75rem; /* ≈ site-navbar 高度 */
        min-height: calc(var(--announcement-height, 0px) + var(--rh-nav-clear) + 8.75rem);
        height: auto;
        align-items: flex-end;
        padding-top: calc(var(--announcement-height, 0px) + var(--rh-nav-clear));
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    /* 减负动效：隐藏网格/光带/闪点，只留两枚光斑，更省电也更干净 */
    .rank-hero-grid,
    .rank-hero-sheen,
    .rank-hero-spark,
    .rank-hero-orb-c {
        display: none;
    }

    .rank-hero-orb {
        filter: blur(28px);
        opacity: .56;
        will-change: auto;
    }

    .rank-hero-orb-a {
        width: 70vw;
        height: 70vw;
        top: -8%;
        left: -22%;
        animation-duration: 14s;
    }

    .rank-hero-orb-b {
        width: 58vw;
        height: 58vw;
        right: -18%;
        bottom: -28%;
        opacity: .42;
        animation-duration: 18s;
    }

    .rank-hero-base {
        background:
            radial-gradient(100% 70% at 80% 0%, rgba(255, 255, 255, .07), transparent 55%),
            linear-gradient(165deg, #171b24 0%, #10131a 55%, #0c0f14 100%);
    }

    .rank-hero-shade {
        background:
            linear-gradient(180deg,
                rgba(10, 12, 18, .35) 0%,
                rgba(10, 12, 18, .12) 32%,
                rgba(10, 12, 18, .2) 52%,
                rgba(10, 12, 18, .72) 100%);
    }

    .rank-hero-inner {
        width: 100%;
        max-width: none;
        padding: .65rem 1rem 1rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .rank-hero-kicker {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .35rem;
        margin: 0 0 .35rem;
        padding: .15rem .5rem;
        border-radius: 999px;
        font-size: .625rem;
        letter-spacing: .1em;
        color: rgba(255, 255, 255, .88);
        background: rgba(255, 255, 255, .1);
        border: 1px solid rgba(255, 255, 255, .12);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }

    .rank-hero-kicker::before {
        content: '';
        width: .35rem;
        height: .35rem;
        border-radius: 50%;
        background: var(--rh-a);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, .14);
    }

    .rank-hero-title {
        font-size: 1.625rem;
        line-height: 1.2;
        letter-spacing: -.03em;
    }

    .rank-hero-desc {
        margin-top: .35rem;
        font-size: .8125rem;
        line-height: 1.45;
        max-width: 18rem;
        color: rgba(255, 255, 255, .78);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-align: center;
    }

    .rank-seg {
        margin: .75rem 0 1rem;
        gap: .5rem;
    }
}

/* 极窄屏再收一点高度，避免首屏被 Hero 吃太多 */
@media (max-width: 359.98px) {
    .rank-hero {
        min-height: calc(var(--announcement-height, 0px) + var(--rh-nav-clear, 3.75rem) + 7.75rem);
    }

    .rank-hero-title {
        font-size: 1.375rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rank-hero-orb,
    .rank-hero-grid,
    .rank-hero-sheen,
    .rank-hero-spark {
        animation: none !important;
    }

    .rank-hero-spark {
        opacity: .35;
    }
}

/* ==========================================================================
 * 榜单分段导航
 * 居中胶囊（主流榜单页做法）+ 年度次要文字链，避免左右拉开造成的贴左感
 * ========================================================================== */
.rank-seg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .625rem;
    margin: 1.125rem 0 1.375rem;
}

.rank-seg-track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .1875rem;
    width: min(100%, 22.5rem);
    padding: .1875rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .05);
    border: 1px solid rgba(15, 23, 42, .06);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04);
}

.rank-seg-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.375rem;
    padding: .375rem .75rem;
    border-radius: 999px;
    border: 0;
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1;
    color: #5b6472 !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color .2s, color .2s, box-shadow .2s, transform .15s;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .rank-seg-item:not(.is-active):hover {
        color: #111827 !important;
        background: rgba(255, 255, 255, .7);
    }
}

.rank-seg-item:active {
    transform: scale(.98);
}

.rank-seg-item.is-active {
    color: #fff !important;
    background: var(--primary, #ff522b);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .18) inset,
        0 8px 18px -10px rgba(255, 82, 43, .9);
}

.rank-seg-item:focus-visible {
    outline: 2px solid rgba(255, 82, 43, .45);
    outline-offset: 2px;
}

/* 年度：独立次要入口，居中压在胶囊下方，不参与主切换权重 */
.rank-seg-annual {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    min-height: 1.75rem;
    padding: .125rem .5rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 500;
    color: #8a93a3 !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: color .2s, background-color .2s;
    -webkit-tap-highlight-color: transparent;
}

.rank-seg-annual::after {
    content: '';
    width: .3125rem;
    height: .3125rem;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: .65;
}

@media (hover: hover) {
    .rank-seg-annual:hover {
        color: #3b4453 !important;
        background: rgba(140, 150, 170, .12);
    }
}

@media (max-width: 575.98px) {
    .rank-seg {
        margin: .875rem 0 1.125rem;
        gap: .5rem;
    }

    .rank-seg-track {
        width: 100%;
        max-width: none;
    }

    .rank-seg-item {
        min-height: 2.5rem;
        padding: .4375rem .5rem;
        font-size: .8125rem;
    }
}

.nice-dark-mode .rank-seg-track {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .08);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25);
}

.nice-dark-mode .rank-seg-item {
    color: rgba(255, 255, 255, .62) !important;
}

@media (hover: hover) {
    .nice-dark-mode .rank-seg-item:not(.is-active):hover {
        color: #fff !important;
        background: rgba(255, 255, 255, .1);
    }
}

.nice-dark-mode .rank-seg-item.is-active {
    color: #fff !important;
    background: var(--primary, #ff522b);
}

.nice-dark-mode .rank-seg-annual {
    color: rgba(255, 255, 255, .42) !important;
}

@media (hover: hover) {
    .nice-dark-mode .rank-seg-annual:hover {
        color: rgba(255, 255, 255, .85) !important;
        background: rgba(255, 255, 255, .08);
    }
}
