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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    line-height: 1.7;
    color: #222;
    background: #f8f9fa;
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
}

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

a {
    color: #1a73e8;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    text-decoration: underline;
    color: #1557b0;
}

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

/* ===== 导航吸顶 ===== */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(224, 224, 224, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s, border-color 0.3s;
}

body.dark .header {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(51, 51, 51, 0.5);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a3a5c;
    background: linear-gradient(135deg, #1a3a5c, #2a5a8c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark .logo {
    background: linear-gradient(135deg, #bbdefb, #90caf9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    color: #333;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s;
}

body.dark .nav a {
    color: #ccc;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #1a73e8;
    transition: width 0.3s;
}

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

.nav a:hover {
    color: #1a73e8;
    text-decoration: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    background: none;
    border: none;
    padding: 5px;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: 0.3s;
}

body.dark .menu-toggle span {
    background: #ccc;
}

.dark-toggle {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(204, 204, 204, 0.5);
    border-radius: 20px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #333;
    transition: background 0.3s, border-color 0.3s;
}

body.dark .dark-toggle {
    border-color: rgba(102, 102, 102, 0.5);
    color: #ccc;
    background: rgba(255, 255, 255, 0.05);
}

/* ===== 移动菜单 ===== */
@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        padding: 20px;
        border-bottom: 1px solid rgba(224, 224, 224, 0.5);
        gap: 15px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }
    body.dark .nav {
        background: rgba(30, 30, 30, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom-color: rgba(51, 51, 51, 0.5);
    }
    .nav.open {
        display: flex;
    }
    .menu-toggle {
        display: flex;
    }
    .header-inner {
        flex-wrap: wrap;
    }
}

/* ===== 面包屑 ===== */
.breadcrumb {
    background: rgba(241, 243, 244, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 10px 0;
    font-size: 0.85rem;
}

body.dark .breadcrumb {
    background: rgba(44, 44, 44, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.breadcrumb a {
    color: #1a73e8;
}

.breadcrumb span {
    color: #666;
}

/* ===== Banner ===== */
.banner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a3a5c 0%, #2a5a8c 50%, #1a3a5c 100%);
    color: #fff;
    text-align: center;
    padding: 80px 20px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark .banner {
    background: linear-gradient(135deg, #0d253f 0%, #1a3a5c 50%, #0d253f 100%);
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 179, 0, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 70% 30%, rgba(26, 115, 232, 0.1) 0%, transparent 50%);
    animation: bannerGlow 15s ease-in-out infinite alternate;
}

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

.banner-slide {
    display: none;
    animation: fadeIn 0.8s ease;
    position: relative;
    z-index: 1;
}

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

.banner h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.banner p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}

.banner .btn {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #ffb300, #ffa000);
    color: #1a3a5c;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(255, 179, 0, 0.4);
}

.banner .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 179, 0, 0.6);
    background: linear-gradient(135deg, #ffa000, #ff8f00);
    text-decoration: none;
}

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

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

.banner-dots span:hover {
    transform: scale(1.3);
}

.banner-dots span.active {
    background: #fff;
    transform: scale(1.2);
}

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

/* ===== 通用Section ===== */
section {
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    color: #1a3a5c;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #1a73e8, #ffb300);
    margin: 10px auto 0;
    border-radius: 2px;
}

body.dark .section-title {
    color: #bbdefb;
}

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

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

.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
}

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

/* ===== 卡片 ===== */
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.dark .card {
    background: rgba(44, 44, 44, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
}

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

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

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #1a3a5c;
}

body.dark .card h3 {
    color: #bbdefb;
}

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

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

.card svg {
    display: block;
    margin: 0 auto 15px;
    transition: transform 0.3s;
}

.card:hover svg {
    transform: scale(1.1) rotate(5deg);
}

/* ===== 数字动画 ===== */
.stats {
    background: linear-gradient(135deg, #1a3a5c, #2a5a8c);
    color: #fff;
    text-align: center;
    padding: 60px 0;
}

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

.stat-item {
    padding: 20px;
    position: relative;
}

.stat-item::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40%;
    background: rgba(255, 255, 255, 0.2);
}

.stat-item:last-child::after {
    display: none;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffb300, #ffa000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item p {
    margin-top: 8px;
    font-size: 1rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .stat-item::after {
        display: none;
    }
}

/* ===== FAQ ===== */
.faq-item {
    border-bottom: 1px solid rgba(224, 224, 224, 0.5);
    padding: 15px 0;
    transition: border-color 0.3s;
}

body.dark .faq-item {
    border-bottom-color: rgba(68, 68, 68, 0.5);
}

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

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

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

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

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

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

.faq-item.open .faq-answer {
    max-height: 500px;
    padding-top: 15px;
}

/* ===== HowTo ===== */
.howto-step {
    margin-bottom: 20px;
    padding-left: 40px;
    position: relative;
    line-height: 1.7;
}

.howto-step::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.3);
}

