/* --- 全局重置 --- */
:root {
    --primary-color: #2563eb;
    --bg-color: #f8fafc;
    /* 更干净的蓝灰背景 */
    --white: #ffffff;
    --text-main: #1f2937;
    --text-sub: #6b7280;
    --badge-red: #ef4444;
    --badge-orange: #f97316;
    --badge-yellow: #eab308;
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* 移动端底部留白 */
    padding-bottom: 80px;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- 顶部通知 --- */
.top-notice {
    background-color:  #2563eb;
    color: white;
    text-align: center;
    padding: 12px;
    font-size: 13px;
    position: relative;
}
.top-notice:hover {
    background-color: #1d4ed8;
}

.top-notice .close-btn {
    position: absolute;
    right: 15px;
    top: 8px;
    cursor: pointer;
    opacity: 0.8;
}

.top-notice .close-btn:hover {
    opacity: 1;
}

/* --- 头部 Header --- */
.main-header {
    background: var(--white);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    /*以此居中内部容器*/
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Header 内部容器，用于控制宽度 */
.header-inner {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 20px;
    color: #111;
}

.logo-icon {
    font-size: 26px;
    margin-right: 8px;
    color: #111;
}

/* 桌面导航 */
.desktop-nav {
    display: none;
}

.desktop-nav a {
    margin-left: 30px;
    font-size: 15px;
    color: var(--text-main);
    font-weight: 500;
    position: relative;
}

.desktop-nav a:hover {
    color: var(--primary-color);
}

.desktop-nav a.active {
    color: var(--primary-color);
}

/* 简单的下划线动画 */
.desktop-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
}

.mobile-menu-btn {
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

/* --- 主容器布局 --- */
.container {
    width: 100%;
    max-width: 1200px;
    /* 电脑端核心宽度，避免太宽 */
    margin: 0 auto;
    padding: 20px 16px;
}

/* --- 首页可配置广告栏 --- */
.home-ad-banner {
    position: relative;
    min-height: 32px;
    margin: 0 0 18px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #fbfdff 10%,
        #f4f8ff 20%,
        #eaf3ff 30%,
        #dbeafe 42%,
        #bfdbfe 50%,
        #dbeafe 58%,
        #eaf3ff 70%,
        #f4f8ff 80%,
        #fbfdff 90%,
        #ffffff 100%
    );
    color: #4f46e5;
    display: flex;
    align-items: center;
    box-shadow: none;
    box-sizing: border-box;
}

.home-ad-banner:hover {
    color: #4f46e5;
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #fbfdff 10%,
        #f4f8ff 20%,
        #eaf3ff 30%,
        #dbeafe 42%,
        #bfdbfe 50%,
        #dbeafe 58%,
        #eaf3ff 70%,
        #f4f8ff 80%,
        #fbfdff 90%,
        #ffffff 100%
    );
}

.home-ad-marquee {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    height: 32px;
    display: flex;
    align-items: center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.5) 6%, #000 12%, #000 88%, rgba(0, 0, 0, 0.5) 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.5) 6%, #000 12%, #000 88%, rgba(0, 0, 0, 0.5) 94%, transparent 100%);
}

.home-ad-marquee-track {
    width: max-content;
    display: flex;
    align-items: center;
    will-change: transform;
    animation: home-ad-scroll 16s linear infinite;
}

.home-ad-message {
    min-width: min(1100px, calc(100vw - 32px));
    padding: 0 30px;
    box-sizing: border-box;
    white-space: nowrap;
    color: #3730a3;
    background: linear-gradient(90deg, #1d4ed8 0%, #4338ca 48%, #6b21a8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.15px;
    text-shadow: none;
}

.home-ad-message i {
    display: none;
}

@keyframes home-ad-scroll {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

.home-ad-banner + .hero-section {
    margin-top: 18px;
}

@media (prefers-reduced-motion: reduce) {
    .home-ad-marquee-track {
        animation: none;
    }
    .home-ad-message + .home-ad-message {
        display: none;
    }
}

/* --- Hero 搜索区 --- */
.hero-section {
    text-align: center;
    margin: 30px 0 40px 0;
}

.hero-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 25px;
    color: #1f2937;
}

.search-wrapper {
    max-width: 680px;
    /* 搜索框限宽 */
    margin: 0 auto;
}

.search-box {
    display: flex;
    background: var(--white);
    border-radius: 50px;
    padding: 5px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.1);
    /* 蓝色调投影 */
    transition: box-shadow 0.3s;
}

.search-box:focus-within {
    box-shadow: 0 10px 30px -5px rgba(37, 99, 235, 0.2);
    border-color: #bfdbfe;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 24px;
    font-size: 15px;
    color: #333;
}

.search-box button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background-color: #1d4ed8;
}

/* --- 热门标签 (桌面端风格) --- */
.hot-tags-wrapper {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    align-items: center;
}

.hot-label {
    color: var(--text-sub);
    margin-right: 5px;
    font-weight: 500;
}

