/* ========== VIP会员弹窗 ========== */
.qm-vip-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.qm-vip-modal.hidden { display: none; }

.qm-vip-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.qm-vip-modal__container {
    position: relative;
    width: 680px;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 顶部栏 */
.qm-vip-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #7c3aed, #ec4899, #f97316);
    color: #fff;
}

.qm-vip-modal__header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qm-vip-modal__title {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.qm-vip-modal__user-tag {
    padding: 2px 10px;
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.qm-vip-modal__user-tag--normal {
    background: rgba(255,255,255,0.15);
}

.qm-vip-modal__header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qm-vip-modal__tool {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    color: #fff;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.qm-vip-modal__tool:hover { background: rgba(255,255,255,0.25); }

.qm-vip-modal__close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.qm-vip-modal__close:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

/* 主内容区 */
.qm-vip-modal__body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8fafc;
}

/* 主布局：左右分栏 */
.qm-vip-main {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.qm-vip-main__left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qm-vip-main__right {
    width: 200px;
    flex-shrink: 0;
}


/* ========== 等级模式：会员类型标签（浏览器标签页风格） ========== */
.qm-vip-tabs {
    position: relative;
    display: flex;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    box-sizing: border-box;
    padding: 12px 12px 0 12px;
}

.qm-vip-tab {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.qm-vip-tab input {
    display: none;
}

.qm-vip-tab__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    border: none;
    padding: 14px 16px;
    transition: all 0.15s ease-in-out;
    position: relative;
}

.qm-vip-tab__name {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    letter-spacing: 1px;
    margin-bottom: 4px;
    transition: all 0.15s;
}

.qm-vip-tab__desc {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    transition: all 0.15s;
}

/* hover效果 */
.qm-vip-tab__inner:hover .qm-vip-tab__name {
    color: #fff;
}

.qm-vip-tab__inner:hover .qm-vip-tab__desc {
    color: rgba(255,255,255,0.8);
}

/* 选中状态 */
.qm-vip-tab input:checked + .qm-vip-tab__inner {
    background-color: #f8fafc;
}

.qm-vip-tab input:checked + .qm-vip-tab__inner .qm-vip-tab__name {
    font-weight: 700;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.qm-vip-tab input:checked + .qm-vip-tab__inner .qm-vip-tab__desc {
    color: #64748b;
}

.qm-vip-tab input:checked + .qm-vip-tab__inner:hover .qm-vip-tab__name {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 圆角凸起效果 - 左侧 */
.qm-vip-tab input:checked + .qm-vip-tab__inner::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    bottom: 0;
    left: -12px;
    border-bottom-right-radius: 300px;
    box-shadow: 4px 4px 0px 4px #f8fafc;
}

/* 圆角凸起效果 - 右侧 */
.qm-vip-tab input:checked + .qm-vip-tab__inner::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    bottom: 0;
    right: -12px;
    border-bottom-left-radius: 300px;
    box-shadow: -4px 4px 0px 4px #f8fafc;
}

/* 第一个标签选中时隐藏左侧圆角 */
.qm-vip-tab:first-child input:checked + .qm-vip-tab__inner::before {
    display: none;
}

/* 最后一个标签选中时隐藏右侧圆角 */
.qm-vip-tab:last-child input:checked + .qm-vip-tab__inner::after {
    display: none;
}

/* ========== 时长模式：套餐选择（百度会员角标样式） ========== */
.qm-vip-plans {
    display: flex;
    gap: 10px;
}

.qm-vip-plan-card {
    flex: 1;
    cursor: pointer;
}

.qm-vip-plan-card input { display: none; }

.qm-vip-plan-card__inner {
    position: relative;
    padding: 18px 10px 14px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    transition: all 0.15s;
    overflow: visible;
}

.qm-vip-plan-card:hover .qm-vip-plan-card__inner {
    border-color: var(--plan-color, #7c3aed);
}

.qm-vip-plan-card input:checked + .qm-vip-plan-card__inner {
    border-color: var(--plan-color, #7c3aed);
}

/* 角标勾选 */
.qm-vip-plan-card__check {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 24px 24px 0;
    border-color: transparent var(--plan-color, #7c3aed) transparent transparent;
    opacity: 0;
    transition: opacity 0.15s;
}

.qm-vip-plan-card__check i {
    position: absolute;
    top: 1px;
    right: -21px;
    font-size: 9px;
    color: #fff;
}

.qm-vip-plan-card input:checked + .qm-vip-plan-card__inner .qm-vip-plan-card__check {
    opacity: 1;
}

.qm-vip-plan-card__badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 10px;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    white-space: nowrap;
    z-index: 1;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

.qm-vip-plan-card__icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 8px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--plan-color, #7c3aed) 12%, #fff), #fff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qm-vip-plan-card__icon i {
    font-size: 16px;
    color: var(--plan-color, #7c3aed);
}

.qm-vip-plan-card__name {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
}

.qm-vip-plan-card__price {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.qm-vip-plan-card__price em {
    font-size: 12px;
    font-weight: 700;
    font-style: normal;
    color: var(--plan-color, #7c3aed);
}

.qm-vip-plan-card__price strong {
    font-size: 22px;
    font-weight: 800;
    color: var(--plan-color, #7c3aed);
}

.qm-vip-plan-card__original {
    font-size: 10px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-top: 2px;
}


/* ========== 特权网格 ========== */
.qm-vip-benefits {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
}

.qm-vip-benefits__title {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.qm-vip-benefits__title i {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.qm-vip-benefits__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.qm-vip-benefit-item {
    padding: 10px 6px;
    background: #f8fafc;
    border-radius: 10px;
    text-align: center;
    transition: background 0.15s;
}

.qm-vip-benefit-item:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(236, 72, 153, 0.03));
}

.qm-vip-benefit-item__icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 6px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(236, 72, 153, 0.08));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qm-vip-benefit-item__icon i {
    font-size: 14px;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.qm-vip-benefit-item__name {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 2px;
}

.qm-vip-benefit-item__desc {
    font-size: 10px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 支付区域（右侧竖向） ========== */
.qm-vip-pay {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.qm-vip-pay__price {
    text-align: center;
    margin-bottom: 16px;
}

.qm-vip-pay__label {
    font-size: 12px;
    color: #64748b;
    display: block;
    margin-bottom: 4px;
}

.qm-vip-pay__price em {
    font-size: 18px;
    font-weight: 700;
    font-style: normal;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.qm-vip-pay__price strong {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.qm-vip-pay__methods {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.qm-pay-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.qm-pay-btn input { display: none; }

.qm-pay-btn i { font-size: 22px; }

.qm-pay-btn[data-method="wechat"] i { color: #07c160; }
.qm-pay-btn[data-method="alipay"] i { color: #1677ff; }
.qm-pay-btn[data-method="balance"] i { color: #7c3aed; }

.qm-pay-btn:hover { border-color: #a78bfa; }

.qm-pay-btn--active {
    border-color: #7c3aed;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(236, 72, 153, 0.03));
}

.qm-vip-pay__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    transition: all 0.15s;
    text-decoration: none;
    margin-top: auto;
}

.qm-vip-pay__submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
}

.qm-vip-pay__row {
    display: block;
}


/* ========== 权限对比表 ========== */
.qm-vip-compare {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.qm-vip-compare__title {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qm-vip-compare__title i {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.qm-vip-compare__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.qm-vip-compare__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 400px;
}

.qm-vip-compare__table th,
.qm-vip-compare__table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.qm-vip-compare__table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.qm-vip-compare__table th:first-child {
    text-align: left;
    border-radius: 8px 0 0 0;
}

.qm-vip-compare__table th:last-child {
    border-radius: 0 8px 0 0;
}

.qm-vip-compare__table th:not(:first-child) {
    color: var(--th-color, #7c3aed);
}

.qm-vip-compare__table td:first-child {
    text-align: left;
    color: #374151;
    font-weight: 500;
}

.qm-vip-compare__table td:first-child i {
    margin-right: 6px;
    color: #94a3b8;
    width: 16px;
}

.qm-vip-compare__table tbody tr:hover {
    background: #fafbfc;
}

.qm-vip-compare__table tbody tr:last-child td {
    border-bottom: none;
}

.qm-vip-compare__table td .fa-check {
    color: #10b981;
}

.qm-vip-compare__table td .fa-times {
    color: #cbd5e1;
}

/* ========== 底部栏 ========== */
.qm-vip-modal__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    color: #94a3b8;
}

.qm-vip-modal__footer a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
}

.qm-vip-modal__footer a:hover {
    color: #7c3aed;
}

.qm-vip-modal__footer span {
    color: #cbd5e1;
}

/* ========== 响应式适配 ========== */
@media (max-width: 768px) {
    .qm-vip-modal__container {
        width: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .qm-vip-modal__header {
        padding: 10px 12px;
    }
    
    .qm-vip-modal__title {
        font-size: 14px;
    }
    
    .qm-vip-modal__tool {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .qm-vip-modal__body {
        padding: 12px;
    }
    
    /* 主布局改为上下结构 */
    .qm-vip-main {
        flex-direction: column;
    }
    
    .qm-vip-main__right {
        width: 100%;
    }
    
    /* 会员类型标签 */
    .qm-vip-tabs {
        padding: 10px 10px 0 10px;
        border-radius: 0.5rem;
    }
    
    .qm-vip-tab__inner {
        padding: 10px 8px;
    }
    
    .qm-vip-tab__name {
        font-size: 13px;
    }
    
    .qm-vip-tab__desc {
        font-size: 10px;
    }
    
    .qm-vip-tab input:checked + .qm-vip-tab__inner::before,
    .qm-vip-tab input:checked + .qm-vip-tab__inner::after {
        width: 8px;
        height: 8px;
    }
    
    .qm-vip-tab input:checked + .qm-vip-tab__inner::before {
        left: -8px;
        box-shadow: 3px 3px 0px 3px #f8fafc;
    }
    
    .qm-vip-tab input:checked + .qm-vip-tab__inner::after {
        right: -8px;
        box-shadow: -3px 3px 0px 3px #f8fafc;
    }
    
    /* 套餐卡片 */
    .qm-vip-plans {
        flex-wrap: wrap;
    }
    
    .qm-vip-plan-card {
        flex: 1 1 calc(50% - 5px);
        min-width: calc(50% - 5px);
    }
    
    .qm-vip-plan-card__inner {
        padding: 12px 8px;
    }
    
    .qm-vip-plan-card__icon {
        width: 32px;
        height: 32px;
    }
    
    .qm-vip-plan-card__name {
        font-size: 12px;
    }
    
    .qm-vip-plan-card__price strong {
        font-size: 18px;
    }
    
    /* 特权网格 */
    .qm-vip-benefits {
        padding: 12px;
    }
    
    .qm-vip-benefits__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .qm-vip-benefit-item {
        padding: 8px 4px;
    }
    
    .qm-vip-benefit-item__icon {
        width: 32px;
        height: 32px;
    }
    
    .qm-vip-benefit-item__name {
        font-size: 11px;
    }
    
    .qm-vip-benefit-item__desc {
        font-size: 9px;
    }
    
    /* 支付区域 */
    .qm-vip-pay {
        padding: 12px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    
    .qm-vip-pay__row {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
    }
    
    .qm-vip-pay__price {
        margin-bottom: 0;
        text-align: left;
    }
    
    .qm-vip-pay__price strong {
        font-size: 24px;
    }
    
    .qm-vip-pay__methods {
        margin-bottom: 0;
    }
    
    .qm-pay-btn {
        width: 36px;
        height: 36px;
    }
    
    .qm-pay-btn i {
        font-size: 18px;
    }
    
    .qm-vip-pay__submit {
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
        margin-top: 0;
    }
    
    /* 对比表 */
    .qm-vip-compare {
        padding: 12px;
    }
    
    .qm-vip-compare__table {
        font-size: 12px;
    }
    
    .qm-vip-compare__table th,
    .qm-vip-compare__table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .qm-vip-modal {
        padding: 0;
    }
    
    .qm-vip-modal__header-right .qm-vip-modal__tool {
        display: none;
    }
    
    .qm-vip-plan-card {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .qm-vip-benefits__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .qm-vip-pay {
        flex-direction: column;
    }
    
    .qm-vip-pay__row {
        width: 100%;
        justify-content: space-between;
    }
    
    .qm-vip-pay__submit {
        width: 100%;
    }
}
