/* page.css — 交互组件样式（本地复刻版）
   列表布局策略：
   - 移动端（默认/大屏以下）：左图右文经典「图文」列表
   - PC 端（≥768px）：多列卡片平铺，视口越宽单行列数越多（minmax 自适应）
   类名与 js/page.js 保持一致，无需改脚本 */

*,
*::before,
*::after {
    box-sizing: border-box;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    /* 全宽热榜区块（负边距外扩）防横向滚动条；clip 不引入滚动容器，sticky 导航不受影响 */
    overflow-x: clip;
}

body.is-modal-open {
    overflow: hidden;
    touch-action: none;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ---------- 视频 ---------- */
.video-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem;
}

.video-shell {
    position: relative;
    width: 100%;
    background: #111;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    max-height: min(70vh, 720px);
}

/* 视频右下角序号角标：本次会话第 N 个（回看时显示该视频当初的序号） */
.video-seq {
    position: absolute;
    right: 10px;
    bottom: 12px;
    z-index: 3;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    line-height: 1.6;
    pointer-events: none;
}

.video-seq[hidden] {
    display: none;
}

#player {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.video-placeholder,
.video-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: #eee;
    background: #1a1a1a;
    font-size: 0.95rem;
    pointer-events: none;
}

.video-placeholder[hidden],
.video-error[hidden] {
    display: none;
}

.video-error {
    color: #ffb4b4;
    background: rgba(26, 26, 26, 0.92);
    pointer-events: auto;
}

.video-error button {
    margin-left: 0.5rem;
}

.video-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem 1rem;
    min-height: 40px;
}

.look-button {
    appearance: none;
    border: 0;
    cursor: pointer;
    line-height: 1.2;
    padding: 0.5rem 0.9rem;
    border-radius: 0.375rem;
    color: #fff;
    background-color: #0060ef;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

.look-button:hover {
    background-color: #004fc4;
}

.look-button:active {
    background-color: #003d99;
    transform: scale(0.97);
}

.look-button:disabled,
.look-button.is-loading {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.jinrirukou {
    line-height: 1;
    padding: 0.375rem 0.625rem;
    border-radius: 200rem;
    color: #fff;
    background-color: #0060ef;
    display: inline-flex;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
}

#p9 {
    font-size: 35px;
    position: relative;
    animation: move 2s ease-in-out infinite;
}

@keyframes move {
    0% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    100% { transform: translateX(-10px); }
}

.hot-status {
    padding: 1rem;
    color: #666;
    text-align: center;
}

.hot-status.is-error {
    color: #c53030;
}

/* ========================================================================
 * 百度式导航：顶栏 + Hero 搜索 + 引擎切换 + 关键词导航 + 热搜词
 * 主色：#4e6ef2（百度蓝）
 * ======================================================================== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid #f0f1f5;
    -webkit-user-select: none;
    user-select: none;
}

.nav-brand {
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #242f40;
    text-decoration: none;
}

.nav-brand span {
    color: #4e6ef2;
    font-size: 13px;
    font-weight: 700;
    vertical-align: super;
    margin-left: 2px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px;
}

.nav-links a {
    color: #555;
    font-size: 14px;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 8px;
    line-height: 1.4;
    white-space: nowrap;
}

.nav-links a:hover {
    color: #4e6ef2;
    background: rgba(78, 110, 242, 0.07);
}

/* ---------- Hero ---------- */
.hero {
    padding: 46px 16px 10px;
    text-align: center;
}

.hero-logo {
    margin: 0;
    font-size: clamp(36px, 6vw, 52px);
    font-weight: 800;
    letter-spacing: 4px;
    color: #242f40;
    line-height: 1.15;
}

.hero-logo span {
    color: #4e6ef2;
}

.hero-logo__sup {
    font-style: normal;
    font-size: 0.42em;
    vertical-align: super;
    color: #4e6ef2;
    margin-left: 8px;
    letter-spacing: 0;
    font-weight: 700;
}

.hero-sub {
    margin: 10px 0 22px;
    font-size: 13.5px;
    color: #9195a3;
}

/* ---------- 搜索条 + 引擎下拉 ---------- */
.nav-search {
    max-width: 620px;
    margin: 0 auto;
}

.engine-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    margin-bottom: 10px;
}

