* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-dark: #1e40af;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* ===== 首页下载区域 ===== */

.download-section {
    text-align: center;
    max-width: 480px;
    width: 100%;
}

.app-icon {
    display: block;
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
}

.app-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.app-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    padding: 16px 40px;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

#version-number-btn {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.85;
}

.more-versions {
    margin-top: 16px;
}

.more-versions a {
    color: var(--primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 999px;
}

.more-versions a:hover {
    background: var(--primary-light);
    text-decoration: underline;
}

/* ===== 页脚 ===== */

.footer {
    padding: 24px;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.brand-link {
    color: var(--primary);
    text-decoration: none;
}

.brand-link:hover {
    text-decoration: underline;
}

/* ===== 所有版本页面 ===== */

.versions-page .main-content {
    align-items: flex-start;
    padding-top: 40px;
    padding-bottom: 60px;
}

.versions-container {
    max-width: 640px;
    width: 100%;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.back-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.back-link:hover {
    background: var(--primary-light);
}

#versions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.version-card {
    background: var(--bg-card);
    border-radius: 999px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.version-info {
    margin: 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.version-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.latest-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.version-date {
    font-size: 14px;
    color: var(--text-light);
}

.download-small-btn {
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 999px;
    white-space: nowrap;
}

@media (max-width: 640px) and (orientation: portrait) {
    .main-content {
        padding: 16px;
    }
    
    .app-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 20px;
    }
    
    .app-title {
        font-size: 26px;
    }
    
    .app-subtitle {
        font-size: 15px;
        margin-bottom: 32px;
    }
    
    .download-btn {
        font-size: 18px;
        padding: 14px 32px;
        width: 100%;
        max-width: 320px;
    }
    
    .page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 24px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .back-link {
        align-self: center;
    }
    
    .version-card {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        border-radius: 999px;
        padding: 14px 20px;
    }
    
    .version-info {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .version-name {
        font-size: 16px;
    }
    
    .version-date {
        font-size: 13px;
    }
    
    .download-small-btn {
        width: auto;
        text-align: center;
        font-size: 13px;
        padding: 8px 18px;
    }
}
