/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f8f9fa;
    color: #333;
    transition: background 0.3s, color 0.3s;
    line-height: 1.6;
}

body.dark {
    background: #1a1a2e;
    color: #e0e0e0;
}

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

/* ===== 头部 ===== */
header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo a {
    color: #fff;
    text-decoration: none;
}

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

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 30px;
    transition: background 0.3s;
    font-weight: 500;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box input {
    padding: 8px 16px;
    border-radius: 30px;
    border: 0;
    outline: 0;
    width: 200px;
}

.search-box button {
    background: #fff;
    border: 0;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
}

.dark-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 0;
    color: #fff;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    padding: 80px 20px;
    border-radius: 0 0 50px 50px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

.hero .btn {
    display: inline-block;
    background: #fff;
    color: #764ba2;
    padding: 14px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s;
}

.hero .btn:hover {
    transform: scale(1.05);
}

/* ===== 通用区块 ===== */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 10px auto;
    border-radius: 4px;
}

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

.card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

body.dark .card {
    background: #2a2a4a;
    color: #e0e0e0;
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin-bottom: 16px;
    object-fit: cover;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

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

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

/* ===== 面包屑 ===== */
.breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #fff;
    text-decoration: none;
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.7);
}

/* ===== FAQ ===== */
.faq-item {
    border-bottom: 1px solid #ddd;
    padding: 20px 0;
    cursor: pointer;
}

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

.faq-question {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
}

.faq-answer {
    padding-top: 12px;
    display: none;
    color: #555;
}

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

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

/* ===== HowTo ===== */
.howto-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 16px;
}

.howto-step .step-num {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

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

.footer a {
    color: #aaa;
    text-decoration: none;
}

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

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

.footer .qr {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.footer .qr svg {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
}

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

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    border: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
    display: flex;
}

/* ===== 懒加载 ===== */
.lazy {
    opacity: 0;
    transition: opacity 0.6s;
}

.lazy.loaded {
    opacity: 1;
}

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

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 轮播 ===== */
.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 40px;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    padding: 60px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    text-align: center;
}

.carousel-item h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.carousel-controls button {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.3);
    border: 0;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background 0.3s;
}

.carousel-controls button:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ===== 计数器 ===== */
.counter-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

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

.counter-item .num {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.counter-item .label {
    font-size: 1rem;
    color: #666;
}

body.dark .counter-item .label {
    color: #bbb;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 16px;
        gap: 10px;
    }

    nav ul.show {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

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

    .header-inner {
        flex-wrap: wrap;
    }
}