.engine-tabs button {
    border: 0;
    background: transparent;
    color: #666;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.engine-tabs button:hover {
    color: #4e6ef2;
}

.engine-tabs button.is-active {
    color: #4e6ef2;
    background: rgba(78, 110, 242, 0.08);
    font-weight: 600;
}

.nav-search-bar {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    min-height: 50px;
    background: #fff;
    border: 2px solid #dee0ea;
    border-radius: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nav-search-bar:focus-within {
    border-color: #4e6ef2;
    box-shadow: 0 2px 10px rgba(78, 110, 242, 0.14);
}

.engine-drop {
    position: relative;
    flex: 0 0 auto;
    height: 100%;
}

#engine-current {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 46px;
    padding: 0 8px 0 16px;
    border: 0;
    background: transparent;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}

.caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #999;
    transition: transform 0.15s ease;
}

#engine-current[aria-expanded="true"] .caret {
    transform: rotate(180deg);
}

.engine-menu {
    position: absolute;
    top: 52px;
    left: 8px;
    z-index: 600;
    display: none;
    min-width: 176px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e8eaf2;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(30, 40, 70, 0.14);
}

.engine-menu.is-open {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.engine-menu button {
    text-align: left;
    border: 0;
    background: transparent;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}

.engine-menu button:hover {
    background: rgba(78, 110, 242, 0.08);
    color: #4e6ef2;
}

.engine-menu button.is-active {
    color: #4e6ef2;
    font-weight: 600;
}

#nav-search {
    flex: 1;
    min-width: 0;
    height: 46px;
    border: 0;
    outline: none;
    padding: 0 12px 0 6px;
    font-size: 16px;
    color: #333;
    background: transparent;
    -webkit-user-select: text;
    user-select: text;
}

#nav-search:focus {
    outline: none;
    box-shadow: none;
}

#nav-search::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

#nav-go {
    flex: 0 0 auto;
    height: 38px;
    margin: 0 6px;
    padding: 0 22px;
    border: 0;
    border-radius: 9px;
    background: #4e6ef2;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

#nav-go:hover {
    opacity: 0.92;
}

#nav-go:active {
    transform: scale(0.985);
}

/* 分享按钮：复制当前搜索链接（q + e 已写入 URL） */
#nav-share {
    flex: 0 0 auto;
    height: 38px;
    margin: 0 6px 0 0;
    padding: 0 14px;
    border: 1px solid #dee0ea;
    border-radius: 9px;
    background: #fff;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
}

#nav-share:hover {
    color: #4e6ef2;
    border-color: rgba(78, 110, 242, 0.5);
}

#nav-share.is-copied {
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.45);
}

/* ---------- 关键词导航（搜索框下方，PAGE_CONFIG.navKeywords 可配置） ---------- */
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    justify-content: center;
    margin-top: 18px;
}

.quick-links a {
    display: inline-block;
    padding: 5px 12px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    background: #fff;
    border: 1px solid #eceef3;
    border-radius: 999px;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.quick-links a:hover {
    color: #4e6ef2;
    border-color: rgba(78, 110, 242, 0.5);
    background: rgba(78, 110, 242, 0.04);
}

/* ---------- 热门搜索关键词墙 ---------- */
.hot-search {
    margin-top: 22px;
    text-align: left;
}

.hot-search__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.hot-search__title {
    font-size: 13px;
    color: #888;
}

.hot-search__more {
    border: 1px solid #eceef3;
    background: #fff;
    color: #4e6ef2;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.hot-search__more:hover:not(:disabled) {
    border-color: rgba(78, 110, 242, 0.5);
}

.hot-search__more:disabled {
    color: #aaa;
    cursor: default;
    border-color: #eceef3;
}

.hot-search__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    align-content: flex-start;
    /* 随机 5 行裁剪：默认兜底 180px，js/page.js 按实测行高精修 */
    max-height: 180px;
    overflow: hidden;
}

