/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.qr-modal {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .qr-modal {
    transform: scale(1);
}

.qr-modal h3 {
    margin-bottom: 10px;
    font-size: 20px;
    color: var(--text-primary);
}

.qr-modal p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.qr-modal img {
    max-width: 100%;
    height: auto;
    width: 200px; /* 默认最大宽度保持200px */
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* 手机端适配优化 */
@media (max-width: 480px) {
    .qr-modal {
        padding: 30px 20px; /* 减少内边距 */
    }
    
    .qr-modal h3 {
        font-size: 18px;
    }
    
    .qr-modal p {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .qr-modal img {
        width: 180px; /* 稍微缩小图片以适应极小屏幕 */
    }
}

.qr-modal .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    font-size: 18px;
    transition: all 0.2s;
}

.qr-modal .close-btn:hover {
    background: #eee;
    color: #333;
}
