/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", Arial, sans-serif;
}

/* 全局变量 */
:root {
    --primary-color: #2c82e0;
    --secondary-color: #f5f7fa;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e5e9f2;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --app-download-bg: #e8f0fe; /* APP下载区块背景色 */
}

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

/* 文本样式 */
body {
    color: var(--text-color);
    background-color: #fff;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    text-align: center;
    font-weight: 600;
    margin-bottom: 16px;
}

p {
    text-align: left;
    color: var(--text-light);
    line-height: 1.8;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), #4a90e2);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    background: linear-gradient(135deg, #2573d9, #3a80e0);
}

/* 页头样式 */
.header {
    background-color: #fff;
    box-shadow: var(--shadow);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.header-logo h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin: 0;
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.hamburger-icon {
    width: 30px;
    height: 30px;
}

/* 导航菜单 */
.nav-list {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 16px;
    transition: var(--transition);
    padding: 8px 0;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* 横幅样式 */
.hero {
    padding: 60px 0;
    background-color: var(--secondary-color);
    margin-bottom: 60px;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 36px;
    color: var(--text-color);
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 18px;
    margin-bottom: 32px;
    color: var(--text-color);
}

.hero-btn {
    font-size: 18px;
    padding: 14px 32px;
}

.hero-img {
    flex: 1;
    text-align: center;
}

.hero-img img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* 章节标题样式 */
.section-title {
    font-size: 32px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 16px;
    margin-bottom: 32px;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #4a90e2);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 40px;
}

/* 介绍区块（新增图片样式） */
.intro {
    padding: 40px 0 60px;
}

.intro-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.intro-card {
    background-color: #fff;
    padding: 0; /* 移除默认内边距，避免图片间距异常 */
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden; /* 裁剪图片圆角外的部分 */
    display: flex;
    flex-direction: column;
}

.intro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* 介绍卡片图片样式 */
.card-img {
    width: 100%;
    height: 180px; /* 固定图片高度，保证统一 */
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持图片比例，覆盖容器 */
    transition: var(--transition);
}

.intro-card:hover .card-img img {
    transform: scale(1.05); /* hover时图片轻微放大 */
}

/* 介绍卡片内容样式 */
.card-title {
    font-size: 20px;
    color: var(--text-color);
    padding: 0 24px;
    margin-top: 20px;
    margin-bottom: 12px;
}

.card-desc {
    font-size: 14px;
    padding: 0 24px 24px;
    flex: 1; /* 填充剩余空间，保证卡片高度一致 */
}

/* 下载区块 - 优化按钮居中 */
.download {
    padding: 60px 0;
    background-color: var(--secondary-color);
    margin-bottom: 60px;
}

.download-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.download-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center; /* 下载区块内容整体居中 */
    text-align: center;
}

.download-title {
    font-size: 32px;
    color: var(--text-color);
}

.download-desc {
    font-size: 16px;
    margin-bottom: 32px;
    color: var(--text-color);
    max-width: 500px; /* 限制描述文本宽度，提升可读性 */
}

.download-btns {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 300px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center; /* 按钮内内容水平居中 */
    gap: 12px;
    padding: 14px 20px;
    width: 100%; /* 按钮宽度铺满容器 */
}

.download-btn img {
    width: 40px;
    height: 40px;
    flex-shrink: 0; /* 防止图片被压缩 */
}

.download-btn span {
    font-size: 16px;
    flex-shrink: 0; /* 防止文字被压缩 */
}

.download-img {
    flex: 1;
    text-align: center;
}

.download-img img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* 常见问题区块 */
.faq {
    padding: 40px 0 60px;
}

.faq-items {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    cursor: pointer;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.faq-question:hover {
    background-color: #eef2f8;
}

.faq-question span {
    font-size: 18px;
    color: var(--text-color);
}

.faq-icon {
    width: 24px;
    height: 24px;
    transition: var(--transition);
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.show {
    padding: 16px 24px 24px;
    max-height: 500px;
}

/* 关注我们 & APP下载区块 - 新增APP下载背景色 */
.follow-download {
    padding: 40px 0;
    background-color: var(--secondary-color);
    margin-bottom: 40px;
}

.follow-container {
    display: flex;
    justify-content: center; /* 整体内容居中 */
    align-items: center;
    gap: 60px; /* 增大间距，提升视觉 */
}

.follow-us {
    text-align: center;
}

.follow-title, .app-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.qrcode {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* 优化APP下载区块样式，增加背景色 */
.app-download {
    text-align: center;
    background-color: var(--app-download-bg);
    padding: 24px 32px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    min-width: 220px; /* 保证最小宽度 */
}

.app-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.app-link {
    display: flex;
    align-items: center;
    justify-content: center; /* APP下载链接内容居中 */
    gap: 8px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 18px;
    transition: var(--transition);
    padding: 10px 20px;
    border-radius: 8px;
    background-color: #B8B8DC;
    box-shadow: var(--shadow);
    width: 100%; /* 链接宽度铺满容器 */
}

.app-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.app-link img {
    width: 32px;
    height: 38px;
    flex-shrink: 0;
}

/* 页尾样式 */
.footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.footer-col {
    text-align: left;
}

.col-title {
    font-size: 18px;
    color: #fff;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    display: inline-block;
}

.col-list {
    list-style: none;
    text-align: left;
}

.col-list li {
    margin-bottom: 12px;
}

.col-list a {
    color: #b0b7c3;
    text-decoration: none;
    transition: var(--transition);
}

.col-list a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-middle {
    border-top: 1px solid #445668;
    border-bottom: 1px solid #445668;
    padding: 20px 0;
    margin-bottom: 20px;
}

.middle-links {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 24px;
}

.middle-links a {
    color: #b0b7c3;
    text-decoration: none;
    transition: var(--transition);
}

.middle-links a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    color: #b0b7c3;
    font-size: 14px;
}

/* 响应式样式 - 平板 */
@media (max-width: 992px) {
    .hero-container, .download-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content, .download-content {
        width: 100%;
    }

    .intro-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-img {
        height: 150px; /* 平板端缩小图片高度 */
    }

    .follow-container {
        flex-direction: column;
        gap: 32px;
    }

    .app-download {
        width: 100%;
        max-width: 300px;
    }
}

/* 响应式样式 - 手机 */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 0;
        height: 100vh;
        background-color: #fff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: width 0.3s ease;
        overflow: hidden;
        z-index: 999;
    }

    .nav.open {
        width: 250px;
    }

    .nav-list {
        flex-direction: column;
        padding: 80px 20px 20px;
        gap: 0;
    }

    .nav-item {
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
        background-color: #f9fafc; /* 移动端菜单背景色区分 */
    }

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

    .card-img {
        height: 180px; /* 手机端恢复图片高度，保证显示效果 */
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr); /* 移动端页尾一行两个 */
        gap: 32px;
    }

    .hero-title {
        font-size: 28px;
    }

    .section-title {
        font-size: 26px;
    }

    .middle-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .download-btns {
        max-width: 100%;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .header-logo h1 {
        font-size: 20px;
    }

    .hero {
        padding: 40px 0;
    }

    .download-btn {
        padding: 12px 16px;
    }

    .download-btn img {
        width: 36px;
        height: 36px;
    }

    .app-download {
        padding: 20px 24px;
    }

    .app-link {
        font-size: 16px;
        padding: 8px 16px;
    }

    .qrcode {
        width: 150px;
        height: 150px;
    }

    .faq-question span {
        font-size: 16px;
    }

    .card-img {
        height: 150px; /* 小屏手机进一步缩小图片高度 */
    }
}