/* 首页：保留悬浮胶囊 + 压缩首屏 + 站内蓝系配色 */

.page-home {
    --bp-ink: #1f2d3d;
    --bp-muted: #6b7c8f;
    --bp-blue: #1890ff;
    --bp-blue-deep: #0f6fd8;
    --bp-sky: #40a9ff;
    --bp-surface: #ffffff;
    --bp-bg: #f0f4f8;
    --bp-line: rgba(24, 144, 255, 0.1);
    --bp-radius: 16px;
    --bp-shadow: 0 10px 28px rgba(24, 144, 255, 0.06);
    font-family: "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    /* 整页浅底，首屏蓝块通栏贴边，避免两侧露蓝边框 */
    background: var(--bp-bg);
    color: var(--bp-ink);
    padding-top: 0 !important;
    margin: 0 !important;
}

html:has(body.page-home) {
    background: var(--bp-bg, #f0f4f8);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body.page-home {
    overflow-x: hidden;
}

.page-home a {
    -webkit-tap-highlight-color: transparent;
}

/* ---------- 首页顶栏：继续用全局悬浮胶囊，强制显示站名+网址 ---------- */
.page-home .unified-brand {
    display: inline-flex !important;
}

.page-home .unified-brand-url {
    display: inline !important;
}

/* ---------- 首屏：贴顶铺满 + 动态蓝背景 ---------- */
.page-home .home-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    min-height: 280px;
    padding: 72px 20px 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    background: linear-gradient(-45deg, #0f6fd8, #1677ff, #1890ff, #36cfc9, #40a9ff, #096dd9) !important;
    background-size: 320% 320% !important;
    animation: homeBgShift 14s ease infinite;
}

.page-home .home-hero::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    width: 48vmax;
    height: 48vmax;
    left: -12%;
    top: -28%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.28) 0%, rgba(64, 169, 255, 0.18) 38%, transparent 70%);
    filter: blur(2px);
    z-index: 0 !important;
    pointer-events: none;
    animation: homeOrbA 11s ease-in-out infinite alternate;
}

.page-home .home-hero > .home-hero-glow,
.page-home .home-hero > .home-hero-grid {
    z-index: 0 !important;
}

.page-home .home-hero > .home-hero-inner {
    z-index: 3 !important;
}

.page-home .home-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: linear-gradient(180deg, transparent, rgba(240, 244, 248, 0.98));
    z-index: 2;
    pointer-events: none;
}

.page-home .home-hero-glow {
    position: absolute;
    width: 42vmax;
    height: 42vmax;
    right: -16%;
    top: 8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(54, 207, 201, 0.2) 36%, transparent 70%);
    filter: blur(4px);
    z-index: 0;
    pointer-events: none;
    animation: homeOrbB 13s ease-in-out infinite alternate;
}

.page-home .home-hero-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse at center, #000 28%, transparent 78%);
    pointer-events: none;
    animation: homeGridDrift 18s linear infinite;
}

.page-home .home-hero-inner {
    position: relative;
    z-index: 3;
    max-width: 720px;
    width: 100%;
    text-align: center;
    animation: homeHeroIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes homeHeroIn {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes homeBgShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes homeOrbA {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(10%, 14%, 0) scale(1.12); }
}

@keyframes homeOrbB {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-12%, -8%, 0) scale(1.15); }
}

@keyframes homeGridDrift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-42px, -42px, 0); }
}

.page-home .home-hero-domain {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: rgba(255, 255, 255, 0.78);
}

.page-home .home-hero-title,
.page-home .search-slogan {
    margin: 0 0 8px;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.page-home .search-subtitle {
    max-width: 520px;
    margin: 0 auto 16px;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.page-home .home-hero-search {
    margin: 0 auto 12px;
    max-width: 560px;
}

.page-home .home-hero-search .search-input {
    height: 48px;
    padding: 0 56px 0 18px;
    border-radius: 999px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 28px rgba(15, 111, 216, 0.18);
}

.page-home .home-hero-search .search-input:focus {
    outline: none;
    box-shadow: 0 12px 30px rgba(15, 111, 216, 0.22), 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.page-home .home-hero-search .search-btn {
    width: 40px;
    height: 40px;
    right: 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--bp-blue), var(--bp-sky));
    box-shadow: 0 6px 14px rgba(24, 144, 255, 0.35);
}

.page-home .home-hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
}

.page-home .home-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.page-home .home-cta-primary {
    color: #fff;
    background: linear-gradient(135deg, #ff7a45, #ff4d4f);
    box-shadow: 0 8px 18px rgba(255, 77, 79, 0.25);
}

.page-home .home-cta-primary:hover {
    transform: translateY(-1px);
}

.page-home .home-cta-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.36);
}

.page-home .home-cta-ghost:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
}

