/* ========== 全局重置与基础 ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: #0b0e14;
    color: #e1e7ef;
    line-height: 1.7;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

a {
    color: #8bb9fe;
    text-decoration: none;
    transition: color 0.25s;
}
a:hover, a:focus-visible {
    color: #b4d4ff;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ========== 暗色模式强制（符合暗色主题） ========== */
@media (prefers-color-scheme: dark) {
    body {
        background: #070a0f;
        color: #cfd8e3;
    }
    .glass, .glass-nav, .glass-footer, .glass-nav.scrolled {
        background: rgba(20, 28, 40, 0.55);
        backdrop-filter: blur(14px) saturate(160%);
        -webkit-backdrop-filter: blur(14px) saturate(160%);
        border-color: rgba(255, 255, 255, 0.06);
    }
}
/* 手动暗色类（备用） */
.dark-mode body {
    background: #070a0f;
    color: #cfd8e3;
}

/* ========== 毛玻璃通用 ========== */
.glass {
    background: rgba(18, 26, 38, 0.5);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s;
}

.glass:hover {
    background: rgba(24, 34, 50, 0.6);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    transform: translateY(-2px);
}

/* ========== 导航栏 ========== */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 2rem;
    background: rgba(12, 18, 28, 0.6);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.3s, box-shadow 0.3s;
}

.glass-nav.scrolled {
    background: rgba(8, 12, 20, 0.75);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-brand {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f9d976, #f39f86, #df5b5b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 1.8rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #c8d2e0;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.nav-links a:hover {
    color: #f0f5ff;
    border-bottom-color: #8bb9fe;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #e1e7ef;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    transition: transform 0.2s;
}

.menu-toggle:active {
    transform: scale(0.9);
}

/* ========== Banner ========== */
.banner {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-top: 0;
    padding-top: 70px;
}

.banner-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, #1b2a44 0%, #0a0f18 70%);
    z-index: 0;
}

.banner-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1b2a44 0%, #111827 50%, #0d1520 100%);
    opacity: 0.6;
    animation: gradientShift 15s ease infinite alternate;
}

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

.banner-content {
    position: relative;
    z-index: 2;
    padding: 3rem 4rem;
    max-width: 800px;
    animation: fadeUp 1.2s ease forwards;
}

.banner-content h1 {
    font-size: clamp(2.8rem, 10vw, 5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #f9d976, #f39f86, #e06565);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.banner-content p {
    font-size: 1.3rem;
    color: #bcc9db;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.btn-primary {
    display: inline-block;
    padding: 0.9rem 2.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 60px;
    background: linear-gradient(135deg, #f9d976, #f39f86);
    color: #0b0e14;
    box-shadow: 0 8px 30px rgba(243, 159, 134, 0.35);
    transition: transform 0.25s, box-shadow 0.25s;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 12px 40px rgba(243, 159, 134, 0.5);
    color: #0b0e14;
    text-decoration: none;
}

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

/* ========== 面包屑 ========== */
.breadcrumb {
    padding: 1.2rem 2rem 0.5rem;
    font-size: 0.9rem;
    color: #8896a8;
}

.breadcrumb a {
    color: #8bb9fe;
}

.breadcrumb span {
    color: #b4c2d6;
}

/* ========== 通用区块 ========== */
.section {
    padding: 3.5rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.2rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f0e6b0, #f5c6a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.section-header a {
    font-size: 0.95rem;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s, border-color 0.2s;
}

.section-header a:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #8bb9fe;
    text-decoration: none;
}

/* ========== 卡片网格 ========== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s;
    will-change: transform;
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
    transition: transform 0.5s;
}

.card:hover img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem 1.2rem 1.8rem;
}

.card-body h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #ecf2fa;
}

.card-body p {
    font-size: 0.95rem;
    color: #a8b6c9;
    margin-bottom: 1rem;
}

.card-link {
    font-weight: 600;
    color: #f5c6a0;
    transition: color 0.2s;
}

.card-link:hover {
    color: #f9d976;
    text-decoration: none;
}

/* ========== 排行榜 ========== */
.ranking-list {
    padding: 1.8rem 2.2rem;
}

.ranking-list ol {
    list-style: decimal;
    padding-left: 1.2rem;
}

.ranking-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1.05rem;
}

.ranking-list li:last-child {
    border-bottom: none;
}

.ranking-list a {
    font-weight: 500;
}

/* ========== 分类网格 ========== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.2rem;
}

.category-item {
    text-align: center;
    padding: 1.2rem 0.5rem;
    transition: transform 0.3s, background 0.3s;
}

.category-item a {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #d0dcee;
}

.category-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.category-item:hover a {
    color: #f9d976;
    text-decoration: none;
}

/* ========== 标签云 ========== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
    justify-content: center;
}

.tag {
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s;
}

.tag a {
    color: #b4c9e0;
    font-weight: 500;
}

.tag:hover {
    background: rgba(139, 185, 254, 0.15);
    border-color: #8bb9fe;
    transform: scale(1.05);
}

.tag:hover a {
    color: #f0f5ff;
    text-decoration: none;
}

/* ========== 专题推荐 ========== */
.feature-content {
    padding: 2rem 2.5rem;
    line-height: 1.9;
    font-size: 1.05rem;
    color: #c6d2e3;
}

