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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
    line-height: 1.7;
    transition: background 0.3s, color 0.3s;
}

body.dark {
    background: #0d1117;
    color: #e6edf3;
}

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

.dark a {
    color: #58a6ff;
}

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

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f2f5;
}

.dark ::-webkit-scrollbar-track {
    background: #161b22;
}

::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #333;
}

/* 头部 */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s;
}

.dark header {
    background: rgba(13, 17, 23, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a4a8a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dark .logo {
    color: #58a6ff;
}

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

nav ul {
    display: flex;
    list-style: none;
    gap: 24px;
    flex-wrap: wrap;
}

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

nav a:hover, nav a.active {
    border-color: #1a4a8a;
    color: #1a4a8a;
}

.dark nav a:hover, .dark nav a.active {
    border-color: #58a6ff;
    color: #58a6ff;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #1a4a8a;
}

.dark .menu-toggle {
    color: #58a6ff;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    nav {
        display: none;
        width: 100%;
    }
    nav.open {
        display: block;
    }
    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
    }
    nav li {
        padding: 8px 0;
        border-bottom: 1px solid #eee;
    }
    .dark nav li {
        border-color: #333;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }
}

/* 暗色模式切换 */
.dark-toggle {
    background: none;
    border: 2px solid #1a4a8a;
    color: #1a4a8a;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s, color 0.3s;
    margin-left: 12px;
}

.dark .dark-toggle {
    border-color: #58a6ff;
    color: #58a6ff;
}

.dark-toggle:hover {
    background: #1a4a8a;
    color: #fff;
}

.dark .dark-toggle:hover {
    background: #58a6ff;
    color: #0d1117;
}

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #1a4a8a 0%, #2d6bb8 50%, #4a8ed6 100%);
    color: #fff;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.dark .hero {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a3a5c 50%, #2a5f8a 100%);
}

.hero::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    min-width: 280px;
}

.hero-text h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero-text p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #fff;
    color: #1a4a8a;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.btn-outline:hover {
    background: #fff;
    color: #1a4a8a;
    transform: translateY(-2px);
}

.hero-visual {
    flex: 1;
    min-width: 280px;
    display: flex;
    justify-content: center;
}

.hero-visual svg {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    .hero {
        padding: 50px 0 40px;
    }
}

/* 通用区块 */
section {
    padding: 70px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    color: #1a1a2e;
}

.dark .section-title {
    color: #e6edf3;
}

.section-sub {
    text-align: center;
    color: #555;
    margin-bottom: 50px;
    font-size: 1.05rem;
}

.dark .section-sub {
    color: #8b949e;
}

/* 网格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.dark .card {
    background: #161b22;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.dark .card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.card-icon {
    margin-bottom: 16px;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.dark .card h3 {
    color: #e6edf3;
}

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

.dark .card p {
    color: #8b949e;
}

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

.mt-20 {
    margin-top: 20px;
}

/* 数据统计 */
.stats {
    background: linear-gradient(135deg, #1a4a8a, #2d6bb8);
    color: #fff;
    padding: 60px 0;
}

.dark .stats {
    background: linear-gradient(135deg, #0d1b2a, #1a3a5c);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-item .stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    display: block;
    line-height: 1.2;
}

.stat-item .stat-label {
    font-size: 1rem;
    opacity: 0.85;
    margin-top: 6px;
}

/* 横幅轮播 */
.banner-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    margin: 40px 0;
    background: #e8edf5;
    min-height: 200px;
}

.dark .banner-carousel {
    background: #1c2333;
}

.carousel-slide {
    display: none;
    padding: 40px;
    text-align: center;
    animation: fadeIn 0.5s;
}

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

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

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.carousel-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dots span.active {
    background: #1a4a8a;
}

.dark .carousel-dots span.active {
    background: #58a6ff;
}

/* 搜索框 */
.search-box {
    display: flex;
    max-width: 400px;
    margin: 0 auto 40px;
    gap: 8px;
}

.search-box input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}

