/* 全局重置与基础 */
*, *::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: #f4f4f9;
    color: #222;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

body.dark-mode {
    background: #0d0d1a;
    color: #e0e0e0;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 头部导航 */
.header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e94560;
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.85;
}

.nav {
    display: flex;
    gap: 20px;
    list-style: none;
    align-items: center;
}

.nav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s, transform 0.2s;
    position: relative;
}

.nav a:hover {
    background: rgba(233, 69, 96, 0.2);
    transform: translateY(-1px);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #e94560;
    transition: all 0.3s;
    transform: translateX(-50%);
    border-radius: 1px;
}

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

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

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

/* 暗黑模式切换按钮 */
.dark-mode-toggle {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    border-radius: 30px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s, transform 0.2s;
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* 英雄区域 - 渐变Banner */
.hero {
    background: linear-gradient(135deg, #0f3460, #1a1a2e, #16213e);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    color: #fff;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.08) 0%, transparent 60%);
    animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
}

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

.hero .btn {
    display: inline-block;
    background: #e94560;
    color: #fff;
    padding: 14px 36px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    animation: fadeInUp 0.8s ease-out 0.2s 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.15), transparent);
    transition: left 0.5s;
}

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

.hero .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
    background: #d63851;
}

/* 通用区块 */
.section {
    padding: 60px 0;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }
.section:nth-child(5) { animation-delay: 0.4s; }
.section:nth-child(6) { animation-delay: 0.5s; }
.section:nth-child(7) { animation-delay: 0.6s; }
.section:nth-child(8) { animation-delay: 0.7s; }
.section:nth-child(9) { animation-delay: 0.8s; }
.section:nth-child(10) { animation-delay: 0.9s; }
.section:nth-child(11) { animation-delay: 1s; }

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

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

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

.section-title:hover::after {
    width: 100px;
}

/* 网格布局（圆角卡片） */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

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

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

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

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #1a1a2e;
    transition: color 0.3s;
}

.dark-mode .card h3 {
    color: #e0e0e0;
}

.card p {
    color: #555;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.dark-mode .card p {
    color: #aaa;
}

/* FAQ折叠 */
.faq-item {
    border-bottom: 1px solid #ddd;
    padding: 18px 0;
    cursor: pointer;
    transition: background 0.2s;
}

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

.faq-item:hover {
    background: rgba(233, 69, 96, 0.03);
}

.dark-mode .faq-item:hover {
    background: rgba(233, 69, 96, 0.06);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.05rem;
    user-select: none;
}

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

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

.faq-item.active .faq-answer {
    max-height: 300px;
    padding-top: 8px;
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

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

/* 步骤列表 */
.howto-steps {
    list-style: none;
    counter-reset: step;
}

.howto-steps li {
    counter-increment: step;
    padding: 16px 0 16px 48px;
    position: relative;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.dark-mode .howto-steps li {
    border-color: #333;
}

.howto-steps li:hover {
    background: rgba(233, 69, 96, 0.02);
}

.howto-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 16px;
    width: 32px;
    height: 32px;
    background: #e94560;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: transform 0.3s, box-shadow 0.3s;
}

.howto-steps li:hover::before {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

/* 文章卡片 */
.articles .card .meta {
    font-size: 0.85rem;
    color: #888;
    margin: 8px 0 4px;
}

.articles .card .read-more {
    color: #e94560;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}

.articles .card .read-more:hover {
    color: #d63851;
    padding-left: 4px;
}

/* 用户评价 */
.testimonial {
    text-align: center;
    padding: 30px 20px;
}

.testimonial blockquote {
    font-size: 1.1rem;
    font-style: italic;
    color: #444;
    margin-bottom: 12px;
    position: relative;
    padding: 0 20px;
}

.testimonial blockquote::before,
.testimonial blockquote::after {
    content: '"';
    font-size: 2rem;
    color: #e94560;
    opacity: 0.3;
    position: absolute;
}

.testimonial blockquote::before {
    left: -10px;
    top: -10px;
}

.testimonial blockquote::after {
    right: -10px;
    bottom: -10px;
}

.dark-mode .testimonial blockquote {
    color: #ccc;
}

.testimonial cite {
    font-style: normal;
    font-weight: 600;
    color: #1a1a2e;
}

.dark-mode .testimonial cite {
    color: #e0e0e0;
}

/* 统计数字 */
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e94560;
}

.stat-label {
    font-size: 0.95rem;
    color: #666;
}

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

/* 搜索框 */
.search-box {
    max-width: 400px;
    margin: 0 auto 30px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #ddd;
    border-radius: 40px;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    background: #fff;
}

.dark-mode .search-box input {
    background: #1e1e2f;
    border-color: #444;
    color: #e0e0e0;
}

.search-box input:focus {
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

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

.footer a {
    color: #e94560;
    text-decoration: none;
    transition: color 0.2s;
}

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

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

.footer .legal-links a {
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.footer .legal-links a:hover {
    background: rgba(233, 69, 96, 0.1);
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #e94560;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, box-shadow 0.3s;
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5);
}

/* 响应式 */
@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        background: rgba(22, 33, 62, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        position: absolute;
        top: 58px;
        left: 0;
        right: 0;
        padding: 20px;
        gap: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .nav.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

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

    .hero {
        padding: 50px 0;
    }

    .section {
        padding: 40px 0;
    }

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

    .grid {
        grid-template-columns: 1fr;
    }

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

    .footer .legal-links {
        gap: 12px;
    }
}

/* 暗色模式全局调整 */
.dark-mode .hero {
    background: linear-gradient(135deg, #0a0a1a, #12122a, #1a1a3e);
}

.dark-mode .header {
    background: linear-gradient(135deg, #12122a, #0d0d1a);
}

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