/**
 * 游戏下载二维码插件 - 最终修复版（子比主题风格）
 * 修复：所有红色提示文字强制可见，列表圆点恢复
 */

:root {
    --qr-primary: #e74c3c;
    --qr-primary-dark: #c0392b;
    --qr-primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --qr-accent-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --qr-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --qr-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
    --qr-shadow-lg: 0 20px 35px -12px rgba(0, 0, 0, 0.2);
    --qr-modal-radius: 32px;
    --qr-bg-white: rgba(255, 255, 255, 0.98);
}

/* 模态框 */
#qr-modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--qr-bg-white);
    backdrop-filter: blur(2px);
    border-radius: var(--qr-modal-radius);
    width: 340px;
    max-width: 90vw;
    padding: 28px 24px 32px;
    z-index: 100001;
    box-shadow: var(--qr-shadow-lg);
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.3);
    animation: modalIn 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

#qr-modal-container.no-animation { animation: none; }

/* 遮罩 */
.qr-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 100000;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 头部 */
#qr-modal-container .qr-header {
    margin-bottom: 18px;
}

#qr-modal-container .qr-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}

/* 提示文字样式 */
#qr-modal-container .qr-header p {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

/* 二维码容器 */
#temp-qr-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255,255,255,0.6);
    margin: 8px auto 12px;
    transition: transform 0.2s ease;
}

#temp-qr-code:hover { transform: scale(1.01); }
#temp-qr-code canvas, #temp-qr-code img { border-radius: 12px; }

/* 二维码发光 */
.qr-code-ready {
    animation: softGlow 3s infinite ease-in-out;
}

@keyframes softGlow {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.3), 0 10px 20px -5px rgba(0, 0, 0, 0.1); }
    70% { box-shadow: 0 0 0 12px rgba(102, 126, 234, 0), 0 10px 20px -5px rgba(0, 0, 0, 0.1); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0), 0 10px 20px -5px rgba(0, 0, 0, 0.1); }
}

/* 提示小圆标 */
#qr-modal-container .qr-tip {
    background: #f8fafc;
    border-radius: 40px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    margin: 12px 0 20px;
    display: inline-block;
    border: 1px solid #e2e8f0;
}

/* 信息卡片 */
#qr-modal-container .qr-info {
    background: #ffffff;
    border-radius: 24px;
    padding: 18px 20px;
    text-align: left;
    border: 1px solid #eef2ff;
    box-shadow: var(--qr-shadow-sm);
    margin: 16px 0 8px;
}

#qr-modal-container .qr-info-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #667eea;
    margin-bottom: 12px;
    text-align: center;
}

/* 列表圆点强制显示 */
#qr-modal-container .qr-info ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

#qr-modal-container .qr-info li {
    display: list-item;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.65;
}

#qr-modal-container .qr-info li::marker {
    color: #667eea;
}

/* 底部按钮 */
#qr-modal-container .qr-footer {
    margin-top: 24px;
}

.qr-close-btn {
    background: var(--qr-primary-gradient);
    border: none;
    color: white;
    padding: 12px 28px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    width: auto;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.qr-close-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 12px 20px -12px rgba(102, 126, 234, 0.5);
}

.qr-close-btn:active { transform: translateY(1px); }

/* 加载状态 */
.qr-loading {
    padding: 48px 24px;
    text-align: center;
    font-size: 15px;
    color: #4b5563;
}

.qr-loading::after {
    content: "";
    display: block;
    width: 32px;
    height: 32px;
    margin: 20px auto 0;
    border: 3px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* 移动端适配 */
@media (max-width: 480px) {
    #qr-modal-container {
        width: 88vw;
        padding: 20px 18px 24px;
        border-radius: 28px;
    }
    #qr-modal-container .qr-header h2 { font-size: 20px; }
    #temp-qr-code { padding: 10px; }
    .qr-close-btn { padding: 10px 24px; font-size: 14px; }
    #qr-modal-container .qr-info { padding: 14px; }
    #qr-modal-container .qr-info ul { padding-left: 16px; }
}

/* 动画降级 */
@media (prefers-reduced-motion: reduce) {
    #qr-modal-container, .qr-modal-backdrop, .qr-code-ready, .qr-loading::after {
        animation: none !important;
        transition: none !important;
    }
    .qr-close-btn:hover { transform: none; }
}