.vip-modal-mask,
.vip-pay-mask,
.vip-success-mask {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(73, 94, 125, 0.18);
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.vip-modal-mask.is-open,
.vip-pay-mask.is-open,
.vip-success-mask.is-open {
    display: flex;
}

.vip-modal {
    width: min(1180px, 96vw);
    min-height: 560px;
    background: linear-gradient(135deg, #edf4ff 0%, #ffffff 55%, #f6fbff 100%);
    border: 1px solid #4477c9;
    border-radius: 8px;
    box-sizing: border-box;
    padding: 26px 28px 22px;
    position: relative;
    color: #2f5fae;
}

.vip-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: #4477c9;
    color: #fff;
    font-size: 28px;
    line-height: 42px;
    cursor: pointer;
}

.vip-limit-message {
    width: 84%;
    margin: 0 auto 20px;
    min-height: 62px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff7f22;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
}

.vip-title-line {
    height: 70px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff7f22;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 26px;
    position: relative;
}

.vip-title-line::before,
.vip-title-line::after {
    content: "------------------------------";
    color: #ff7f22;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0 8px;
}

.vip-card-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.vip-card {
    position: relative;
    min-height: 230px;
    border: 1px solid #4477c9;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.56);
    padding: 12px 14px 10px;
    color: #2f5fae;
    cursor: pointer;
    text-align: center;
    overflow: hidden;
}

.vip-card:hover,
.vip-card.is-selected {
    box-shadow: 0 0 0 2px rgba(68, 119, 201, 0.12);
    background: rgba(255, 255, 255, 0.76);
}

.vip-card-title,
.vip-card-valid,
.vip-card-price,
.vip-card-desc {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.45);
    margin-bottom: 10px;
    padding: 8px 6px;
}

.vip-card-title {
    font-size: 22px;
    font-weight: 800;
}

.vip-card-valid {
    color: #777;
    font-size: 17px;
    font-weight: 700;
}

.vip-card-price {
    color: #2f5fae;
    font-size: 24px;
    font-weight: 800;
    margin-top: 18px;
}

.vip-card-desc {
    margin-top: 34px;
    border-top: 1px dashed #ff9c4c;
    color: #2f66d1;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 700;
}

.vip-card-red {
    color: #f00 !important;
}

.vip-card-title-red {
    color: #f00;
}

.vip-card-check {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 48px;
    height: 42px;
    background: #ef3340;
    color: #fff;
    font-size: 34px;
    line-height: 42px;
    font-weight: 800;
}

.vip-note {
    margin: 30px auto 14px;
    text-align: center;
    color: #777;
    font-size: 22px;
    font-weight: 800;
}

.vip-actions,
.vip-pay-actions {
    display: flex;
    justify-content: center;
    gap: 120px;
    align-items: center;
}

.vip-cancel-btn,
.vip-open-btn {
    min-width: 210px;
    height: 46px;
    border-radius: 8px;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
}

.vip-cancel-btn {
    border: 1px solid #4477c9;
    background: rgba(255, 255, 255, 0.6);
    color: #777;
}

.vip-open-btn {
    border: 0;
    background: #70b344;
    color: #000;
}

.vip-open-btn:disabled,
.vip-cancel-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.vip-pay-modal {
    width: min(760px, 92vw);
    min-height: 560px;
    background: #fff;
    border-radius: 8px;
    position: relative;
    padding: 28px 34px;
    box-sizing: border-box;
    color: #333;
}

.vip-pay-title {
    text-align: center;
    font-size: 26px;
    color: #ff7f22;
    font-weight: 800;
    margin-bottom: 34px;
}

.vip-pay-qrcode-row {
    display: flex;
    justify-content: center;
    gap: 34px;
    margin-bottom: 26px;
}

.vip-pay-qrcode-box {
    width: 260px;
    text-align: center;
}

.vip-pay-qrcode {
    width: 260px;
    height: 260px;
    background: #f7f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    overflow: hidden;
}

.vip-pay-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vip-alipay-pagepay-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.vip-pay-external-link {
    display: inline-block;
    margin-top: 8px;
    color: #2563eb;
    font-size: 13px;
    text-decoration: none;
}

.vip-pay-external-link:hover {
    text-decoration: underline;
}

.vip-pay-text {
    margin-top: 14px;
    font-size: 16px;
    font-weight: 700;
}

.vip-pay-amount {
    text-align: center;
    color: #7a8ca5;
    font-size: 18px;
    margin: 18px 0;
}

.vip-pay-amount strong {
    color: #ff3131;
    font-size: 32px;
}