.search-box input:focus {
    border-color: #1a4a8a;
}

.dark .search-box input {
    background: #21262d;
    border-color: #333;
    color: #e6edf3;
}

.search-box button {
    padding: 12px 24px;
    background: #1a4a8a;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.search-box button:hover {
    background: #2d6bb8;
}

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

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

/* 面包屑 */
.breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    color: #888;
    padding: 20px 0 0;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #1a4a8a;
}

.dark .breadcrumb a {
    color: #58a6ff;
}

.breadcrumb span {
    color: #aaa;
}

/* 合作伙伴 */
.partner-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.partner-logos svg {
    width: 100px;
    height: 60px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.partner-logos svg:hover {
    opacity: 1;
}

/* 评价卡片 */
.testimonial-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    text-align: center;
}

.dark .testimonial-card {
    background: #161b22;
    border-color: rgba(255, 255, 255, 0.06);
}

.testimonial-card p {
    font-style: italic;
    color: #555;
    margin-bottom: 16px;
}

.dark .testimonial-card p {
    color: #8b949e;
}

.testimonial-card .author {
    font-weight: 600;
    color: #1a1a2e;
}

.dark .testimonial-card .author {
    color: #e6edf3;
}

/* 新闻卡片 */
.news-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.dark .news-card {
    background: #161b22;
}

.news-card:hover {
    transform: translateY(-4px);
}

.news-card .content {
    padding: 20px;
}

.news-card h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.news-card .date {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.dark .news-card .date {
    color: #6e7681;
}

/* 使用指南步骤 */
.howto-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.howto-step .step-num {
    background: #1a4a8a;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.dark .howto-step .step-num {
    background: #58a6ff;
    color: #0d1117;
}

.howto-step .step-text {
    flex: 1;
}

.howto-step .step-text h4 {
    margin-bottom: 4px;
}

/* 联系信息 */
.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .contact-info {
        grid-template-columns: 1fr;
    }
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.dark .contact-item {
    background: #161b22;
}

.contact-item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* 网站地图 */
.sitemap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .sitemap {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .sitemap {
        grid-template-columns: 1fr;
    }
}

.sitemap a {
    display: block;
    padding: 4px 0;
    color: #555;
}

.dark .sitemap a {
    color: #8b949e;
}

.sitemap a:hover {
    color: #1a4a8a;
}

.dark .sitemap a:hover {
    color: #58a6ff;
}

/* 友情链接 */
.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 20px 0;
}

.friend-links a {
    background: #f0f2f5;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #555;
    transition: background 0.2s;
}

.dark .friend-links a {
    background: #21262d;
    color: #8b949e;
}

.friend-links a:hover {
    background: #e0e4ea;
}

.dark .friend-links a:hover {
    background: #30363d;
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 0;
}

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

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 8px 0;
    transition: color 0.2s;
}

.faq-question:hover {
    color: #1a4a8a;
}

.dark .faq-question:hover {
    color: #58a6ff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    color: #555;
    font-size: 0.95rem;
}

.dark .faq-answer {
    color: #8b949e;
}

.faq-answer.open {
    max-height: 600px;
    padding: 10px 0 16px;
}

.faq-icon {
    transition: transform 0.3s;
}

.faq-icon.open {
    transform: rotate(45deg);
}

/* 页脚 */
footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 50px 0 30px;
    margin-top: 60px;
}

.dark footer {
    background: #0d1117;
    border-top: 1px solid #21262d;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.footer-col a {
    display: block;
    color: #aaa;
    margin-bottom: 8px;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

.dark .footer-bottom {
    border-color: #21262d;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1a4a8a;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 200;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dark .back-to-top {
    background: #58a6ff;
    color: #0d1117;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
}

/* 响应式微调 */
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.6rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
    section {
        padding: 40px 0;
    }
}