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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {

    .btn,
    .card,
    nav ul li a {
        -webkit-tap-highlight-color: rgba(52, 152, 219, 0.2);
        tap-highlight-color: rgba(52, 152, 219, 0.2);
    }

    .btn:active,
    .card:active {
        transform: scale(0.98);
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #e0e0e0;
        --card-bg: #2d2d2d;
        --header-bg: #1e1e1e;
        --border-color: #404040;
    }

    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }

    header {
        background-color: var(--header-bg);
    }

    .card {
        background-color: var(--card-bg);
        border: 1px solid var(--border-color);
    }

    .contact-info {
        background-color: var(--card-bg);
        border: 1px solid var(--border-color);
    }

    .popup-content {
        background-color: var(--card-bg);
        color: var(--text-color);
    }

    .close-btn {
        color: var(--text-color);
    }

    .close-btn:hover {
        color: #fff;
    }
}

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

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 60px;
    display: flex;
    align-items: center;
}

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

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

/* 导航菜单 */
nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #3498db;
}

/* 汉堡菜单按钮 */
.hamburger-menu {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    z-index: 1001;
}

.hamburger-menu:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 桌面端标题样式 */
header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

/* 导航菜单容器 */
.nav-menu {
    transition: all 0.3s ease;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* 通用部分样式 */
.info-section,
.download-section,
.resources-section,
.contact-section {
    padding: 80px 0;
}

.info-section h2,
.download-section h2,
.resources-section h2,
.contact-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 60px;
    color: #2c3e50;
    position: relative;
}

.info-section h2::after,
.download-section h2::after,
.resources-section h2::after,
.contact-section h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* 卡片布局 */
.info-cards,
.download-cards,
.resource-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.card:hover {
    transform: translateY(-10px) translateZ(0);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* 卡片进入动画 */
.card {
    opacity: 0;
    transform: translateY(20px) translateZ(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.card.animate {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.card p {
    margin-bottom: 20px;
    color: #666;
}

.download-btn {
    background-color: #2ecc71;
}

.download-btn:hover {
    background-color: #27ae60;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

/* 联系部分 */
.contact-section {
    background-color: white;
}

.contact-info {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-info p strong {
    color: #2c3e50;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
}

footer p {
    font-size: 1rem;
}

/* 弹窗样式 */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupFade 0.3s ease;
}

@keyframes popupFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

#popup-body h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

#popup-body p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #666;
}

/* 响应式设计 - 平板端 */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .info-cards,
    .download-cards,
    .resource-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }

    .card {
        padding: 25px;
    }
}

/* 响应式设计 - 手机端 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    header {
        height: 65px;
        padding: 0;
    }

    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 100%;
    }

    header h1 {
        font-size: 1.4rem;
        margin-bottom: 0;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 显示汉堡菜单按钮 */
    .hamburger-menu {
        display: flex;
        padding: 10px 15px;
        font-size: 1.6rem;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    /* 隐藏导航菜单，准备切换显示 */
    .nav-menu {
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        background-color: #2c3e50;
        max-height: 0;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        opacity: 0;
        transform: translateY(-10px);
    }

    /* 导航菜单展开状态 */
    .nav-menu.active {
        max-height: 400px;
        padding: 20px 0;
        opacity: 1;
        transform: translateY(0);
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    nav ul li {
        margin: 8px 0;
        width: 100%;
    }

    nav ul li a {
        display: flex;
        padding: 15px 20px;
        font-size: 1.1rem;
        color: white;
        text-decoration: none;
        transition: all 0.3s ease;
        border-radius: 8px;
        margin: 0 15px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    nav ul li a:hover,
    nav ul li a:active {
        background-color: rgba(52, 152, 219, 0.2);
        color: #3498db;
        transform: scale(1.02);
    }

    .hero {
        padding: 80px 0;
    }

    .hero h2 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }

    .btn {
        padding: 14px 28px;
        font-size: 1rem;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .info-section,
    .download-section,
    .resources-section,
    .contact-section {
        padding: 60px 0;
    }

    .info-section h2,
    .download-section h2,
    .resources-section h2,
    .contact-section h2 {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }

    .info-cards,
    .download-cards,
    .resource-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        padding: 25px 20px;
        margin: 0 5px;
    }

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

    .card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .popup-content {
        padding: 25px 20px;
        margin: 20px;
        max-height: 85vh;
    }

    .contact-info {
        padding: 25px 20px;
        margin: 0 5px;
    }
}

/* 响应式设计 - 小屏手机 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    header {
        height: 60px;
    }

    header h1 {
        font-size: 1.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hamburger-menu {
        padding: 8px 12px;
        font-size: 1.4rem;
        min-width: 40px;
        min-height: 40px;
    }

    .nav-menu {
        top: 60px;
    }

    .hero {
        padding: 60px 0;
    }

    .hero h2 {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 0.9rem;
        padding: 0 5px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
        min-height: 44px;
    }

    .info-section,
    .download-section,
    .resources-section,
    .contact-section {
        padding: 50px 0;
    }

    .info-section h2,
    .download-section h2,
    .resources-section h2,
    .contact-section h2 {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

    .card {
        padding: 20px 15px;
        margin: 0 2px;
    }

    .card h3 {
        font-size: 1.2rem;
    }

    .card p {
        font-size: 0.9rem;
    }

    .popup-content {
        padding: 20px 15px;
        margin: 15px;
        max-height: 90vh;
    }

    .contact-info {
        padding: 20px 15px;
        margin: 0 2px;
    }

    nav ul li a {
        padding: 12px 15px;
        font-size: 1rem;
        margin: 0 10px;
    }
}

/* 响应式设计 - 超小屏设备 */
@media (max-width: 360px) {
    .container {
        padding: 0 8px;
    }

    header h1 {
        font-size: 1.1rem;
    }

    .hero h2 {
        font-size: 1.3rem;
    }

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

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .card {
        padding: 15px 12px;
    }

    .popup-content {
        padding: 15px 12px;
        margin: 10px;
    }
}