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

html, body {
    width: 100%;
    height: 100%;
    font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

/* 页面容器 */
.download-page {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 背景层 */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: rotate(180deg) scaleY(-1);
}

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 51%;
    background: linear-gradient(180deg, #509ded 0%, rgba(80, 157, 237, 0) 100%);
}

/* 内容区域 */
.content-wrapper {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 8.53vw; /* 32rpx / 375 * 100 */
}

/* Logo区域 */
.logo-section {
    margin-top: 0;
}

.logo-box {
    width: 24vw; /* 调小Logo尺寸 */
    height: 22vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 标题区域 */
.title-section {
    margin-top: 3.2vw; /* 12rpx */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.app-name {
    font-size: 5.33vw; /* 20px */
    font-weight: 700;
    color: #20232b;
    letter-spacing: 0.11vw; /* 0.4px */
    margin: 0;
}

.app-desc {
    margin-top: 2.67vw; /* 10rpx */
    font-size: 3.73vw; /* 14px */
    font-weight: 500;
    color: #6f7686;
    width: 70.13vw; /* 263rpx */
    line-height: 1.5;
}

/* 版本信息区域 */
.version-section {
    margin-bottom: 2vw;
    display: flex;
    align-items: center;
    gap: 5.33vw; /* 20rpx */
}

.version-text,
.size-text {
    font-size: 3.4vw; /* 12px */
    font-weight: 500;
    color: #1378DD;
}

/* 下载按钮区域 */
.download-section {
    margin-top: 10vw;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4vw;
}

.download-btn {
    width: 66vw; /* 略微缩小 */
    height: 11.5vw;
    background: #0053A6;
    border: none;
    border-radius: 2.13vw; /* 8rpx */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.6vw; /* 6rpx */
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.download-btn:active {
    opacity: 0.85;
    transform: scale(0.98);
}

.btn-icon {
    width: 5.33vw; /* 20rpx */
    height: 5.33vw;
}

.btn-text {
    font-family: 'PingFang SC', sans-serif;
    font-size: 4.27vw; /* 16px */
    font-weight: 500;
    color: #fff;
}

/* 底部版权信息 */
.footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 10vw); /* 增加底部距离 */
    padding-top: 1vw;
    display: flex;
    justify-content: center;
}

.copyright {
    font-size: 3.73vw; /* 14px */
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

/* 适配大屏设备 - 限制最大宽度 */
@media screen and (min-width: 768px) {
    .download-page {
        max-width: 480px;
        margin: 0 auto;
    }
    
    .bg-layer {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .logo-section {
        margin-top: 0;
    }
    
    .logo-box {
        width: 100px;
        height: 100px;
        border-radius: 20px;
        padding: 15px 18px;
    }
    
    .logo-image {
        width: 70px;
    }
    
    .title-section {
        margin-top: 16px;
    }
    
    .app-name {
        font-size: 24px;
        letter-spacing: 0.5px;
    }
    
    .app-desc {
        margin-top: 12px;
        font-size: 16px;
        width: 300px;
    }
    
    .version-section {
        gap: 24px;
    }
    
    .version-text,
    .size-text {
        font-size: 14px;
    }
    
    .download-section {
        margin-top: 40px;
        gap: 16px;
    }
    
    .download-btn {
        width: 300px;
        height: 54px;
        border-radius: 10px;
        gap: 8px;
    }
    
    .btn-icon {
        width: 24px;
        height: 24px;
    }
    
    .btn-text {
        font-size: 18px;
    }
    
    .footer {
        padding-bottom: 30px;
        padding-top: 30px;
    }
    
    .copyright {
        font-size: 14px;
    }
}

/* 适配小屏设备 */
@media screen and (max-height: 667px) {
    .download-section {
        margin-top: 6vw;
    }
}

/* 适配超小屏设备 */
@media screen and (max-height: 568px) {
    .download-section {
        margin-top: 4vw;
    }
    
    .logo-box {
        width: 20vw;
        height: 20vw;
    }
}