/* ===== 文章列表 ===== */
.article-item {
    border-bottom: 1px solid rgba(224, 224, 224, 0.5);
    padding: 20px 0;
    transition: padding-left 0.3s;
}

body.dark .article-item {
    border-bottom-color: rgba(68, 68, 68, 0.5);
}

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

.article-item h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

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

.article-item p {
    color: #555;
    line-height: 1.7;
}

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

.article-item a {
    color: #1a73e8;
    transition: color 0.3s;
}

.article-item a:hover {
    color: #1557b0;
}

/* ===== 返回顶部 ===== */
#backTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
    border: none;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
    z-index: 999;
}

#backTop.show {
    opacity: 1;
    visibility: visible;
}

#backTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(26, 115, 232, 0.5);
}

/* ===== 页脚 ===== */
.footer {
    background: linear-gradient(135deg, #1a3a5c, #0d253f);
    color: #ccc;
    padding: 40px 0;
    font-size: 0.9rem;
}

body.dark .footer {
    background: linear-gradient(135deg, #0d253f, #0a1f33);
}

.footer a {
    color: #bbdefb;
    transition: color 0.3s;
}

.footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-links a {
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

.footer-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.footer-info {
    text-align: center;
    line-height: 2;
}

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

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid rgba(204, 204, 204, 0.5);
    border-radius: 30px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: border-color 0.3s, box-shadow 0.3s;
}

body.dark .search-box input {
    background: rgba(51, 51, 51, 0.8);
    border-color: rgba(85, 85, 85, 0.5);
    color: #eee;
}

.search-box input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.search-box button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
}

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

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

/* ===== 图片懒加载占位 ===== */
.lazy-placeholder {
    background: linear-gradient(135deg, #e0e0e0, #f0f0f0);
    border-radius: 8px;
    animation: shimmer 1.5s infinite;
}

body.dark .lazy-placeholder {
    background: linear-gradient(135deg, #444, #555);
}

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

/* ===== 联系方式 ===== */
.contact-info p {
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.contact-info svg {
    vertical-align: middle;
    margin-right: 8px;
    flex-shrink: 0;
}

/* ===== 表单 ===== */
input, textarea {
    font-family: inherit;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #1a73e8 !important;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

/* ===== 响应式微调 ===== */
@media (max-width: 768px) {
    .banner {
        padding: 60px 20px;
        min-height: 250px;
    }
    .banner h1 {
        font-size: 1.8rem;
    }
    .banner p {
        font-size: 1rem;
    }
    section {
        padding: 40px 0;
    }
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    .card {
        padding: 20px;
    }
    .stat-number {
        font-size: 2rem;
    }
    #backTop {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    .banner h1 {
        font-size: 1.5rem;
    }
    .banner .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
}

/* ===== 暗色模式额外适配 ===== */
body.dark .card h3,
body.dark .section-title {
    color: #bbdefb;
}

body.dark .faq-question:hover {
    color: #90caf9;
}

body.dark .article-item a:hover {
    color: #90caf9;
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar {
    width: 8px;
}

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

body.dark ::-webkit-scrollbar-track {
    background: #2c2c2c;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

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

body.dark ::-webkit-scrollbar-thumb:hover {
    background: #888;
}