.hot-chip {
    display: inline-block;
    max-width: 220px;
    padding: 6px 12px;
    font-size: 13px;
    color: #333;
    background: #fff;
    border: 1px solid #eceef3;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.hot-chip:hover {
    color: #4e6ef2;
    border-color: rgba(78, 110, 242, 0.5);
    background: rgba(78, 110, 242, 0.04);
}

/* ---------- 今日热搜跑马灯 ---------- */
.hot-keywords {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    max-width: 1200px;
    margin: 10px auto 0;
    padding: 0 12px;
}

.hot-keywords__label {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 700;
    color: #e53e3e;
    white-space: nowrap;
}

.hot-keywords__label::before {
    content: '🔥';
    font-size: 14px;
}

.hot-keywords__viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.hot-keywords__track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: hot-keywords-scroll 24s linear infinite;
    will-change: transform;
}

@keyframes hot-keywords-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* 悬停 / 键盘聚焦时暂停滚动，方便点击 */
.hot-keywords__viewport:hover .hot-keywords__track,
.hot-keywords__track:focus-within {
    animation-play-state: paused;
}

.hot-keywords button {
    flex: 0 0 auto;
    max-width: 300px;
    margin-right: 14px;
    padding: 0;
    font-size: 13px;
    color: #444;
    background: none;
    border: 0;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 40px;
    transition: color 0.15s ease;
}

.hot-keywords button:hover {
    color: #4e6ef2;
}

.hot-keywords__rank {
    display: inline-block;
    margin-right: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #9aa0a6;
}

.hot-keywords__rank.is-top {
    color: #e53e3e;
}

@media (prefers-reduced-motion: reduce) {
    .hot-keywords__track {
        animation: none;
    }

    .hot-keywords__viewport {
        overflow-x: auto;
        -webkit-mask-image: none;
                mask-image: none;
    }
}

/* ---------- 视频 / 名片弹窗宽高 ---------- */
.g-modal--video .detail-modal__panel {
    /* 宽度跟随视频宽高比：默认按竖屏 9:16 计算（源视频以手机竖拍为主），
       避免默认横屏壳把竖屏视频挤成中间一小条。
       --v-panel-w 由 js/page.js 依据视频元数据计算注入（横屏会显式给回 940px） */
    width: min(96%, var(--v-panel-w, calc(min(78vh, 800px) * 0.5625 + 40px)));
}

.g-modal--video .detail-modal__scroll--flush {
    padding: 0;
}

.g-modal--video .video-shell {
    /* 视频元数据到位后，js/page.js 写入 --v-aspect(-num)，壳子跟随视频本身比例；
       默认竖屏 9:16，高度封顶 78vh：竖屏视频撑满高度，壳内零黑边 */
    aspect-ratio: var(--v-aspect, 0.5625);
    max-height: min(78vh, 800px);
    width: min(100%, calc(min(78vh, 800px) * var(--v-aspect-num, 0.5625)));
    margin: 0 auto;
}

.g-modal--video .detail-modal__footer .look-button {
    flex: 0 1 auto;
    min-width: 84px;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    font-size: 13px;
    white-space: nowrap;
}

.g-modal--video .look-button:disabled {
    opacity: 0.45;
    cursor: default;
}

.g-modal--contact .detail-modal__panel {
    width: min(100%, 430px);
}

.contact-modal__scroll {
    padding: 1.1rem 1rem 0.4rem;
}

