/* 邀请码推广二维码弹窗 - 独立样式，避免破坏 main.css */

.invite-qr-overlay {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.invite-qr-card {
    position: relative;
    width: 330px;
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
    animation: inviteQrIn 0.26s ease-out;
}
@keyframes inviteQrIn {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.invite-qr-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.22);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    z-index: 5;
    line-height: 1;
}
.invite-qr-close:hover { background: rgba(0, 0, 0, 0.38); }

.invite-qr-head {
    padding: 14px 16px 12px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary, #07C160) 0%, var(--primary-dark, #06ad56) 100%);
    color: #fff;
    border-radius: 20px 20px 0 0;
}
.invite-qr-head-icon { font-size: 22px; line-height: 1; margin-bottom: 3px; }
.invite-qr-head-title { font-size: 15px; font-weight: 700; }

.invite-qr-body { padding: 12px 16px 0; text-align: center; }
.invite-qr-owner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}
.invite-qr-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}
.invite-qr-owner-meta { text-align: left; }
.invite-qr-owner-name { font-size: 13px; font-weight: 700; color: #111827; line-height: 1.3; }
.invite-qr-owner-tip { font-size: 11px; color: #6b7280; line-height: 1.3; }

.invite-qr-code-wrap {
    position: relative;
    display: inline-block;
    padding: 6px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.invite-qr-code {
    width: 178px;
    height: 178px;
    max-width: 56vw;
    display: block;
    image-rendering: pixelated;
    border-radius: 8px;
}
.invite-qr-code-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 10px;
}
.invite-qr-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid #e5e7eb;
    border-top-color: var(--primary, #07C160);
    border-radius: 50%;
    animation: inviteQrSpin 0.7s linear infinite;
}
@keyframes inviteQrSpin { to { transform: rotate(360deg); } }

.invite-qr-code-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    color: var(--primary, #07C160);
    font-size: 15px;
}
.invite-qr-code-hint { margin-top: 6px; font-size: 11px; color: #6b7280; }

.invite-qr-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 8px;
    font-size: 11px;
    color: #9ca3af;
}
.invite-qr-divider::before,
.invite-qr-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e9f0;
}

.invite-qr-code-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: #f9fafb;
    border: 1.5px dashed #e5e9f0;
    border-radius: 10px;
    min-width: 170px;
    justify-content: center;
}
.invite-qr-code-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #111827;
}
.invite-qr-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border: none;
    border-radius: 7px;
    background: #fff;
    color: #374151;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 2px 5px rgba(0, 0, 0, 0.05);
}
.invite-qr-copy:hover { transform: translateY(-1px); }
.invite-qr-copy:active { transform: translateY(0); }

.invite-qr-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 12px;
}
.invite-qr-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.invite-qr-btn:active { transform: translateY(0); }
.invite-qr-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary, #07C160), var(--primary-dark, #06ad56));
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16);
}
.invite-qr-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2); }
.invite-qr-btn-ghost {
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.invite-qr-btn-ghost:hover { background: #f9fafb; }

@media (max-width: 360px) {
    .invite-qr-card { width: calc(100vw - 18px); }
    .invite-qr-body { padding: 10px 12px 0; }
    .invite-qr-actions { padding: 8px 12px 10px; }
    .invite-qr-code { width: 150px; height: 150px; }
    .invite-qr-code-text { font-size: 14px; letter-spacing: 2px; }
}

/* 邀请码卡片可点击提示 */
.profile-card-item:has(.ri-gift-line) { cursor: pointer; }
.profile-card-item:has(.ri-gift-line):active { transform: scale(0.985); transition: transform 0.15s; }