.vip-pay-note {
    text-align: center;
    color: #93a1b4;
    font-size: 15px;
    margin-bottom: 22px;
}

.vip-success-modal {
    width: min(620px, 90vw);
    height: 290px;
    border: 1px solid #4477c9;
    border-radius: 8px;
    background: linear-gradient(135deg, #edf4ff 0%, #ffffff 60%, #f6fbff 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vip-success-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 42px;
    background: #4477c9;
    border: 0;
    border-radius: 0 8px 0 8px;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.vip-success-text {
    color: #3c68b5;
    font-size: 30px;
    font-weight: 800;
}

@media (max-width: 900px) {
    .vip-card-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .vip-pay-qrcode-row {
        flex-direction: column;
        align-items: center;
    }

    .vip-actions,
    .vip-pay-actions {
        gap: 20px;
        flex-direction: column;
    }
}
/* V0.57 第一批：支付方式选择 + 单订单二维码 + 本地模拟状态展示 */
.vip-pay-method-panel {
    margin: 18px auto 8px;
    max-width: 720px;
    border: 1px dashed rgba(68, 119, 201, 0.35);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.48);
    padding: 14px 18px 16px;
}

.vip-pay-method-title {
    text-align: center;
    color: #2f5fae;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px;
}

.vip-pay-method-list {
    display: flex;
    justify-content: center;
    gap: 18px;
}

.vip-pay-method {
    min-width: 210px;
    border: 1px solid #b9cae8;
    border-radius: 8px;
    background: #fff;
    color: #2f5fae;
    padding: 10px 14px;
    cursor: pointer;
    text-align: left;
}

.vip-pay-method:hover,
.vip-pay-method.is-selected {
    border-color: #4477c9;
    box-shadow: 0 0 0 2px rgba(68, 119, 201, 0.12);
    background: #edf4ff;
}

.vip-pay-method-main {
    display: block;
    font-size: 18px;
    font-weight: 800;
}

.vip-pay-method-sub {
    display: block;
    margin-top: 5px;
    color: #7a8ca5;
    font-size: 13px;
    line-height: 1.35;
}

.vip-pay-order-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 18px;
    margin: -18px auto 18px;
    max-width: 620px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f7f9fc;
    color: #5f6f85;
    font-size: 14px;
    line-height: 1.35;
}

.vip-pay-order-info span {
    color: #2f5fae;
    font-weight: 700;
    word-break: break-all;
}

.vip-pay-qrcode-row-single {
    gap: 0;
    margin-bottom: 18px;
}

