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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
}

body.dark {
    background: #0f0f1a;
    color: #e0e0e0;
}

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

a:hover {
    text-decoration: underline;
}

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

/* ===== 容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 头部导航 ===== */
header {
    background: #1a1a2e;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    transition: background 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.dark header {
    background: rgba(10, 10, 20, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffd700;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

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

.nav a {
    color: #fff;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s, color 0.3s;
    position: relative;
}

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

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

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== Hero 区域 ===== */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #1a1a2e 100%);
    color: #fff;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(255, 215, 0, 0.03) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

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

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero .btn {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #1a1a2e;
    padding: 14px 40px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    border: none;
    cursor: pointer;
    animation: fadeInUp 0.8s ease 0.4s both;
    position: relative;
    overflow: hidden;
}

.hero .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hero .btn:hover::before {
    left: 100%;
}

.hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #ffb300, #ffd700);
}

/* ===== 通用区块 ===== */
.section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.section:nth-child(even) {
    animation-delay: 0.1s;
}

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

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

/* ===== 卡片 ===== */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    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.2);
}

body.dark .card {
    background: rgba(28, 28, 48, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

/* ===== 网格布局 ===== */
.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: 24px;
}

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

body.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.1rem;
    padding: 8px 0;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    color: inherit;
    transition: color 0.3s;
}

.faq-question:hover {
    color: #ffd700;
}

.faq-question .icon {
    font-size: 1.3rem;
    transition: transform 0.3s;
    display: inline-block;
}

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

.faq-answer {
    padding: 0 0 12px;
    display: none;
    color: #555;
    line-height: 1.8;
    animation: fadeIn 0.3s ease;
}

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

.faq-answer.open {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}

/* ===== 步骤指南 ===== */
.howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.5s ease forwards;
}

.howto-step:nth-child(1) { animation-delay: 0.1s; }
.howto-step:nth-child(2) { animation-delay: 0.2s; }
.howto-step:nth-child(3) { animation-delay: 0.3s; }
.howto-step:nth-child(4) { animation-delay: 0.4s; }
.howto-step:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideIn {
    to { opacity: 1; transform: translateX(0); }
}

.howto-step .step-num {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #ffd700;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

body.dark .howto-step .step-num {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #1a1a2e;
}

/* ===== 评价卡片 ===== */
.testimonial-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark .testimonial-card {
    background: rgba(28, 28, 48, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.testimonial-card .quote::before {
    content: '"';
    font-size: 2rem;
    color: #ffd700;
    opacity: 0.3;
    position: absolute;
    top: -10px;
    left: -10px;
}

body.dark .testimonial-card .quote {
    color: #bbb;
}

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

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

/* ===== 文章卡片 ===== */
.article-card {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark .article-card {
    background: rgba(28, 28, 48, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.article-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.article-card:hover img {
    transform: scale(1.05);
}

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

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

.article-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.article-card:hover h3 {
    color: #ffd700;
}

.article-card p {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

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

.article-card .read-more {
    color: #1a73e8;
    font-weight: 600;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.article-card .read-more:hover {
    color: #ffd700;
    transform: translateX(5px);
}

/* ===== 页脚 ===== */
.footer {
    background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
    color: #ccc;
    padding: 60px 0 20px;
    position: relative;
}

body.dark .footer {
    background: linear-gradient(135deg, #0a0a14, #05050a);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
}

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

.footer h4 {
    color: #ffd700;
    margin-bottom: 16px;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 8px;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: #ffd700;
}

.footer a {
    color: #ccc;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s, transform 0.3s;
}

.footer a:hover {
    color: #ffd700;
    text-decoration: none;
    transform: translateX(5px);
}

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

/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #ffd700;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
    opacity: 0;
    z-index: 999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #1a1a2e;
}

/* ===== 动画关键帧 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 滚动进度条 ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ffb300);
    z-index: 1001;
    width: var(--scroll-progress, 0%);
    transition: width 0.1s;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        gap: 12px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        animation: slideDown 0.3s ease;
    }

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

    .nav.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

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

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

    .hero .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

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

    .howto-step {
        flex-direction: column;
        align-items: flex-start;
    }

    .testimonial-card {
        padding: 20px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero {
        padding: 60px 0;
    }

    .section {
        padding: 40px 0;
    }

    .card {
        padding: 20px;
    }

    .container {
        padding: 0 15px;
    }
}

/* ===== 暗色模式增强 ===== */
body.dark .hero {
    background: linear-gradient(135deg, #0a0a14 0%, #0f0f1a 40%, #1a1a2e 70%, #0a0a14 100%);
}

body.dark .hero::before {
    background: radial-gradient(circle at 30% 50%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
}

body.dark .section-title::after {
    background: linear-gradient(90deg, #ffd700, #ffb300);
}

/* ===== 打印样式 ===== */
@media print {
    header,
    .back-to-top,
    .menu-toggle {
        display: none;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .card,
    .testimonial-card,
    .article-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body.dark {
        background: #fff;
        color: #333;
    }
}