/* 全局重置与基础样式 */
* {
    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;
    background: #f8f9fa;
    color: #222;
    line-height: 1.8;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

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

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

a:hover {
    text-decoration: underline;
}

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

/* 头部导航 */
header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s, background 0.3s;
}

header.scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

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

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #1a73e8;
    letter-spacing: -1px;
}

.logo span {
    color: #333;
}

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

.nav a {
    font-size: 15px;
    color: #333;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: #1a73e8;
}

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    background: none;
    border: none;
    color: #333;
}

@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 16px 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        gap: 12px;
    }
    .nav.open {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
}

/* 面包屑 */
.breadcrumb {
    background: #f0f2f5;
    padding: 12px 20px;
    font-size: 14px;
    color: #666;
    transition: background 0.3s;
}

.breadcrumb a {
    color: #1a73e8;
}

.breadcrumb span {
    color: #888;
}

/* Hero 区域：渐变Banner */
.hero {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: #fff;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 24px;
    opacity: 0.9;
}

.hero .btn {
    display: inline-block;
    padding: 14px 40px;
    background: #fff;
    color: #1a73e8;
    font-weight: 600;
    border-radius: 50px;
    font-size: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* 通用节 */
.section {
    padding: 64px 20px;
    background: #fff;
    transition: background 0.3s;
}

.section:nth-child(even) {
    background: #f8f9fa;
}

.section-title {
    font-size: 30px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    color: #111;
}

.section-sub {
    text-align: center;
    color: #555;
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 16px;
}

/* 网格系统 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

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

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

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

/* 圆角卡片 + 毛玻璃效果 */
.card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}

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

.card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #1a73e8;
}

.card p {
    color: #444;
    font-size: 15px;
}

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

.faq-question {
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #111;
    user-select: none;
}

.faq-question::after {
    content: '+';
    font-size: 22px;
    color: #1a73e8;
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    content: '−';
}

.faq-answer {
    padding-top: 12px;
    color: #444;
    font-size: 15px;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

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

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

.howto-step-content h4 {
    font-size: 17px;
    margin-bottom: 4px;
    color: #111;
}

.howto-step-content p {
    color: #444;
    font-size: 15px;
}

/* 文章卡片 */
.article-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.article-card h3 {
    font-size: 18px;
    margin-bottom: 6px;
    color: #1a73e8;
}

.article-card .date {
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
}

.article-card p {
    color: #444;
    font-size: 14px;
    margin-bottom: 8px;
}

.article-card a {
    color: #1a73e8;
    font-weight: 500;
}

/* 页脚 */
footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 48px 20px 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

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

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

.footer-grid h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 12px;
}

.footer-grid a {
    color: #aaa;
    font-size: 14px;
    display: block;
    margin-bottom: 6px;
}

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

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 32px;
    padding-top: 16px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1a73e8;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 999;
    border: none;
}

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

/* 暗黑模式切换按钮 */
.dark-mode-toggle {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: #333;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    border: none;
    transition: background 0.3s;
}

/* 暗黑模式 */
body.dark {
    background: #121212;
    color: #e0e0e0;
}

body.dark header {
    background: #1e1e1e;
    border-color: #333;
}

body.dark .section {
    background: #1a1a1a;
}

body.dark .section:nth-child(even) {
    background: #121212;
}

body.dark .card {
    background: rgba(42, 42, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark .card h3 {
    color: #4a9eff;
}

body.dark .faq-question {
    color: #e0e0e0;
}

body.dark .article-card {
    background: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.dark .breadcrumb {
    background: #1e1e1e;
}

body.dark .breadcrumb a {
    color: #4a9eff;
}

body.dark .hero {
    background: linear-gradient(135deg, #0d47a1 0%, #001a33 100%);
}

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

body.dark .nav a:hover {
    color: #4a9eff;
}

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

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

body.dark .card p,
body.dark .faq-answer,
body.dark .howto-step-content p,
body.dark .article-card p {
    color: #bbb;
}

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

body.dark .howto-step-content h4 {
    color: #eee;
}

body.dark .article-card .date {
    color: #999;
}

body.dark .logo span {
    color: #ccc;
}

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

body.dark .back-to-top {
    background: #4a9eff;
}

body.dark .dark-mode-toggle {
    background: #555;
}

/* 滚动动画（初始隐藏，JS控制显示） */
.card,
.article-card,
.howto-step,
.faq-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 28px;
    }
    .hero p {
        font-size: 16px;
    }
    .section-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 50px 16px;
    }
    .hero h1 {
        font-size: 24px;
    }
    .hero .btn {
        padding: 12px 30px;
        font-size: 14px;
    }
    .section {
        padding: 40px 16px;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}