/* 二维码弹窗样式 */
.qrcode-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.qrcode-modal-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: qrcodeModalSlideIn 0.3s ease-out;
}

@keyframes qrcodeModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.qrcode-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qrcode-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    font-family: Microsoft YaHei;
}

.qrcode-modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-modal-close:hover {
    background-color: #f5f5f5;
    color: #666;
}

.qrcode-modal-body {
    padding: 24px;
    text-align: center;
}

.qrcode-image-container {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

#qrcode-image {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qrcode-tip {
    color: #666;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
    font-family: Microsoft YaHei;
}

/* 二维码按钮样式 */
.qrcode-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: Microsoft YaHei;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.qrcode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.qrcode-btn:active {
    transform: translateY(0);
}

/* 弹窗打开时禁止背景滚动 */
body.qrcode-modal-open {
    overflow: hidden;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .qrcode-modal-container {
        width: 95%;
        margin: 20px;
    }
    
    .qrcode-modal-header {
        padding: 16px 20px 12px;
    }
    
    .qrcode-modal-title {
        font-size: 16px;
    }
    
    .qrcode-modal-body {
        padding: 20px;
    }
    
    #qrcode-image {
        max-width: 180px;
        max-height: 180px;
    }
    
    .qrcode-tip {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .qrcode-modal-container {
        width: 98%;
        margin: 10px;
    }
    
    .qrcode-modal-header {
        padding: 14px 16px 10px;
    }
    
    .qrcode-modal-body {
        padding: 16px;
    }
    
    #qrcode-image {
        max-width: 160px;
        max-height: 160px;
    }
}

/* 加载动画 */
.qrcode-image-container.loading {
    position: relative;
}

.qrcode-image-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: qrcodeSpin 1s linear infinite;
}

@keyframes qrcodeSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
