/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft Yahei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* 通用容器样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 60px 0;
}

/* 区块标题样式 */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.main-title {
    font-size: 28px;
    color: #222;
    margin-bottom: 10px;
}

.sub-title {
    font-size: 16px;
    color: #666;
}

/* 头部导航样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 999;
}

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

.logo h1 {
    font-size: 24px;
    color: #e63946;
    font-weight: bold;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-item a {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.nav-item a:hover {
    color: #e63946;
}

/* 移动端导航切换按钮（默认隐藏） */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #e63946;
    cursor: pointer;
}

/* 横幅区域样式 */
.hero {
    position: relative;
}

.hero-bg {
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 36px;
    color: #fff;
    margin-bottom: 30px;
}

/* 通用按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #e63946;
    color: #fff;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #d62839;
}

.hero-btn {
    padding: 15px 40px;
    font-size: 20px;
}

/* 介绍区块样式 */
.intro {
    background-color: #f8f9fa;
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.intro-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.intro-card h3 {
    font-size: 18px;
    color: #222;
    margin-bottom: 15px;
}

.intro-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

/* 文章区块样式 */
.article {
    background-color: #fff;
    padding: 60px 0;
}

.article-content {
    line-height: 1.8;
    color: #444;
    font-size: 16px;
}

.article-content p {
    margin-bottom: 20px;
}

/* 下载区块核心样式：PC一行，移动端两列 */
.download {
    background-color: #f5f5f5;
}

.download-grid {
    /* PC端：Flex一行显示，居中均匀分布 */
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 25px;
    flex-wrap: wrap; /* 极端窄屏PC端自动换行（非必要，仅兜底） */
    max-width: 900px; /* 限制PC端宽度，避免按钮过宽 */
    margin: 0 auto;
}

.download-card {
    /* PC端按钮固定宽高范围，保证一行均匀 */
    flex: 1;
    min-width: 180px;
    max-width: 200px;
    background-color: #fff;
    padding: 30px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

.download-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    object-fit: contain; /* 保证图标不变形 */
}

.download-text {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    text-align: center;
}

/* 下载按钮差异化样式 */
.download-card.apple {
    border: 2px solid #0071e3;
}
.download-card.apple .download-text {
    color: #0071e3;
}

.download-card.android {
    border: 2px solid #3ddc84;
}
.download-card.android .download-text {
    color: #3ddc84;
}

.download-card.register:nth-of-type(3) {
    border: 2px solid #e63946;
}
.download-card.register:nth-of-type(3) .download-text {
    color: #e63946;
}

.download-card.register:nth-of-type(4) {
    border: 2px solid #4285f4;
}
.download-card.register:nth-of-type(4) .download-text {
    color: #4285f4;
}

/* 优势区块样式 */
.advantage {
    background-color: #f8f9fa;
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.advantage-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.advantage-card h3 {
    font-size: 18px;
    color: #222;
    margin-bottom: 15px;
}

.advantage-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

/* 友情链接区块样式 */
.friend-link {
    background-color: #f5f5f5;
}

.friend-link-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.friend-link-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.friend-link-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.friend-link-card h3 {
    font-size: 16px;
    color: #222;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.link-list a {
    font-size: 14px;
    color: #666;
    padding: 5px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.link-list a:hover {
    color: #e63946;
    background-color: #f0f0f0;
}

/* 页脚样式 */
.footer {
    background-color: #222;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-more-link {
    text-align: center;
    margin-bottom: 40px;
}

.footer-more-link a {
    font-size: 16px;
    color: #e63946;
    font-weight: 500;
}

.footer-more-link a:hover {
    text-decoration: underline;
}

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

.footer-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 500;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.footer-link-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link-list li a {
    color: #ccc;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link-list li a:hover {
    color: #e63946;
}

/* 关注我们区块 */
.follow-us {
    grid-column: span 4;
    text-align: center;
}

.follow-us .qrcode {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    display: block;
}

/* 版权信息 */
.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
    font-size: 14px;
}

/* 响应式样式 - 移动端 (767px及以下) */
@media (max-width: 767px) {
    /* 导航样式 */
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

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

    .nav-toggle {
        display: block;
    }

    /* 横幅区域适配 */
    .hero-bg {
        height: 350px;
    }

    .hero-content h2 {
        font-size: 28px;
    }

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

    /* 通用区块两列布局 */
    .intro-grid,
    .advantage-grid,
    .friend-link-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    /* 下载区块移动端核心：一行两列 */
    .download-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        max-width: 100% !important;
        flex-wrap: unset !important;
    }

    .download-card {
        min-width: unset !important;
        max-width: unset !important;
        width: 100%;
        padding: 20px 15px !important;
    }

    .download-text {
        font-size: 16px !important;
    }

    .download-icon {
        width: 50px !important;
        height: 50px !important;
    }

    /* 友情链接适配 */
    .friend-link-card {
        padding: 15px;
    }

    .link-list {
        gap: 8px;
    }

    .link-list a {
        font-size: 13px;
        padding: 4px 6px;
    }

    /* 页脚两列布局 */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .follow-us {
        grid-column: span 2 !important;
    }

    /* 标题字体适配 */
    .main-title {
        font-size: 24px;
    }

    .sub-title {
        font-size: 14px;
    }

    /* 卡片内边距适配 */
    .intro-card,
    .advantage-card {
        padding: 20px 15px;
    }
}

/* 超小屏适配 (374px及以下) */
@media (max-width: 374px) {
    .main-title {
        font-size: 22px;
    }

    .intro-card h3,
    .advantage-card h3 {
        font-size: 16px;
    }

    .intro-card p,
    .advantage-card p {
        font-size: 13px;
    }

    .download-icon {
        width: 45px !important;
        height: 45px !important;
    }

    .download-text {
        font-size: 14px !important;
    }
}

/* PC端样式加固 (768px及以上) */
@media (min-width: 768px) {
    .nav-toggle {
        display: none !important;
    }

    /* 强制PC端下载区块为Flex一行 */
    .download-grid {
        display: flex !important;
        grid-template-columns: unset !important;
    }
}