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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

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

/* 屏幕阅读器仅可见 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== 头部导航 ===== */
.header {
    background: #0f172a;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    backdrop-filter: blur(8px);
    background: rgba(15, 23, 42, 0.95);
    transition: background 0.3s;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fbbf24;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

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

.logo span {
    color: #fff;
    font-weight: 400;
}

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

.nav a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s, transform 0.2s;
    padding: 4px 0;
    position: relative;
}

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

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

.nav a:hover,
.nav a.active {
    color: #fbbf24;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.2s;
}

.menu-toggle:hover {
    transform: rotate(90deg);
}

/* ===== Hero 区域 ===== */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    color: #fff;
    padding: 80px 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(251, 191, 36, 0.08) 0%, transparent 50%);
    animation: heroGlow 6s ease-in-out infinite alternate;
}

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

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    opacity: 0;
    animation: fadeInUp 0.8s forwards;
}

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

.hero .btn {
    display: inline-block;
    background: #fbbf24;
    color: #0f172a;
    padding: 14px 36px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    opacity: 0;
    animation: fadeInUp 0.8s 0.4s forwards;
}

.hero .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.3);
    background: #fbbf24;
}

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

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

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

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #fbbf24;
    margin: 12px auto 0;
    border-radius: 2px;
}

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

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

/* 卡片设计 - 毛玻璃与圆角 */
.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 28px;
    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);
}

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

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #0f172a;
}

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

/* 关于文本 */
.about-text {
    font-size: 1.05rem;
    color: #334155;
    max-width: 800px;
    margin: 0 auto;
}

.about-text strong {
    color: #0f172a;
}

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

.faq-question {
    background: transparent;
    border: none;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    width: 100%;
    text-align: left;
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

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

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

.faq-question[aria-expanded="true"] .icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s;
    color: #475569;
    padding-left: 4px;
    padding-top: 0;
}

.faq-answer.open {
    max-height: 400px;
    padding-top: 12px;
}

/* 文章卡片 */
.article-card {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px 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);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.95);
}

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

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

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

.article-card .date {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 6px;
}

.article-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    transition: color 0.2s;
}

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

.article-card p {
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.article-card .read-more {
    color: #fbbf24;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: gap 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-card .read-more:hover {
    gap: 8px;
}

/* 操作指南步骤 */
.howto-steps {
    counter-reset: step;
}

.howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.howto-step:hover {
    transform: translateX(6px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.9);
}

.howto-step .step-num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #fbbf24;
    color: #0f172a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s, background 0.3s;
}

.howto-step:hover .step-num {
    transform: scale(1.1);
    background: #fbbf24;
}

.howto-step h4 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.howto-step p {
    color: #475569;
    font-size: 0.9rem;
}

/* 联系信息 */
.contact-info {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    color: #e2e8f0;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-info:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.contact-info p {
    margin: 8px 0;
}

.contact-info a {
    color: #fbbf24;
    text-decoration: none;
    transition: opacity 0.2s;
}

.contact-info a:hover {
    opacity: 0.8;
}

/* 页脚 */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
}

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

.footer .links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer .links a:hover {
    color: #fbbf24;
}

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

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

.back-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

/* 用户评价 */
.testimonial {
    text-align: center;
    padding: 20px;
    transition: opacity 0.5s;
}

.testimonial p {
    font-style: italic;
    color: #475569;
    max-width: 600px;
    margin: 0 auto 12px;
}

.testimonial .author {
    font-weight: 600;
    color: #0f172a;
}

/* 轮播指示器 */
.banner-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.banner-dots button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #cbd5e1;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

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

.banner-dots button:hover {
    background: #fbbf24;
}

/* ===== 暗黑模式 ===== */
.dark-mode {
    background: #0f172a;
    color: #e2e8f0;
}

.dark-mode .header {
    background: rgba(15, 23, 42, 0.98);
}

.dark-mode .section {
    background: #1e293b;
    color: #e2e8f0;
}

.dark-mode .card,
.dark-mode .howto-step,
.dark-mode .article-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.dark-mode .card h3,
.dark-mode .article-card h3 {
    color: #f1f5f9;
}

.dark-mode .card p,
.dark-mode .article-card p,
.dark-mode .howto-step p {
    color: #94a3b8;
}

.dark-mode .faq-question {
    color: #f1f5f9;
}

.dark-mode .faq-answer {
    color: #94a3b8;
}

.dark-mode .about-text {
    color: #cbd5e1;
}

.dark-mode .testimonial p {
    color: #94a3b8;
}

.dark-mode .testimonial .author {
    color: #f1f5f9;
}

.dark-mode .contact-info {
    background: rgba(30, 41, 59, 0.9);
}

.dark-mode .footer {
    background: #0f172a;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

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

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

    .nav {
        display: none;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(12px);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 20px;
        gap: 12px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

    .nav.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .section {
        padding: 40px 0;
    }

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

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

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

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

/* 统计数字动画 */
.stat-item {
    text-align: center;
    transition: transform 0.3s;
}

.stat-item:hover {
    transform: scale(1.05);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fbbf24;
}

.stat-label {
    color: #64748b;
    font-size: 0.9rem;
}

.dark-mode .stat-label {
    color: #94a3b8;
}

/* 搜索输入框 */
.search-input {
    margin-bottom: 20px;
    padding: 10px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
}

.search-input:focus {
    outline: none;
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

.dark-mode .search-input {
    background: rgba(15, 23, 42, 0.8);
    border-color: #475569;
    color: #e2e8f0;
}

.dark-mode .search-input:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

/* 暗黑模式切换按钮 */
.dark-toggle {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: #1e293b;
    color: #fbbf24;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 99;
    transition: transform 0.3s, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-toggle:hover {
    transform: scale(1.1);
}

.dark-mode .dark-toggle {
    background: #fbbf24;
    color: #0f172a;
}

@media (max-width: 768px) {
    .dark-toggle {
        bottom: 80px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
}