.contact-note {
    margin: 0.5rem 0.4rem 0.9rem;
    font-size: 0.88rem;
    color: #666;
    line-height: 1.7;
    text-align: center;
}

/* ---------- TopHub 列表 ---------- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tophub-card {
    text-align: center;
}

.tophub-card .title {
    text-align: center;
}

.tophub-meta {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin: 0.25rem auto 0.75rem;
    padding: 0 0.5rem;
}

.tophub-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    max-width: 900px;
    margin: 0 auto 0.85rem;
    padding: 0 0.5rem;
}

.tophub-search-wrap {
    flex: 1 1 220px;
    max-width: 420px;
}

.tophub-search {
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0.9rem;
    border: 1px solid #d8d8d8;
    border-radius: 999px;
    font-size: 0.95rem;
    outline: none;
    background: #fff;
    -webkit-user-select: text;
    user-select: text;
}

.tophub-search:focus {
    border-color: #0060ef;
    box-shadow: 0 0 0 3px rgba(0, 96, 239, 0.12);
}

.tophub-size-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #666;
}

.tophub-page-size {
    min-height: 40px;
    padding: 0.35rem 0.5rem;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #fff;
    font-size: 0.9rem;
}

/*
 * 移动端（默认）：左图右文经典图文列表
 * 结构：article.tophub-item > span.tophub-rank + img.tophub-thumb + .tophub-body
 */
.tophub-list {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
    padding: 0 0.35rem;
}

.tophub-item {
    position: relative;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    padding: 0.75rem 0.7rem;
    margin: 0 0 0.6rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
    text-align: left;
}

.tophub-item:hover,
.tophub-item:focus-visible {
    background-color: rgba(0, 96, 239, 0.03);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    outline: none;
}

.tophub-item:active {
    background-color: rgba(0, 96, 239, 0.06);
    transform: scale(0.995);
}

/* 无图条目：序号列 + 文本列（纯文字，不要中间空档） */
.tophub-item--no-image {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
}

/* 序号：横版时压在缩略图左上角；无图条目走文档流，与文字并列 */
.tophub-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.78rem;
    color: #fff;
    background: #9aa0a6;
    line-height: 1;
}

.tophub-item--has-image .tophub-rank {
    position: absolute;
    top: 0.85rem;
    left: 0.8rem;   /* 与卡片内边距对齐，贴合缩略图左上角 */
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.tophub-item--no-image .tophub-rank {
    margin-top: 0.05rem;
}

.tophub-rank.is-top {
    background: #e53e3e;
}

.tophub-thumb {
    display: block;
    width: 104px;
    height: 68px;
    border-radius: 10px;
    object-fit: cover;
    object-position: center;
    background: #111;
}

.tophub-item--no-image .tophub-thumb {
    display: none;
}

.tophub-body {
    min-width: 0;
}

.tophub-title {
    font-size: 0.95rem;
    line-height: 1.45;
    margin: 0 0 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
    word-break: break-word;
}

.tophub-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.25rem 0.6rem;
    font-size: 0.75rem;
    color: #888;
}

