* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    overflow: hidden;
    background: #525151c2;
    touch-action: manipulation;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/pic/background.jpg') no-repeat center center;
    background-size: cover;
    z-index: -1;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
    padding-bottom: env(safe-area-inset-bottom);
}

/* 按钮网格布局 */
.button-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4vh;
    width: 90vw;
    max-width: 500px;
}

.action-btn {
    width: 100%;
    height: 20vh;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(0.98);
}

.btn-text {
    font-size: 7vw;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 8px;
}

.btn-subtext {
    font-size: 4vw;
    opacity: 0.8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10vh auto;
    padding: 0;
    border-radius: 20px;
    width: 90vw;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-body {
    padding: 30px 25px;
}

/* 进度条样式 */
.progress-container {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

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

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

/* 二维码样式 */
.qr-section {
    text-align: center;
}

.qr-title {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600;
}

.qr-code-container {
    width: 70vw;
    height: 70vw;
    max-width: 280px;
    max-height: 280px;
    margin: 0 auto 25px;
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

#qrCanvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px;
}

.qr-tip {
    color: #666;
   margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.4;
}

.download-link {
       display: none;

    padding: 14px 28px;
    background: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.download-link:active {
    background: #1976D2;
    transform: translateY(1px);
}

.close-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.close-btn:active {
    background: #545b62;
    transform: translateY(1px);
}

/* 横屏适配 */
@media (orientation: landscape) {
    .button-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5vw;
    }
    
    .action-btn {
        height: 25vh;
    }
    
    .btn-text {
        font-size: 5vw;
    }
    
    .btn-subtext {
        font-size: 3vw;
    }
    
    .modal-content {
        margin: 5vh auto;
    }
}

/* 大屏手机适配 */
@media (min-width: 768px) and (orientation: portrait) {
    .button-grid {
        gap: 5vh;
    }
    
    .action-btn {
        height: 18vh;
        min-height: 140px;
    }
    
    .btn-text {
        font-size: 32px;
    }
    
    .btn-subtext {
        font-size: 18px;
    }
}

/* 防止iOS Safari工具栏遮挡 */
@supports (padding: max(0px)) {
    .container {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* 二维码备用样式 */
/* 二维码备用样式 */
.qr-fallback {
    padding: 20px;
    text-align: center;
    color: #666;
}

.qr-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.qr-fallback p {
    margin: 10px 0;
    line-height: 1.4;
}

.qr-url {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    word-break: break-all;
    font-size: 12px;
    font-family: monospace;
    border: 1px solid #e0e0e0;
}

.qr-instruction {
    font-size: 14px;
    color: #999;
}

.qr-placeholder {
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 40px 20px;
}

/* 确保二维码容器样式正确 */
.qr-code-container {
    width: 70vw;
    height: 70vw;
    max-width: 280px;
    max-height: 280px;
    margin: 0 auto 25px;
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.qr-code-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}