.desktop-tag {
    background: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.desktop-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.desktop-tag .rank-dot {
    width: 14px;
    height: 14px;
    background: #e5e7eb;
    color: #fff;
    border-radius: 3px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
}

/* 前三名颜色 */
.desktop-tag:nth-child(2) .rank-dot {
    background: var(--badge-red);
}

.desktop-tag:nth-child(3) .rank-dot {
    background: var(--badge-orange);
}

.desktop-tag:nth-child(4) .rank-dot {
    background: var(--badge-yellow);
}

/* --- 通用卡片样式 --- */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
}

/* --- 每日更新 --- */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.tab-group {
    display: flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
}

.tab-btn {
    padding: 6px 18px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    color: #64748b;
    font-weight: 500;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.rank-list-item {
    display: flex;
    align-items: center;
    padding: 14px 10px;
    border-radius: 8px;
    transition: background 0.2s;
    cursor: pointer;
}

.rank-list-item:hover {
    background-color: #f8fafc;
}

.rank-num {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.rank-list-item:nth-child(1) .rank-num {
    background: var(--badge-red);
    color: white;
}

.rank-list-item:nth-child(2) .rank-num {
    background: var(--badge-orange);
    color: white;
}

.rank-list-item:nth-child(3) .rank-num {
    background: var(--badge-yellow);
    color: white;
}

.item-title {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #334155;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.item-status {
    font-size: 13px;
    color: var(--primary-color);
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 4px;
}

/* --- 首页热门榜单 --- */
.home-hot-section {
    padding: 24px;
}

.home-hot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

.home-hot-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.home-hot-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(145deg, #fff1e9, #fff8f2);
    font-size: 23px;
}

.home-hot-title-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.home-hot-title-row h3 {
    color: #1f2937;
    font-size: 22px;
    line-height: 1.25;
}

.home-hot-title-row span,
.home-hot-heading p {
    color: #94a3b8;
    font-size: 12px;
}

.home-hot-heading p {
    margin-top: 4px;
}

.home-hot-all-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 13px;
    border-radius: 10px;
    color: var(--primary-color);
    background: #eff6ff;
    font-size: 13px;
    font-weight: 600;
}

.home-hot-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 18px;
}

.home-hot-tab {
    min-width: 104px;
    padding: 9px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #64748b;
    background: #f8fafc;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: transform .2s, color .2s, background .2s, box-shadow .2s;
}

.home-hot-tab:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.home-hot-tab:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .18);
    outline-offset: 2px;
}

.home-hot-tab.active {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #526af5 0%, #20c5cf 100%);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}

.home-hot-status {
    padding: 42px 0 24px;
    color: #94a3b8;
    text-align: center;
    font-size: 13px;
}

.home-hot-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 16px 12px;
    padding-top: 18px;
}

.home-hot-card {
    min-width: 0;
    color: inherit;
}

.home-hot-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    background: linear-gradient(145deg, #e8edf5, #f7f9fc);
    box-shadow: 0 7px 18px rgba(30, 55, 95, .08);
    transform: translateZ(0);
}

.home-hot-poster::after {
    content: "";
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    left: 0;
    height: 32%;
    background: linear-gradient(to top, rgba(7, 16, 31, .46), transparent);
    pointer-events: none;
}

.home-hot-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.home-hot-card:hover .home-hot-poster img {
    transform: scale(1.045);
}

.home-hot-poster.is-fallback {
    display: grid;
    place-items: center;
    padding: 12px;
}

.home-hot-fallback {
    color: #94a3b8;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
}

.home-hot-rank,
.home-hot-score {
    position: absolute;
    z-index: 2;
    top: 8px;
    display: grid;
    place-items: center;
    min-width: 27px;
    height: 27px;
    padding: 0 7px;
    border-radius: 8px;
    color: #fff;
    background: rgba(18, 28, 47, .78);
    backdrop-filter: blur(8px);
    font-size: 11px;
    font-weight: 800;
}

.home-hot-rank { left: 8px; }
.home-hot-score { right: 8px; color: #463300; background: #ffd66b; }
.home-hot-card:nth-child(1) .home-hot-rank { background: var(--badge-red); }
.home-hot-card:nth-child(2) .home-hot-rank { background: var(--badge-orange); }
.home-hot-card:nth-child(3) .home-hot-rank { background: var(--badge-yellow); }

.home-hot-card-title {
    overflow: hidden;
    margin-top: 9px;
    color: #263247;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
}

.home-hot-card-meta {
    overflow: hidden;
    margin-top: 4px;
    color: #9aa4b5;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

@media (max-width: 991px) {
    .home-hot-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* --- 底部功能入口 (Grid) --- */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.feature-card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #f1f5f9;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

/* 电脑端悬停浮动效果 */
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
    border-color: transparent;
}

.feature-left {
    display: flex;
    align-items: center;
}

.feature-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    font-size: 22px;
    flex-shrink: 0;
}

.bg-blue-light {
    background: #eff6ff;
    color: #3b82f6;
}

.bg-purple-light {
    background: #f3e8ff;
    color: #a855f7;
}

.bg-orange-light {
    background: #fff7ed;
    color: #f97316;
}

.bg-green-light {
    background: #ecfdf5;
    color: #10b981;
}

.feature-text h4 {
    font-size: 15px;
    margin-bottom: 4px;
    font-weight: 600;
}

.feature-text p {
    font-size: 12px;
    color: var(--text-sub);
}

.arrow-icon {
    color: #cbd5e1;
}

/* --- 底部导航 & FAB (Mobile) --- */
.mobile-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    border-top: 1px solid #e5e7eb;
    z-index: 1000;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #9ca3af;
    font-size: 10px;
    cursor: pointer;
}