.tophub-site {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.tophub-logo {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    flex: 0 0 auto;
}

/*
 * PC 端（≥768px）：多列卡片平铺 —— 视口越宽，单行列数越多；
 * 1920 宽约 5 列、1440 约 4 列、1024 约 3 列、768 约 2 列。
 */
@media (min-width: 768px) {
    .tophub-list {
        max-width: 1200px;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
        gap: 0.75rem;
        padding: 0 0.5rem;
    }

    .tophub-list-outer {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 0.5rem;
    }

    .tophub-item {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        margin: 0;
        overflow: hidden;          /* 卡片圆角裁切图片 */
    }

    .tophub-item--no-image {
        display: flex;
        flex-direction: column;
    }

    /* 序号统一改为压图样式（无图条目改走文档流顶部） */
    .tophub-item--has-image .tophub-rank {
        top: 0.6rem;
        left: 0.6rem;
    }

    .tophub-item--no-image .tophub-rank {
        margin: 0.65rem 0 0 0.75rem;
        align-self: flex-start;
    }

    .tophub-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        max-height: 180px;
        border-radius: 0;
    }

    .tophub-body {
        padding: 0.6rem 0.75rem 0.7rem;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .tophub-title {
        font-size: 0.92rem;
        line-height: 1.5;
        -webkit-line-clamp: 3;
        margin: 0 0 0.4rem;
        flex: 1;
        min-height: 3.6em;         /* 卡片高度接近时标题区对齐 */
    }

    .tophub-foot {
        font-size: 0.72rem;
        justify-content: flex-start;
    }
}

/* 大屏（≥1024px）：热榜区块跳出 1200 版心，列表全宽平铺（有多少列铺多少列） */
@media (min-width: 1024px) {
    .tophub-card {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }

    .tophub-list {
        max-width: none;
        padding: 0 16px;
    }
}

.tophub-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    max-width: 720px;
    margin: 0.85rem auto 0.25rem;
    padding: 0 0.5rem 0.5rem;
}

.tophub-pager[hidden] {
    display: none !important;
}

.tophub-pager__btn {
    appearance: none;
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #222;
    min-width: 40px;
    min-height: 40px;
    padding: 0.35rem 0.7rem;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
}

.tophub-pager__btn:hover:not(:disabled) {
    border-color: #0060ef;
    color: #0060ef;
}

.tophub-pager__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tophub-pager__btn.is-active {
    background: #0060ef;
    border-color: #0060ef;
    color: #fff;
}

.tophub-pager__info {
    width: 100%;
    text-align: center;
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 0.25rem;
}

/* ---------- 下拉无限加载 sentinel ---------- */
.tophub-sentinel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    max-width: 900px;
    margin: 0.35rem auto 0.85rem;
    padding: 0.7rem 0.5rem;
    font-size: 0.85rem;
    color: #888;
}

.tophub-sentinel[hidden] {
    display: none !important;
}

.tophub-sentinel.is-done {
    color: #aaa;
}

.sentinel-spinner {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    border: 2px solid rgba(78, 110, 242, 0.25);
    border-top-color: #4e6ef2;
    border-radius: 50%;
    animation: sentinelSpin 0.8s linear infinite;
}

@keyframes sentinelSpin {
    to { transform: rotate(360deg); }
}

/* ---------- 静态热榜预读块（SEO） ---------- */
.tophub-static {
    max-width: 900px;
    margin: 0 auto 0.85rem;
    padding: 0 0.5rem;
    border: 1px dashed rgba(0, 96, 239, 0.25);
    border-radius: 14px;
    background: #fafbfc;
    text-align: left;
}

.tophub-static h4 {
    margin: 0;
    padding: 0.7rem 0.9rem 0.35rem;
    font-size: 0.92rem;
    color: #111;
}

.tophub-static__list {
    margin: 0;
    padding: 0.15rem 0.9rem 0.85rem 2rem;
    font-size: 0.85rem;
    line-height: 1.85;
    color: #444;
}

/* JS 加载数据成功后即隐藏该静态块，避免与动态列表重复 */
.tophub-static[data-loaded="true"],
body.is-list-loaded .tophub-static {
    display: none;
}

/* ---------- 详情弹窗 ---------- */
.detail-modal[hidden] {
    display: none !important;
}

.detail-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(0.75rem, env(safe-area-inset-top, 0px))
             max(0.75rem, env(safe-area-inset-right, 0px))
             max(0.75rem, env(safe-area-inset-bottom, 0px))
             max(0.75rem, env(safe-area-inset-left, 0px));
}

.detail-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    animation: fadeIn 0.2s ease;
}

.detail-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 720px);
    max-height: min(92vh, 900px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
    animation: fadeIn 0.22s ease;
    overflow: hidden;
}

