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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
    color: #222;
    background: #fff;
    transition: background 0.3s, color 0.3s;
}

body.dark {
    background: #121212;
    color: #e0e0e0;
}

a {
    color: #1a3a5c;
    text-decoration: none;
}

body.dark a {
    color: #8ab4f8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航 */
.navbar {
    background: #1a3a5c;
    color: #fff;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.3s;
}

body.dark .navbar {
    background: #1e2a3a;
}

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

.navbar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.navbar .nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.navbar .nav-links a {
    color: #fff;
    font-size: 0.95rem;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}

.navbar .nav-links a:hover {
    border-bottom-color: #f0c040;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background: #1a3a5c;
    padding: 16px 20px;
}

body.dark .mobile-menu {
    background: #1e2a3a;
}

.mobile-menu a {
    display: block;
    color: #fff;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* 搜索 */
.search-box {
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-box input {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 180px;
}

.search-box button {
    background: #f0c040;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

/* Banner - 渐变背景与毛玻璃效果 */
.banner {
    position: relative;
    overflow: hidden;
    height: 420px;
    background: linear-gradient(135deg, #1a3a5c 0%, #2a5a7c 50%, #3a7a9c 100%);
}

body.dark .banner {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a2a3a 50%, #2a3a4a 100%);
}

.banner-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide .banner-content {
    text-align: center;
    color: #fff;
    padding: 30px;
    background: rgba(26, 58, 92, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    max-width: 800px;
    margin: 0 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

body.dark .banner-slide .banner-content {
    background: rgba(13, 27, 42, 0.4);
}

.banner-slide h1 {
    font-size: 2.6rem;
    margin-bottom: 16px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.banner-slide p {
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto 20px;
    opacity: 0.9;
}

.banner-btn {
    display: inline-block;
    background: #f0c040;
    color: #1a3a5c;
    padding: 12px 32px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s;
}

.banner-btn:hover {
    background: #e0b030;
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(240, 192, 64, 0.4);
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.banner-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.3s;
}

.banner-dots span.active {
    background: #f0c040;
}

/* 通用标题 */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin: 50px 0 30px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #f0c040;
    margin: 10px auto 0;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-top: -20px;
    margin-bottom: 30px;
}

body.dark .section-subtitle {
    color: #aaa;
}

/* 卡片网格 - 毛玻璃与圆角 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.card {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.25s;
    border: 1px solid rgba(255,255,255,0.2);
}

body.dark .card {
    background: rgba(30, 42, 58, 0.8);
    border-color: rgba(255,255,255,0.05);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    background: rgba(248, 249, 250, 0.95);
}

body.dark .card:hover {
    background: rgba(30, 42, 58, 0.95);
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.card p {
    color: #555;
    font-size: 0.95rem;
}

body.dark .card p {
    color: #bbb;
}

/* 数字动画 */
.stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    background: linear-gradient(135deg, #1a3a5c, #2a5a7c);
    color: #fff;
    padding: 40px 20px;
    border-radius: 16px;
    margin: 40px 0;
    box-shadow: 0 4px 20px rgba(26, 58, 92, 0.3);
}

body.dark .stats {
    background: linear-gradient(135deg, #1e2a3a, #2a3a4a);
}

.stat-item {
    text-align: center;
}

.stat-item .number {
    font-size: 2.6rem;
    font-weight: 800;
}

.stat-item .label {
    font-size: 1rem;
    opacity: 0.8;
}

/* 文章列表 */
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.article-item {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.2);
}

body.dark .article-item {
    background: rgba(30, 42, 58, 0.8);
    border-color: rgba(255,255,255,0.05);
}

.article-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.article-item h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.article-item .meta {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.article-item p {
    color: #555;
    font-size: 0.93rem;
}

body.dark .article-item p {
    color: #bbb;
}

.article-item .read-more {
    color: #1a3a5c;
    font-weight: 600;
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid #ddd;
    padding: 16px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.faq-item:hover {
    background: rgba(240, 192, 64, 0.05);
}

body.dark .faq-item {
    border-color: #444;
}

.faq-question {
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.4rem;
    transition: 0.2s;
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding-top: 0;
    color: #555;
}

body.dark .faq-answer {
    color: #bbb;
}

.faq-item.open .faq-answer {
    max-height: 400px;
    padding-top: 12px;
}

/* HowTo */
.howto-steps {
    counter-reset: step;
    margin: 20px 0;
}

.howto-step {
    padding: 16px 0 16px 40px;
    position: relative;
    border-left: 3px solid #1a3a5c;
    margin-left: 20px;
    transition: background 0.2s;
}

.howto-step:hover {
    background: rgba(240, 192, 64, 0.05);
}

.howto-step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: -16px;
    top: 16px;
    background: #f0c040;
    color: #1a3a5c;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(240, 192, 64, 0.3);
}

/* 联系方式 */
.contact-info {
    background: rgba(240, 244, 248, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 30px;
    border-radius: 16px;
    margin: 30px 0;
    border: 1px solid rgba(255,255,255,0.3);
}

body.dark .contact-info {
    background: rgba(30, 42, 58, 0.9);
    border-color: rgba(255,255,255,0.05);
}

.contact-info p {
    margin: 8px 0;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #1a3a5c, #0f2a4a);
    color: #ddd;
    padding: 40px 0 20px;
    margin-top: 60px;
}

body.dark .footer {
    background: linear-gradient(135deg, #0d1b2a, #1a2a3a);
}

.footer a {
    color: #bbb;
    transition: color 0.2s;
}

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

.footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

.footer h4 {
    color: #fff;
    margin-bottom: 12px;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin: 6px 0;
}

.footer .copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 30px;
    font-size: 0.9rem;
}

/* 返回顶部 */
#backTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1a3a5c;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    border: none;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

#backTop:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

body.dark #backTop {
    background: #f0c040;
    color: #1a3a5c;
}

/* 暗黑切换 */
#darkToggle {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: #1a3a5c;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    border: none;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

#darkToggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

body.dark #darkToggle {
    background: #f0c040;
    color: #1a3a5c;
}

/* 滚动动画 */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* SVG 占位图标 */
.icon-placeholder {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f0c040, #e0b030);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(240, 192, 64, 0.3);
}

body.dark .icon-placeholder {
    background: linear-gradient(135deg, #3a5a8c, #2a4a7c);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

    .banner {
        height: 300px;
    }

    .banner-slide .banner-content {
        padding: 20px;
        margin: 0 10px;
    }

    .stats {
        flex-direction: column;
        align-items: center;
    }

    .search-box input {
        width: 120px;
    }

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

    .article-list {
        grid-template-columns: 1fr;
    }

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

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

    .banner-btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .navbar .logo {
        font-size: 1.2rem;
    }

    .banner-slide h1 {
        font-size: 1.4rem;
    }

    .banner {
        height: 250px;
    }

    .stat-item .number {
        font-size: 2rem;
    }

    .card {
        padding: 16px;
    }

    .footer .container {
        grid-template-columns: 1fr;
    }
}