@media (max-width: 900px) {
    .vip-pay-method-list {
        flex-direction: column;
        gap: 10px;
    }

    .vip-pay-method {
        width: 100%;
        min-width: 0;
    }

    .vip-pay-order-info {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
 * V0.58 试运营优化：VIP缴费弹窗紧凑化 + 支付页风格统一
 * 说明：
 * 1）本段放在文件末尾，用覆盖方式尽量降低对既有支付逻辑的影响。
 * 2）核心目标：主VIP弹窗高度约压缩到原来的 2/3，小分辨率电脑可一屏展示主要内容。
 * 3）不调整接口、不调整订单、不调整真实支付/模拟支付业务逻辑。
 * ========================================================= */

.vip-modal-mask,
.vip-pay-mask,
.vip-success-mask {
    background: rgba(15, 23, 42, 0.28);
    padding: 14px;
}

.vip-modal {
    width: min(1040px, 94vw);
    min-height: 0;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #dbe5f2;
    border-radius: 16px;
    box-sizing: border-box;
    padding: 18px 20px 16px;
    color: #2f5fae;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

/* 右上关闭按钮：从大块蓝色按钮改为轻量圆形按钮，避免视觉压迫 */
.vip-modal-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 22px;
    line-height: 32px;
    font-weight: 700;
}

.vip-modal-close:hover,
.vip-success-close:hover {
    background: #e2e8f0;
    color: #334155;
}

.vip-limit-message {
    width: auto;
    margin: 0 44px 12px 0;
    min-height: 0;
    padding: 9px 14px;
    border: 1px solid #ffe1c2;
    border-radius: 10px;
    background: #fff7ef;
    color: #ff7f22;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.45;
}

.vip-title-line {
    height: auto;
    margin-bottom: 14px;
    border: 0;
    background: transparent;
    color: #ff7f22;
    font-size: 22px;
    font-weight: 800;
    gap: 12px;
}

.vip-title-line::before,
.vip-title-line::after {
    content: "";
    flex: 1;
    max-width: 200px;
    border-top: 2px dashed #ffb36b;
    color: transparent;
    letter-spacing: 0;
    margin: 0;
}

.vip-card-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.vip-card {
    min-height: 168px;
    border: 1px solid #d8e3f1;
    border-radius: 14px;
    background: #ffffff;
    padding: 12px 12px 10px;
    color: #2f5fae;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.vip-card:hover,
.vip-card.is-selected {
    border-color: #4477c9;
    box-shadow: 0 0 0 2px rgba(68, 119, 201, 0.10);
    background: #f7fbff;
}

.vip-card-title,
.vip-card-valid,
.vip-card-price,
.vip-card-desc {
    background: transparent;
    margin-bottom: 6px;
    padding: 4px 2px;
    border-radius: 0;
}

.vip-card-title {
    font-size: 18px;
    font-weight: 800;
}

.vip-card-valid {
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.vip-card-price {
    color: #2f5fae;
    font-size: 18px;
    font-weight: 800;
    margin-top: 6px;
}

.vip-card-desc {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ffb36b;
    color: #2f66d1;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
}

.vip-card-red,
.vip-card-title-red {
    color: #f00 !important;
}

.vip-card-check {
    right: 0;
    bottom: 0;
    width: 38px;
    height: 34px;
    border-radius: 10px 0 14px 0;
    background: #ef3340;
    color: #fff;
    font-size: 26px;
    line-height: 34px;
    font-weight: 800;
}

.vip-pay-method-panel {
    margin: 14px auto 8px;
    max-width: 760px;
    border: 1px solid #e1eaf5;
    border-radius: 12px;
    background: #fafcff;
    padding: 12px 14px;
}

.vip-pay-method-title {
    color: #2f5fae;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 10px;
}

.vip-pay-method-list {
    gap: 14px;
}

.vip-pay-method {
    min-width: 200px;
    border: 1px solid #c9d7eb;
    border-radius: 10px;
    background: #fff;
    color: #2f5fae;
    padding: 9px 14px;
}

.vip-pay-method:hover,
.vip-pay-method.is-selected {
    border-color: #4477c9;
    box-shadow: 0 0 0 2px rgba(68, 119, 201, 0.10);
    background: #edf4ff;
}

.vip-pay-method-main {
    font-size: 16px;
    font-weight: 800;
}

.vip-pay-method-sub {
    margin-top: 4px;
    color: #7a8ca5;
    font-size: 12px;
    line-height: 1.35;
}

.vip-note {
    margin: 12px auto 10px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 700;
}

.vip-note a {
    color: #2563eb;
    text-decoration: none;
}

.vip-note a:hover {
    text-decoration: underline;
}

.vip-actions,
.vip-pay-actions {
    gap: 24px;
}

.vip-cancel-btn,
.vip-open-btn {
    min-width: 180px;
    height: 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 800;
}

.vip-cancel-btn {
    border: 1px solid #c9d7eb;
    background: #fff;
    color: #6b7280;
}

.vip-open-btn {
    border: 0;
    background: #1e8a78;
    color: #fff;
}

.vip-open-btn:hover {
    background: #147568;
}

/* 支付二维码弹窗同步微调：保留原交互，统一白底轻卡片风格 */
.vip-pay-modal {
    width: min(720px, 92vw);
    min-height: 0;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e4ebf5;
    border-radius: 16px;
    padding: 24px 28px;
    color: #333;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.vip-pay-title {
    color: #ff7f22;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 26px;
}

.vip-pay-order-info {
    margin: -12px auto 16px;
    max-width: 620px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: #5f6f85;
    font-size: 13px;
    line-height: 1.35;
}

.vip-pay-qrcode-row {
    gap: 24px;
    margin-bottom: 18px;
}

.vip-pay-qrcode-box {
    width: 240px;
}

.vip-pay-qrcode {
    width: 240px;
    height: 240px;
    border: 1px solid #e5edf7;
    border-radius: 12px;
    background: #f8fafc;
}

.vip-pay-text {
    margin-top: 12px;
    font-size: 15px;
    font-weight: 700;
}

.vip-pay-amount {
    font-size: 16px;
    margin: 14px 0;
}

.vip-pay-amount strong {
    color: #ff3131;
    font-size: 28px;
}

.vip-pay-note {
    color: #718096;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 18px;
}

/* 支付成功弹窗：同支付二维码页风格 */
.vip-success-modal {
    width: min(420px, 90vw);
    min-height: 230px;
    height: auto;
    border: 1px solid #e4ebf5;
    border-radius: 16px;
    background: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 24px 24px;
    box-sizing: border-box;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.vip-success-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: 0;
    border-radius: 50%;
    color: #64748b;
    font-size: 20px;
    line-height: 32px;
    cursor: pointer;
}

.vip-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #eaf8f1;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 14px;
}

.vip-success-title {
    color: #1f2937;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.vip-success-text {
    color: #64748b;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
    padding: 0 10px;
}

/* 小屏保护：小分辨率电脑优先保持可见性 */
@media (max-width: 1100px) {
    .vip-modal {
        width: min(920px, 94vw);
    }

    .vip-card-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .vip-modal-mask,
    .vip-pay-mask,
    .vip-success-mask {
        align-items: flex-start;
        padding-top: 10px;
    }

    .vip-modal {
        width: 96vw;
        padding: 16px 14px 14px;
    }

    .vip-limit-message {
        margin-right: 40px;
        font-size: 14px;
    }

    .vip-title-line {
        font-size: 20px;
    }

    .vip-card-list {
        grid-template-columns: 1fr;
    }

    .vip-pay-method-list {
        flex-direction: column;
        gap: 10px;
    }

    .vip-pay-method {
        width: 100%;
        min-width: 0;
    }

    .vip-actions,
    .vip-pay-actions {
        flex-direction: column;
        gap: 12px;
    }

    .vip-cancel-btn,
    .vip-open-btn {
        width: 100%;
        min-width: 0;
    }

    .vip-pay-modal {
        width: 96vw;
        padding: 20px 16px 16px;
    }

    .vip-pay-order-info {
        grid-template-columns: 1fr;
    }

    .vip-pay-qrcode-box,
    .vip-pay-qrcode {
        width: 220px;
    }

    .vip-pay-qrcode {
        height: 220px;
    }
}

/* =========================================================
 * V0.58 试运营补丁：支付宝官方二维码在二维码框内居中
 * 问题：
 * - 支付宝 page.pay 二维码前置模式通过 iframe 展示官方二维码页。
 * - 原 iframe 使用 width/height:100%，支付宝页内二维码容易贴到左上角。
 * 处理：
 * - 保持二维码外框尺寸不变。
 * - 将 iframe 自身缩小为接近二维码实际尺寸，并交给外层 flex 容器居中。
 * - 不改支付接口、不改订单逻辑、不改支付宝回调逻辑。
 * ========================================================= */

.vip-pay-qrcode .vip-alipay-pagepay-frame {
    width: 220px;
    height: 220px;
    max-width: 92%;
    max-height: 92%;
    display: block;
    flex: 0 0 auto;
    border: 0;
    background: #fff;
}

/* 小屏二维码框为 220px 时，iframe 留一点边距，避免贴边 */
@media (max-width: 720px) {
    .vip-pay-qrcode .vip-alipay-pagepay-frame {
        width: 204px;
        height: 204px;
        max-width: 92%;
        max-height: 92%;
    }
}

/* =========================================================
 * V0.58 试运营补丁2：支付宝官方二维码内容偏左上修正
 * 背景：
 * - 上一版已让支付宝 iframe 白色背景在二维码框中居中。
 * - 但支付宝官方页面内部二维码仍在 iframe 内容区域左上角。
 * - 跨域 iframe 不能直接修改支付宝页面内部样式。
 * 修正策略：
 * - 保持外层二维码框尺寸不变。
 * - 保持 iframe 缩小后的尺寸不变。
 * - 通过 transform 将 iframe 整体向右下轻微平移；
 *   外层 .vip-pay-qrcode 本身 overflow:hidden，会裁掉多余右下空白。
 * - 这样用户看到的黑色二维码主体会居中落在站点二维码框内。
 * ========================================================= */

.vip-pay-qrcode {
    background: #fff;
}

/* 桌面端：当前二维码框约 240px，支付宝二维码主体约 180px，右下平移后视觉居中 */
.vip-pay-qrcode .vip-alipay-pagepay-frame {
    width: 220px;
    height: 220px;
    max-width: none;
    max-height: none;
    display: block;
    flex: 0 0 auto;
    border: 0;
    background: #fff;
    transform: translate(18px, 18px);
    transform-origin: top left;
}

/* 小屏端：二维码框约 220px，平移量同步收小 */
@media (max-width: 720px) {
    .vip-pay-qrcode .vip-alipay-pagepay-frame {
        width: 204px;
        height: 204px;
        max-width: none;
        max-height: none;
        transform: translate(16px, 16px);
        transform-origin: top left;
    }
}


/* V0.60 fix2：VIP弹窗当前套餐标识，避免左下角会员状态与弹窗显示不一致 */
.vip-card.is-current-plan {
    border-color: #4f6f85;
    box-shadow: inset 0 0 0 1px rgba(79, 111, 133, 0.18);
}

.vip-card-current-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 999px;
    background: #4f6f85;
    color: #fff;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}
