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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f8f9fa;
    color: #212529;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

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

a {
    color: #e94560;
    text-decoration: none;
}

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

/* 头部 */
header {
    background: linear-gradient(135deg, #0f3460, #1a1a2e);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.logo svg {
    height: 50px;
}

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

nav a {
    color: #fff;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s;
}

nav a:hover {
    background: rgba(233, 69, 96, 0.3);
}

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

.dark-mode-btn {
    background: none;
    border: 2px solid #fff;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.dark-mode-btn:hover {
    background: #fff;
    color: #0f3460;
}

/* 面包屑 */
.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
}

.breadcrumb a {
    color: #e94560;
}

.breadcrumb span {
    color: #999;
}

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #0f3460, #e94560);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

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

.btn {
    display: inline-block;
    background: #fff;
    color: #e94560;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

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

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* 网格布局 */
.grid-3 {
    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 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(5px);
}

.dark-mode .card {
    background: #2a2a4e;
}

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

.card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 15px;
}

.card h3 {
    margin-bottom: 10px;
}

.card p {
    color: #666;
}

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

/* Banner轮播 */
.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.banner-slide {
    display: none;
}

.banner-slide.active {
    display: block;
}

.banner-slide img {
    width: 100%;
    border-radius: 20px;
}

.slider-dots {
    text-align: center;
    margin-top: 20px;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
}

.dot.active {
    background: #e94560;
}

/* FAQ */
.faq-item {
    margin-bottom: 15px;
}

.faq-question {
    background: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: background 0.3s;
}

.dark-mode .faq-question {
    background: #2a2a4e;
}

.faq-question:hover {
    background: #f0f0f5;
}

.dark-mode .faq-question:hover {
    background: #3a3a5e;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s, padding 0.4s;
    padding: 0 20px;
}

.faq-answer.open {
    max-height: 500px;
    padding: 15px 20px;
}

/* 页脚 */
footer {
    background: #0f3460;
    color: #fff;
    padding: 40px 0;
}

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

footer a {
    color: #ffd700;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li {
    margin-bottom: 8px;
}

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

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

.back-to-top:hover {
    transform: scale(1.1);
}

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

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

/* HowTo步骤 */
.howto-step {
    margin-bottom: 20px;
    padding-left: 30px;
    position: relative;
}

.howto-step::before {
    content: counter(step);
    counter-increment: step;
    background: #e94560;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
}

.howto-container {
    counter-reset: step;
}

/* 新闻元数据 */
.news-article {
    margin-bottom: 30px;
}

.news-article h3 {
    margin-bottom: 5px;
}

.news-article .meta {
    color: #999;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        background: #0f3460;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        padding: 20px;
        z-index: 999;
    }

    nav ul.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

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

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

    .section-title h2 {
        font-size: 2rem;
    }

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

    .dark-mode-btn {
        margin-left: auto;
    }
}

/* 小屏额外优化 */
@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }

    .section {
        padding: 50px 0;
    }

    .card {
        padding: 20px;
    }

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