/* ---------- 探索条：强制单行横向滑动 ---------- */
.page-home .home-explore {
    position: relative;
    z-index: 3;
    margin: -8px 0 0;
    max-width: none;
    width: 100%;
    padding: 14px 0 10px;
    background: linear-gradient(180deg, rgba(240, 244, 248, 0.92) 0%, var(--bp-bg) 100%);
    animation: homeHeroIn 0.85s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.page-home .home-quick-links,
.page-home .search-tags {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.page-home .home-quick-links::-webkit-scrollbar,
.page-home .search-tags::-webkit-scrollbar {
    display: none;
}

.page-home .home-quick-links {
    margin-bottom: 10px;
}

.page-home .home-quick-links a {
    flex: 0 0 auto;
    padding: 6px 12px;
    color: var(--bp-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--bp-line);
}

.page-home .home-quick-links a:hover {
    color: var(--bp-blue);
    background: #fff;
    border-color: rgba(24, 144, 255, 0.28);
}

.page-home .search-tag {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--bp-ink);
    text-decoration: none;
    white-space: nowrap;
    background: #fff;
    border: 1px solid var(--bp-line);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.04);
    transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.page-home .search-tag:hover {
    color: var(--bp-blue);
    border-color: rgba(24, 144, 255, 0.28);
    transform: translateY(-1px);
}

/* ---------- 内容区 ---------- */
.page-home .content-wrapper {
    gap: 18px;
    max-width: 1480px;
    padding: 8px 16px 36px 72px;
    background: linear-gradient(180deg, var(--bp-bg) 0%, #f5f7fa 40%, #f7f9fc 100%);
}

.page-home .notice-bar-wrapper {
    margin-bottom: 16px;
}

.page-home .notice-content {
    border-radius: 14px;
    box-shadow: var(--bp-shadow);
}

.page-home .main-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-home .category-card {
    margin-bottom: 0;
    padding: 18px 18px 16px;
    border-radius: var(--bp-radius);
    background: var(--bp-surface);
    border: 1px solid var(--bp-line);
    box-shadow: var(--bp-shadow);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.page-home .category-card:hover {
    box-shadow: 0 14px 36px rgba(18, 32, 51, 0.08);
}

.page-home .category-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(18, 32, 51, 0.06);
}

.page-home .category-title-row {
    margin-bottom: 10px;
}

.page-home .category-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--bp-ink);
    letter-spacing: 0.01em;
}

.page-home .category-title::before {
    content: '';
    width: 4px;
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--bp-blue), var(--bp-cyan));
    flex-shrink: 0;
}

.page-home .category-title i,
.page-home .category-title svg {
    display: none;
}

.page-home .category-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-blue);
    opacity: 0.9;
}

.page-home .sub-categories {
    background: #f3f6fa;
    border-radius: 10px;
    padding: 3px;
}

.page-home .sub-cat-tag {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.page-home .sites-grid {
    gap: 10px;
}

.page-home .site-card {
    border: 1px solid transparent;
    background: #f7f9fc;
    border-radius: 14px;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-home .site-card:hover {
    background: #fff;
    border-color: rgba(26, 126, 240, 0.22);
    box-shadow: 0 10px 24px rgba(26, 126, 240, 0.1);
    transform: translateY(-2px);
}

.page-home .site-name {
    font-weight: 700;
    color: var(--bp-ink);
}

.page-home .site-desc {
    color: var(--bp-muted);
}

.page-home .featured-sites-card {
    padding: 12px;
}

.page-home .sidebar-card,
.page-home .mobile-sidebar-card {
    border-radius: var(--bp-radius);
    border: 1px solid var(--bp-line);
    box-shadow: var(--bp-shadow);
}

.page-home .friend-links-section,
.page-home .hot-articles-card,
.page-home .ranking-card-wrap {
    border-radius: var(--bp-radius);
}

.page-home .sidebar {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--bp-line);
}

@media (prefers-reduced-motion: no-preference) {
    .page-home .main-content > .category-card {
        animation: homeCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    .page-home .main-content > .category-card:nth-child(1) { animation-delay: 0.04s; }
    .page-home .main-content > .category-card:nth-child(2) { animation-delay: 0.08s; }
    .page-home .main-content > .category-card:nth-child(3) { animation-delay: 0.12s; }
    .page-home .main-content > .category-card:nth-child(4) { animation-delay: 0.16s; }
    .page-home .main-content > .category-card:nth-child(5) { animation-delay: 0.2s; }
}

@keyframes homeCardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .page-home .content-wrapper {
        padding: 8px 12px 28px 12px;
    }
}

@media (max-width: 768px) {
    .page-home .home-hero {
        min-height: 240px;
        padding: 64px 14px 28px;
    }

    .page-home .home-hero-title,
    .page-home .search-slogan {
        font-size: 28px;
    }

    .page-home .search-subtitle {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .page-home .home-hero-search .search-input {
        height: 44px;
        font-size: 14px;
    }

    .page-home .home-cta {
        min-height: 34px;
        padding: 0 14px;
        font-size: 12.5px;
    }

    .page-home .home-explore {
        margin-top: 0;
        padding-top: 10px;
    }

    .page-home .home-quick-links,
    .page-home .search-tags {
        padding-left: 12px;
        padding-right: 12px;
    }

    .page-home .content-wrapper {
        padding: 4px 10px 24px;
        gap: 12px;
    }

    .page-home .category-card {
        padding: 14px 12px 12px;
        border-radius: 14px;
    }

    .page-home .category-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .page-home .home-hero {
        min-height: 220px;
        padding-top: 60px;
    }

    .page-home .home-hero-title,
    .page-home .search-slogan {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-home .home-hero,
    .page-home .home-hero::before,
    .page-home .home-hero-glow,
    .page-home .home-hero-grid {
        animation: none !important;
    }
}
