/* 网盘扫码卡片：与论坛 dm_panqr 的交互保持一致 */
.article-content .pan-card,
.article-content .pan-fallback {
    text-decoration: none !important;
}

.pan-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    margin: 10px 0;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pan-color, #2f6bff), rgba(15, 23, 42, .96));
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
    cursor: pointer;
    vertical-align: middle;
}

.pan-card:hover {
    transform: translateY(-1px);
    filter: brightness(1.12);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .28);
}

.pan-card:active {
    transform: translateY(0);
}

.pan-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    font-size: 18px;
    line-height: 1;
}

.pan-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
}

.pan-txt strong {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.pan-txt small {
    margin-top: 2px;
    color: rgba(255, 255, 255, .76);
    font-size: 11px;
    line-height: 1.3;
}

.pan-arrow {
    margin-left: 2px;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    opacity: .8;
}

.pan-fallback {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
    padding: 6px 11px;
    border: 1px solid #c7dcff;
    border-radius: 8px;
    background: #f2f8ff;
    color: #2166d6 !important;
    font-size: 13px;
    text-decoration: none !important;
}

/* 弹窗 */
.pan-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99990;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.pan-modal.is-open {
    display: flex;
}

.pan-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 24, .72);
    backdrop-filter: blur(3px);
}

.pan-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 388px;
    max-height: calc(100vh - 36px);
    overflow: auto;
    border-radius: 16px;
    background: #fff;
    color: #111827;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
    animation: panIn .18s ease-out;
}

@keyframes panIn {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.pan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #eef2f7;
}

.pan-head-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.pan-cloud {
    font-size: 18px;
    line-height: 1;
}

.pan-head-title strong {
    font-size: 16px;
    line-height: 1.3;
    white-space: nowrap;
}

.pan-name {
    max-width: 96px;
    padding: 2px 8px;
    overflow: hidden;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pan-close {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    font-size: 22px;
    line-height: 26px;
    cursor: pointer;
}

.pan-close:hover {
    background: #f1f5f9;
    color: #475569;
}

.pan-body {
    padding: 14px 18px 18px;
    text-align: center;
}

.pan-qrbox {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 238px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.pan-qrbox img {
    width: 220px;
    height: 220px;
    max-width: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.pan-url {
    max-height: 54px;
    margin-top: 12px;
    padding: 9px 12px;
    overflow: hidden;
    border-radius: 8px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
    word-break: break-all;
}

.pan-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.pan-actions a,
.pan-actions button {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #2563eb;
    border-radius: 8px;
    background: #2563eb;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
}

.pan-actions button {
    background: #fff;
    color: #2563eb !important;
}

.pan-tip {
    margin: 12px 0 0;
    color: #9aa5b4;
    font-size: 11px;
}

body.pan-lock {
    overflow: hidden;
}

@media (max-width: 640px) {
    .pan-card {
        gap: 8px;
        padding: 9px 12px;
    }
    .pan-ico {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    .pan-txt strong {
        font-size: 13px;
    }
    .pan-dialog {
        max-height: calc(100vh - 24px);
    }
    .pan-qrbox img {
        width: 200px;
        height: 200px;
    }
}