.detail-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem 0.7rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    position: relative;
}

.detail-modal__heading {
    flex: 1;
    margin: 0;
    padding-right: 2.5rem;
    font-size: 1.05rem;
    line-height: 1.45;
    text-align: center;
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.detail-modal__close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #f2f2f2;
    color: #333;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.detail-modal__close:active {
    background: #e4e4e4;
    transform: scale(0.96);
}

.detail-modal__scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    text-align: center;
}

.detail-modal__cover-wrap {
    margin: 0;
    padding: 0;
    width: 100%;
    background: #0f0f0f;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-modal__cover-wrap[hidden] {
    display: none !important;
}

.detail-modal__cover {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(52vh, 480px);
    object-fit: contain;
    object-position: center;
    background: #0f0f0f;
    margin: 0 auto;
}

.detail-modal__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 0.85rem;
    padding: 0.85rem 1rem 0;
    font-size: 0.82rem;
    color: #888;
    text-align: center;
}

.detail-modal__desc {
    padding: 0.85rem 1rem 1rem;
    margin: 0 auto;
    max-width: 42rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: center;
}

.detail-modal__footer {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    background: #fff;
}

.detail-modal__footer .look-button {
    flex: 1;
    min-height: 44px;
    text-decoration: none;
}

.detail-modal__footer .look-button.is-ghost {
    background: #f2f2f2;
    color: #222;
}

.detail-modal__footer .look-button.is-ghost:hover {
    background: #e8e8e8;
}

/* ---------- 广告位（预留 JS 管理） ---------- */
.detail-ad {
    margin: 0.75rem 1rem;
    border-radius: 10px;
    overflow: hidden;
    background: #f7f8fa;
    border: 1px dashed rgba(0, 96, 239, 0.25);
}

.detail-ad__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: inherit;
    min-height: 72px;
}

.detail-ad__badge {
    flex: 0 0 auto;
    font-size: 0.7rem;
    color: #999;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 0.1rem 0.3rem;
}

.detail-ad__content {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.detail-ad__title {
    margin: 0 0 0.2rem;
    font-size: 0.92rem;
    color: #111;
    font-weight: 600;
}

.detail-ad__desc {
    margin: 0;
    font-size: 0.8rem;
    color: #888;
    line-height: 1.4;
}

.detail-ad__img {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: #e8e8e8;
}

.detail-ad.is-empty {
    display: none;
}

/* ---------- SEO 辅助区块 ---------- */
.seo-guide,
.seo-faq {
    text-align: left;
    margin-bottom: 1.5rem;
}

.seo-guide__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
    margin: 0 5px;
}

.seo-guide__card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: #fff;
}

.seo-guide__card h3 {
    font-size: 0.95rem;
    margin: 0 0 0.45rem;
    color: #111;
}

.seo-guide__card p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: #555;
    margin: 0;
    text-align: left;
}

.seo-faq details {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    background: #fff;
    padding: 0.65rem 0.9rem;
    margin: 0 5px 0.6rem;
}

.seo-faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: #111;
    line-height: 1.5;
    text-align: left;
}

.seo-faq details[open] summary {
    margin-bottom: 0.35rem;
}

.seo-faq details p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.75;
    color: #555;
    text-align: left;
}

/* ---------- 关于我们弹窗 ---------- */
.g-modal--about .detail-modal__panel {
    width: min(100%, 620px);
}

.about-modal__scroll {
    padding: 1.1rem 1.2rem 0.4rem;
    text-align: left;
}

.about-intro {
    margin: 0 0 1.1rem;
    padding: 0.75rem 0.95rem;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.8;
    background: #f7f8fc;
    border-radius: 12px;
}

.about-sec {
    margin-bottom: 1.35rem;
}

.about-sec__title {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
    color: #242f40;
}

.about-more-link {
    margin: 0.2rem 0 0.9rem;
    padding-left: 5px;
    font-size: 0.88rem;
    color: #555;
}