.tab-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.tab-item.active {
    color: var(--primary-color);
}

.fab-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background-color: #22c55e;
    color: white;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 20px;
}
.fab-btn p{
    font-size: 12px;
}

/* =========================================
           重点：电脑端适配 (Responsive Desktop)
           ========================================= */
@media (min-width: 992px) {
    body {
        padding-bottom: 0;
        background-color: #f3f6f9;
        /* 电脑端背景稍微深一点点，突出白色卡片 */
    }

    /* 隐藏移动端组件 */
    .mobile-menu-btn {
        display: none;
    }

    .mobile-tab-bar {
        display: none;
    }

    .fab-btn {
        bottom: 40px;
        right: 40px;
        cursor: pointer;
        transition: transform 0.2s;
    }

    .fab-btn:hover {
        transform: scale(1.1);
    }

    /* 显示桌面端组件 */
    .desktop-nav {
        display: flex;
    }

    /* 调整 Hero 区域大小 */
    .hero-section {
        margin-top: 60px;
        margin-bottom: 60px;
    }

    .hero-title {
        font-size: 32px;
        margin-bottom: 30px;
        letter-spacing: -0.5px;
    }

    .search-box {
        padding: 8px;
    }

    .search-box input {
        font-size: 16px;
    }

    .search-box button {
        padding: 0 40px;
        font-size: 16px;
    }

    /* 调整卡片容器 */
    .card {
        padding: 30px;
    }

    /* 重点：底部四个功能入口变为一行四列 */
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    /* 调整列表项使其更宽阔 */
    .rank-list-item {
        padding: 16px 20px;
    }

    .item-title {
        font-size: 16px;
    }

}

/* 手机端 */
@media (max-width: 767px) {
    .hero-section {
        margin-bottom: 18px;
    }
    .home-ad-banner {
        min-height: 30px;
        margin-bottom: 16px;
    }
    .home-ad-marquee {
        height: 30px;
        margin: 0;
    }
    .home-ad-marquee-track {
        animation-duration: 14s;
    }
    .home-ad-message {
        min-width: calc(100vw - 32px);
        padding: 0 26px;
        font-size: 12.5px;
    }
    .home-ad-banner + .hero-section {
        margin-top: 14px;
    }
    .search-box{
        overflow: hidden !important;
        position: relative;
    }
    .search-box button{
        position: absolute;
        height: 80%;
        right: 2%;
        top: 50%;
        transform: translateY(-50%);
        /* padding-top: 10px;
        padding-bottom: 10px; */
    }
    .home-hot-section {
        padding: 20px 15px 26px;
    }
    .home-hot-header {
        align-items: flex-start;
        gap: 10px;
        padding-bottom: 16px;
    }
    .home-hot-icon {
        width: 39px;
        height: 39px;
        border-radius: 11px;
        font-size: 21px;
    }
    .home-hot-title-row {
        display: block;
    }
    .home-hot-title-row h3 {
        font-size: 20px;
    }
    .home-hot-title-row span {
        display: block;
        margin-top: 2px;
    }
    .home-hot-heading p {
        display: none;
    }
    .home-hot-all-link {
        padding: 8px 9px;
        font-size: 11px;
    }
    .home-hot-tabs {
        gap: 8px;
        padding-top: 15px;
    }
    .home-hot-tab {
        flex: 1;
        min-width: 0;
        padding: 8px 6px;
        font-size: 12px;
    }
    .home-hot-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 15px 9px;
        padding-top: 15px;
    }
    .home-hot-poster {
        border-radius: 10px;
        box-shadow: 0 5px 13px rgba(30, 55, 95, .08);
    }
    .home-hot-rank,
    .home-hot-score {
        top: 6px;
        min-width: 24px;
        height: 24px;
        padding: 0 5px;
        border-radius: 7px;
        font-size: 10px;
    }
    .home-hot-rank { left: 6px; }
    .home-hot-score { right: 6px; }
    .home-hot-card-title {
        margin-top: 7px;
        font-size: 12px;
    }
    .home-hot-card-meta {
        margin-top: 3px;
        font-size: 10px;
    }
}

