:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --hover-shadow: 0 25px 50px rgba(0,0,0,0.15);
    --border-radius: 20px;
    --warning-bg: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    --warning-border: #ffc107;
    --warning-text: #856404;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.main-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.main-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.header-section {
    padding: 2rem;
    text-align: center;
    background: var(--primary-gradient);
    color: white;
    position: relative;
}

.back-button {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.app-icon-large {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 25px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    margin: 0 auto 1.5rem;
    display: block;
    transition: all 0.3s ease;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.app-icon-large:hover {
    transform: scale(1.05) rotate(5deg);
    border-color: rgba(255, 255, 255, 0.5);
}

.app-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.app-meta {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.content-section {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.app-info-card,
.certificate-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-desc {
    color: #333;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.btn-install {
    background: var(--secondary-gradient);
    border: none;
    border-radius: 15px;
    padding: 16px 28px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    margin-bottom: 1rem;
}

.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.6);
    color: white;
}

/* === 通用 iOS 警告样式（保留原有）=== */
.ios-warning {
    background: var(--warning-bg);
    border: none;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 5px solid var(--warning-border);
    color: var(--warning-text);
}

.ios-warning i {
    margin-right: 10px;
    color: var(--warning-text);
}

/* === 新增：非 iOS 设备二维码区域（专属优化）=== */
#nonIosQrCode {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    text-align: center;
    background: var(--warning-bg);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 5px solid var(--warning-border);
    color: var(--warning-text);
}

#nonIosQrCode .qr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 100%;
}

#nonIosQrCode .fa-info-circle {
    font-size: 1.4em;
    color: var(--warning-text);
}

#nonIosQrCode p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--warning-text);
    font-weight: 500;
}

#nonIosQrCode img {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: contain;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.form-control,
.form-select {
    border-radius: 15px;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    width: 100%;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.file-upload-zone {
    border: 3px dashed #dee2e6;
    border-radius: 18px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(248, 249, 250, 0.6);
    margin-bottom: 1.5rem;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: #667eea;
    background: rgba(231, 243, 255, 0.8);
}

.file-upload-icon {
    font-size: 3rem;
    color: #adb5bd;
    margin-bottom: 1rem;
}

.btn-certificate {
    background: var(--secondary-gradient);
    border: none;
    border-radius: 15px;
    padding: 14px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-certificate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.6);
    color: white;
}

.certificate-info {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: none;
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.certificate-info i {
    margin-right: 10px;
    color: #155724;
}

.progress-container {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 12px;
    height: 15px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.3s ease;
}

.footer-section {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.floating-element:nth-child(1) {
    width: 100px;
    height: 100px;
    background: #667eea;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 80px;
    height: 80px;
    background: #764ba2;
    top: 70%;
    left: 85%;
    animation-delay: 4s;
}

.floating-element:nth-child(3) {
    width: 120px;
    height: 120px;
    background: #28a745;
    top: 40%;
    left: 75%;
    animation-delay: 8s;
}

.floating-element:nth-child(4) {
    width: 60px;
    height: 60px;
    background: #ffc107;
    top: 20%;
    left: 90%;
    animation-delay: 12s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, 50px) rotate(15deg); }
    50% { transform: translate(0, 80px) rotate(0deg); }
    75% { transform: translate(-30px, 50px) rotate(-15deg); }
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        max-width: 100%;
    }

    .header-section {
        padding: 1.5rem;
    }

    .app-icon-large {
        width: 100px;
        height: 100px;
        border-radius: 20px;
    }

    .app-name {
        font-size: 1.5rem;
    }

    .app-meta {
        font-size: 1rem;
    }

    .content-section {
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .app-info-card,
    .certificate-card {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .app-desc {
        font-size: 1rem;
    }

    .btn-install,
    .btn-certificate {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .back-button {
        width: 40px;
        height: 40px;
    }

    .file-upload-zone {
        padding: 1.5rem;
    }

    .file-upload-icon {
        font-size: 2.5rem;
    }

    .footer-section {
        padding: 1.5rem;
        font-size: 0.9rem;
    }

    /* 移动端二维码区域优化 */
    #nonIosQrCode {
        min-height: auto;
        padding: 1.2rem;
    }

    #nonIosQrCode p {
        font-size: 1rem;
    }

    #nonIosQrCode img {
        width: 140px;
        height: 140px;
    }
}