.feature-content p {
    margin-bottom: 1.2rem;
    text-indent: 2em;
}

/* ========== FAQ ========== */
.faq-list {
    padding: 1.5rem 2rem;
}

details {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s;
}

details:last-child {
    border-bottom: none;
}

summary {
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    color: #dce5f0;
    padding: 0.3rem 0;
    transition: color 0.2s;
}

summary:hover {
    color: #f9d976;
}

details p {
    margin-top: 0.8rem;
    padding-left: 0.5rem;
    color: #a8b6c9;
}

/* ========== 友情链接 ========== */
.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 2rem;
    justify-content: center;
}

.friend-links a {
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.25s;
    color: #b4c9e0;
}

.friend-links a:hover {
    background: rgba(139, 185, 254, 0.15);
    border-color: #8bb9fe;
    color: #f0f5ff;
    text-decoration: none;
    transform: translateY(-2px);
}

.footer-keywords {
    text-align: center;
    margin-top: 1.5rem;
    color: #6f7d91;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* ========== Footer ========== */
.glass-footer {
    background: rgba(10, 15, 24, 0.7);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-top: 3rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-nav a {
    color: #b4c9e0;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #f9d976;
}

.glass-footer p {
    color: #7a8a9e;
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

.footer-seo {
    margin-top: 1rem;
    color: #5c6b7e;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* ========== 返回顶部 ========== */
#scrollTopBtn {
    position: fixed;
    bottom: 2.5rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(30, 42, 60, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #e1e7ef;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s, background 0.3s, opacity 0.3s;
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scrollTopBtn:hover {
    transform: scale(1.1);
    background: rgba(50, 70, 100, 0.8);
    opacity: 1;
}

/* ========== 搜索框 ========== */
.search-box {
    position: fixed;
    top: 80px;
    right: 2rem;
    z-index: 998;
    padding: 0.5rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(14, 20, 30, 0.7);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 40px;
    transition: box-shadow 0.3s;
}

.search-box:focus-within {
    box-shadow: 0 0 0 2px rgba(139, 185, 254, 0.3);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #e1e7ef;
    font-size: 0.95rem;
    padding: 0.3rem 0.5rem;
    width: 140px;
    transition: width 0.3s;
}

.search-box input::placeholder {
    color: #6f7d91;
}

.search-box input:focus {
    width: 200px;
}

.search-box button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #b4c9e0;
    transition: color 0.2s;
}

.search-box button:hover {
    color: #f9d976;
}

/* ========== 相关内链 ========== */
.related-links {
    margin-top: 1.8rem;
    padding: 0.8rem 0;
    font-size: 0.95rem;
    color: #8896a8;
    text-align: center;
}

.related-links span {
    margin-right: 0.5rem;
}

.related-links a {
    margin: 0 0.3rem;
    color: #8bb9fe;
}

.related-links a:hover {
    color: #b4d4ff;
}

/* ========== 滚动动画（通用） ========== */
.section {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

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

.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }
.section:nth-child(5) { animation-delay: 0.4s; }
.section:nth-child(6) { animation-delay: 0.5s; }
.section:nth-child(7) { animation-delay: 0.6s; }
.section:nth-child(8) { animation-delay: 0.7s; }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .section {
        padding: 2.5rem 1.5rem;
    }

    .banner-content {
        padding: 2rem 2.5rem;
    }

    .search-box {
        top: 75px;
        right: 1.2rem;
    }

    .search-box input {
        width: 100px;
    }
    .search-box input:focus {
        width: 150px;
    }
}

@media (max-width: 768px) {
    .glass-nav {
        padding: 0.6rem 1.2rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(8, 12, 20, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 1.2rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        text-align: center;
        padding: 0.8rem 0;
    }

    .menu-toggle {
        display: block;
    }

    .banner {
        min-height: 70vh;
    }

    .banner-content h1 {
        font-size: 2.8rem;
    }

    .banner-content p {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .search-box {
        position: static;
        margin: 1rem auto;
        width: 90%;
        max-width: 350px;
        justify-content: center;
    }

    .search-box input {
        width: 100%;
    }
    .search-box input:focus {
        width: 100%;
    }

    #scrollTopBtn {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
        font-size: 1.4rem;
    }

    .feature-content {
        padding: 1.5rem;
    }

    .ranking-list {
        padding: 1.2rem 1.5rem;
    }

    .faq-list {
        padding: 1rem 1.2rem;
    }

    .friend-links {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .banner-content h1 {
        font-size: 2.2rem;
    }

    .banner-content {
        padding: 1.5rem 1.2rem;
    }

    .section {
        padding: 2rem 1rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-primary {
        padding: 0.7rem 2rem;
        font-size: 1rem;
    }
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0e16;
}

::-webkit-scrollbar-thumb {
    background: #2c3d5a;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3f557a;
}

/* ========== 选中样式 ========== */
::selection {
    background: #8bb9fe;
    color: #0b0e14;
}

/* ========== 按钮 & 交互增强 ========== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #8bb9fe;
    outline-offset: 2px;
}

/* ========== 平滑过渡 ========== */
* {
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}