/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 主背景横幅 */
.hero {
    /* 背景图片 */
    background-image: url('../resources/background.jpg');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #000;
    width: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* 网站Logo */
.site-logo {
    position: absolute;
    top: 50px;
    left: 5%;
    z-index: 100;
}

.site-logo img {
    max-height: 120px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* 手机端优化 */
@media (max-width: 768px) {
    .hero {
        background-size: cover;
        background-position: center center;
        min-height: 100vh;
        height: auto;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    animation: fadeInUp 1s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    min-height: 100vh;
    padding-bottom: 4rem;
}

/* 下载区域 - 在背景图内 */
.hero-download {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* PC端显示下载框 */
.download-container {
    position: relative;
    width: 680px;
    max-width: 680px;
}

/* 手机端隐藏下载框，显示进入游戏按钮 */
@media (max-width: 768px) {
    .download-container {
        display: none !important;
    }
    
    .mobile-enter-btn {
        display: block !important;
        width: 100%;
        text-align: center;
    }
}

/* PC端隐藏进入游戏按钮 */
.mobile-enter-btn {
    display: none;
    text-align: center;
    margin-bottom: 30px;
}

.mobile-enter-btn a {
    display: inline-block;
    transition: transform 0.3s;
}

.mobile-enter-btn a:hover {
    transform: scale(1.05);
}

.mobile-enter-btn img {
    max-width: 280px;
    height: auto;
}

/* 下载背景图 */
.download-bg {
    background-image: url('../resources/downloadbg.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    padding: 100px 40px 50px 40px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 40px;
    flex-wrap: wrap;
}

/* 二维码区域 */
.download-code {
    flex-shrink: 0;
    margin-top: 60px;
}

.code-box {
    background-image: url('../resources/downloadcode.png');
    background-size: contain;
    background-position: center 10px;
    background-repeat: no-repeat;
    width: 180px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.code-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin-top: -20px;
}

/* 下载按钮区域 */
.download-buttons {
    flex: 1;
    margin-top: 40px;
}

/* 按钮网格 - 2x2 */
.button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 520px;
    margin: 0 auto;
}

/* 下载按钮 */
.dl-btn {
    display: block;
    position: relative;
    width: 100%;
    cursor: pointer;
}

/* 按钮常规状态 */
.dl-btn .btn-normal {
    width: 100%;
    height: auto;
    display: block;
}

/* 按钮悬停状态 */
.dl-btn .btn-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.dl-btn:hover .btn-hover {
    opacity: 1;
}

.dl-btn:hover .btn-normal {
    opacity: 0;
}

/* 按钮图标 - 叠加在按钮上 */
.dl-btn .btn-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    object-fit: contain;
    pointer-events: none;
}

.game-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.game-subtitle {
    font-size: 1.8rem;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

/* 游戏介绍 */
.intro {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.intro-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #555;
    font-size: 1.2rem;
}

/* 下载区域 */
.download {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.download-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

/* 二维码区域 */
.qr-code {
    text-align: center;
}

.qr-placeholder {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 250px;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-placeholder p {
    color: #333;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.qr-placeholder img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

/* 下载链接区域 */
.download-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.download-link-btn {
    background: rgba(255, 255, 255, 0.2);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
}

.download-link-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.download-link-btn .icon {
    font-size: 2.5rem;
}

.download-link-btn .text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.download-link-btn .platform-name {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.download-link-btn .platform-desc {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 页脚 */
.footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 30px 0;
    text-align: center;
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }

    .game-subtitle {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .intro-text p {
        font-size: 1rem;
    }

    .download-bg {
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
    }

    .download-buttons {
        width: 100%;
        align-items: center;
    }

    .dl-sprite-btn {
        width: 260px;
        height: 65px;
    }

    .code-box {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 2rem;
    }

    .game-subtitle {
        font-size: 1rem;
    }

    .hero {
        min-height: 80vh;
    }

    .hero-download {
        margin-top: 1rem;
    }

    .download-bg {
        padding: 20px 15px;
    }

    .dl-sprite-btn {
        width: 240px;
        height: 60px;
    }

    .dl-sprite-btn .btn-text {
        font-size: 1.1rem;
    }

    .code-box {
        width: 140px;
        height: 140px;
        padding: 15px;
        margin-top: 30px;
    }
}
