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

:root {
    --primary: #07c160;
    --primary-dark: #06ad56;
    --secondary: #576b95;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #e8e8e8;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

.header {
    text-align: center;
    padding: 40px 0 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo i {
    font-size: 48px;
    color: var(--primary);
}

.logo h1 {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #06ad56);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-light);
    font-size: 16px;
}

/* 下载卡片 */
.download-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 24px;
}

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

.card-header h2 {
    font-size: 22px;
    font-weight: 600;
}

.version-badge {
    background: #e8f5e9;
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* 平台选择 */
.platform-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.platform-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    color: var(--text);
}

.platform-btn:hover {
    border-color: var(--primary);
    background: #f0fdf4;
}

.platform-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.platform-btn i {
    font-size: 24px;
}

/* 下载区域 */
.download-area {
    text-align: center;
    padding: 20px 0;
}

.download-info {
    margin-bottom: 16px;
    color: var(--text-light);
    font-size: 14px;
}

.download-info span {
    margin: 0 10px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.3);
}

.download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 193, 96, 0.4);
}

.download-btn i {
    font-size: 24px;
}

/* 进度条 */
.progress-container {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #4caf50);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-light);
}

/* 二维码 */
.qr-section {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.qr-code {
    display: inline-block;
    padding: 20px;
    background: white;
    border: 2px dashed var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
}

.qr-placeholder {
    width: 160px;
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-light);
}

.qr-placeholder i {
    font-size: 64px;
    color: var(--primary);
}

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

/* 历史版本 */
.history-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.history-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: background 0.2s;
}

.version-item:hover {
    background: #e8f5e9;
}

.version-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.version-name {
    font-weight: 600;
    color: var(--primary);
}

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

.version-actions {
    display: flex;
    gap: 8px;
}

.version-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.ios-btn {
    background: #e3f2fd;
    color: #1976d2;
}

.ios-btn:hover {
    background: #bbdefb;
}

.android-btn {
    background: #f3e5f5;
    color: #7b1fa2;
}

.android-btn:hover {
    background: #e1bee7;
}

/* 安全验证 */
.verify-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.verify-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.verify-form {
    display: flex;
    gap: 12px;
}

.verify-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.verify-form input:focus {
    border-color: var(--primary);
}

.verify-btn {
    padding: 12px 24px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.3s;
}

.verify-btn:hover {
    background: #4a5f7a;
}

.verify-result {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.verify-result.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
}

.verify-result.error {
    display: block;
    background: #fce4ec;
    color: #c62828;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-light);
    font-size: 14px;
}

.stats {
    margin-top: 8px;
    color: var(--primary);
    font-weight: 500;
}

/* ====== 管理后台样式 ====== */
.admin-body {
    background: #1a1a2e;
}

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

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.admin-header h1 {
    color: white;
    font-size: 24px;
}

.logout-btn {
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.2);
}

.login-card {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 14px;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
}

.login-form input:focus {
    border-color: var(--primary);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: var(--primary-dark);
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.admin-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.admin-card.full-width {
    grid-column: 1 / -1;
}

.admin-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-light);
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

.submit-btn, .reset-btn {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    margin-top: 8px;
}

.reset-btn {
    background: var(--secondary);
}

.submit-btn:hover {
    background: var(--primary-dark);
}

.reset-btn:hover {
    background: #4a5f7a;
}

.inline-form {
    display: inline;
}

.success-msg, .error-msg {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.success-msg {
    background: #e8f5e9;
    color: #2e7d32;
}

.error-msg {
    background: #fce4ec;
    color: #c62828;
}

.version-table {
    overflow-x: auto;
}

.version-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.version-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.version-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border);
}

.version-table input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
}

.action-btns {
    display: flex;
    gap: 4px;
}

.edit-btn, .delete-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.edit-btn {
    background: #e3f2fd;
    color: #1976d2;
}

.delete-btn {
    background: #fce4ec;
    color: #c62828;
}

.edit-btn:hover {
    background: #bbdefb;
}

.delete-btn:hover {
    background: #f8bbd0;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .header {
        padding: 24px 0;
    }
    
    .logo h1 {
        font-size: 28px;
    }
    
    .download-card {
        padding: 20px;
    }
    
    .platform-selector {
        flex-direction: column;
    }
    
    .download-btn {
        padding: 14px 32px;
        font-size: 18px;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .verify-form {
        flex-direction: column;
    }
    
    .version-item {
        flex-direction: column;
        gap: 8px;
    }
    
    .version-actions {
        width: 100%;
    }
    
    .version-actions button {
        flex: 1;
    }
}