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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 导航吸顶 + 毛玻璃效果 */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 47, 94, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
    transition: background 0.3s, box-shadow 0.3s;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.9;
}

.logo svg {
    width: 36px;
    height: 36px;
    fill: currentColor;
}

.nav-links {
    display: flex;
    gap: 1.2rem;
    list-style: none;
    flex-wrap: wrap;
}

.nav-links a {
    color: #e0f2fe;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #60a5fa;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: #fff;
}

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: transform 0.2s;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

/* 移动端菜单 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.6rem;
        padding: 16px 0 8px;
        background: rgba(10, 47, 94, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-radius: 0 0 16px 16px;
    }

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

    .menu-toggle {
        display: block;
    }
}

/* 返回顶部按钮 */
.back-top {
    position: fixed;
    bottom: 40px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: rgba(10, 47, 94, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s, background 0.3s;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-top:hover {
    opacity: 1;
    transform: scale(1.08) translateY(-2px);
    background: rgba(10, 47, 94, 0.95);
}

/* 渐变Banner + 轮播 */
.banner {
    background: linear-gradient(145deg, #0a2f5e, #1e4a7a, #2563eb);
    color: #fff;
    padding: 80px 0 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(96, 165, 250, 0.15) 0%, transparent 60%);
    animation: bannerGlow 8s ease-in-out infinite alternate;
}

@keyframes bannerGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10%, 10%); }
}

.banner-slide {
    display: none;
    padding: 20px 0;
    animation: fadeSlide 0.6s ease;
}

.banner-slide.active {
    display: block;
}

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

.banner h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.banner p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* 通用标题 */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 3px solid #0a2f5e;
    display: inline-block;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 40%;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa, transparent);
}

.section-sub {
    color: #475569;
    margin-top: -12px;
    margin-bottom: 32px;
}

/* 圆角卡片网格 */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.95);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.card p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.7;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* 文章列表 */
.article-item {
    padding: 24px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    transition: padding-left 0.3s;
}

.article-item:last-child {
    border-bottom: none;
}

.article-item:hover {
    padding-left: 8px;
}

.article-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    transition: color 0.2s;
}

.article-item:hover h4 {
    color: #0a2f5e;
}

.article-meta {
    color: #64748b;
    font-size: 0.85rem;
    margin: 6px 0 10px;
}

.read-more {
    color: #0a2f5e;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 6px;
    position: relative;
    transition: color 0.2s;
}

.read-more::after {
    content: '→';
    margin-left: 4px;
    transition: margin-left 0.2s;
}

.read-more:hover {
    color: #2563eb;
}

.read-more:hover::after {
    margin-left: 8px;
}

/* FAQ 手风琴 */
.faq-item {
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: box-shadow 0.3s;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.faq-question {
    background: rgba(241, 245, 249, 0.8);
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-question:hover {
    background: rgba(226, 232, 240, 0.8);
}

.faq-question::after {
    content: "+";
    font-size: 1.5rem;
    transition: transform 0.3s;
    color: #64748b;
}

.faq-item.open .faq-question::after {
    content: "−";
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px 16px;
    background: rgba(255, 255, 255, 0.5);
    display: none;
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* HowTo 步骤 */
.howto-step {
    display: flex;
    gap: 18px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.step-num {
    background: linear-gradient(135deg, #0a2f5e, #1e4a7a);
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(10, 47, 94, 0.2);
}

/* 页脚 */
.footer {
    background: linear-gradient(180deg, #0f172a, #1e293b);
    color: #cbd5e1;
    padding: 56px 0 24px;
    margin-top: 60px;
}

.footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
}

.footer-grid h4 {
    color: #f1f5f9;
    margin-bottom: 12px;
    font-size: 1rem;
}

.footer-grid ul {
    list-style: none;
    line-height: 2.2;
}

.copyright {
    border-top: 1px solid #334155;
    padding-top: 24px;
    margin-top: 32px;
    text-align: center;
    font-size: 0.9rem;
}

/* 暗黑模式 (随系统) */
@media (prefers-color-scheme: dark) {
    body {
        background: #0f172a;
        color: #e2e8f0;
    }

    .navbar {
        background: rgba(10, 22, 40, 0.9);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .card {
        background: rgba(30, 41, 59, 0.8);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .card:hover {
        background: rgba(30, 41, 59, 0.95);
    }

    .card p {
        color: #94a3b8;
    }

    .faq-question {
        background: rgba(30, 41, 59, 0.8);
        color: #f1f5f9;
    }

    .faq-question:hover {
        background: rgba(51, 65, 85, 0.8);
    }

    .faq-answer {
        background: rgba(15, 23, 42, 0.5);
        color: #cbd5e1;
    }

    .faq-item {
        background: rgba(30, 41, 59, 0.4);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .banner {
        background: linear-gradient(145deg, #0a1628, #0a2f5e, #1e3a5f);
    }

    .badge {
        background: linear-gradient(135deg, #334155, #475569);
        color: #e2e8f0;
    }

    .section-title {
        border-bottom-color: #3b82f6;
    }

    .section-sub {
        color: #94a3b8;
    }

    .article-item {
        border-color: rgba(51, 65, 85, 0.5);
    }

    .article-item:hover h4 {
        color: #60a5fa;
    }

    .article-meta {
        color: #94a3b8;
    }

    .read-more {
        color: #60a5fa;
    }

    .read-more:hover {
        color: #93c5fd;
    }

    .footer {
        background: linear-gradient(180deg, #0a1628, #0f172a);
    }

    .back-top {
        background: rgba(30, 41, 59, 0.85);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-color: rgba(255, 255, 255, 0.15);
    }

    .back-top:hover {
        background: rgba(51, 65, 85, 0.95);
    }

    .stat-number {
        color: #60a5fa;
    }
}

/* 暗黑模式手动切换支持 (通过类名) */
.dark body,
body.dark {
    background: #0f172a;
    color: #e2e8f0;
}

/* 图片懒加载辅助 */
.lazy-placeholder {
    min-height: 80px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border-radius: 12px;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* 数字动画 (初始值) */
.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0a2f5e;
    transition: color 0.3s;
}

/* 滚动动画 (初始透明) */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 内部锚点偏移 */
.anchor-offset {
    scroll-margin-top: 80px;
}

/* 响应式微调 */
@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    .banner h1 {
        font-size: 1.8rem;
    }

    .banner p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .card {
        padding: 20px;
    }

    .howto-step {
        flex-direction: column;
        gap: 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .back-top {
        bottom: 24px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .banner h1 {
        font-size: 2.2rem;
    }

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

/* 打印样式 */
@media print {
    .navbar,
    .back-top,
    .menu-toggle {
        display: none;
    }

    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .banner {
        background: #0a2f5e !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}