.about-more-link a {
    color: #4e6ef2;
    text-decoration: none;
    font-weight: 600;
}

.about-more-link a:hover {
    text-decoration: underline;
}

/* ---------- 响应式 ---------- */
@media (max-width: 767px) {
    .site-nav {
        padding: 0 10px;
        min-height: 48px;
    }

    .nav-brand {
        font-size: 16px;
    }

    .nav-links a {
        font-size: 13px;
        padding: 4px 6px;
    }

    .hero {
        padding: 30px 12px 8px;
    }

    .hero-sub {
        margin-bottom: 16px;
    }

    .nav-search-bar {
        min-height: 46px;
        border-radius: 10px;
    }

    #engine-current {
        height: 42px;
        padding-left: 12px;
    }

    #nav-search {
        height: 42px;
    }

    #nav-go {
        height: 34px;
        padding: 0 14px;
        font-size: 14px;
    }

    .engine-menu.is-open {
        grid-template-columns: 1fr;
        left: 4px;
    }

    .quick-links {
        margin-top: 14px;
        gap: 6px;
    }

    .quick-links a {
        padding: 4px 10px;
        font-size: 12px;
    }

    .hot-keywords button {
        max-width: 250px;
        font-size: 12px;
    }

    .g-modal--video .detail-modal {
        padding: 0;
    }

    .g-modal--video .detail-modal__panel {
        /* 移动端整屏播放：面板铺满全屏（dvh 兼容地址栏伸缩），
           视频区域占满头部与底部控制条之间的全部空间 */
        width: 100%;
        max-width: none;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .g-modal--video .detail-modal__header {
        padding: 0.35rem 0.9rem;
    }

    .g-modal--video .detail-modal__scroll--flush {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 0;
        padding: 0;
    }

    .g-modal--video .video-shell {
        width: 100%;
        height: 100%;
        max-height: none;
        aspect-ratio: auto;
    }

    .g-modal--video .detail-modal__footer {
        padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    }

    /* 四个按钮一行放下，给视频区让出高度 */
    .g-modal--video .detail-modal__footer .look-button {
        flex: 1 1 0;
        min-width: 0;
        min-height: 40px;
        padding: 0.4rem 0.2rem;
        font-size: 12.5px;
    }

    #p9 {
        font-size: 24px;
    }

    .video-shell {
        max-height: min(56vh, 480px);
    }

    .video-controls {
        justify-content: center;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .look-button {
        flex: 1 1 auto;
        min-width: 30%;
        padding: 0.65rem 0.75rem;
        min-height: 44px;
    }

    .detail-modal {
        padding: max(0.5rem, env(safe-area-inset-top, 0px))
                 0.65rem
                 max(0.5rem, env(safe-area-inset-bottom, 0px));
    }

    .detail-modal__panel {
        width: 100%;
        max-height: min(94vh, 100%);
        border-radius: 18px;
    }

    .detail-modal__heading {
        font-size: 1.02rem;
        padding: 0 2.75rem;
        text-align: center;
    }

    .detail-modal__cover-wrap {
        min-height: 42vw;
    }

    .detail-modal__cover {
        max-height: min(58vh, 560px);
        width: 100%;
    }

    .detail-ad {
        margin-left: 0.75rem;
        margin-right: 0.75rem;
    }

    .detail-ad__link {
        justify-content: center;
        text-align: center;
    }

    .detail-ad__content {
        text-align: center;
    }
}

@media (max-width: 420px) {
    /* 小屏手机：窄一点缩略图，标题空间更大 */
    .tophub-item {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 0.55rem;
        padding: 0.65rem 0.6rem;
    }

    .tophub-item--has-image .tophub-rank {
        top: 0.75rem;
        left: 0.7rem;
    }

    .tophub-thumb {
        width: 88px;
        height: 58px;
    }

    .tophub-title {
        font-size: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
