/* =============================================
   VIP 页面样式
   ============================================= */

.vip-page {
    padding-bottom: 72px;
}

/* ===== Hero ===== */
.vip-hero {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 40%, #fde68a 100%);
    border-bottom: 1px solid #fcd34d;
    padding: 52px 0 44px;
    text-align: center;
    margin-bottom: 48px;
}

.vip-hero-icon {
    font-size: 52px;
    color: #f59e0b;
    display: block;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(245,158,11,.3));
}

.vip-hero-title {
    font-size: 26px;
    font-weight: 700;
    color: #78350f;
    margin: 0 0 8px;
}

.vip-hero-sub {
    font-size: 14px;
    color: #92400e;
    margin: 0;
    letter-spacing: .5px;
}

/* ===== Section ===== */
.vip-section { margin-bottom: 52px; }

.vip-section-hd {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}

.vip-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    position: relative;
    padding-left: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

.vip-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 3px;
    background: #f59e0b;
    border-radius: 2px;
}

.vip-section-sub {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== 套餐卡片 ===== */
.vip-plans-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

/* 3个 / 5个：每张占 1/3 行宽，5个时自然形成 3+2 居中 */
.vip-plan-card {
    flex: 0 0 calc((100% - 32px) / 3);
    min-width: 160px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    transition: transform .2s, box-shadow .2s;
}

/* 4个：每张占 1/4 行宽 */
.vip-plans-grid.plans-4 .vip-plan-card {
    flex: 0 0 calc((100% - 48px) / 4);
}

/* 6个及以上：每张占 1/3，两行各3个 */
.vip-plans-grid.plans-6 .vip-plan-card {
    flex: 0 0 calc((100% - 32px) / 3);
}

.vip-plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,.1);
}

/* 推荐套餐 */
.vip-plan-featured {
    border-color: #f59e0b;
    box-shadow: 0 4px 16px rgba(245,158,11,.2);
}

.vip-plan-badge {
    position: absolute;
    top: 12px;
    right: -1px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px 2px 10px;
    border-radius: 4px 0 0 4px;
    letter-spacing: .5px;
}

/* 卡头 */
.vip-plan-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: 14px 16px;
    text-align: center;
}

.vip-plan-featured .vip-plan-header {
    background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
}

.vip-plan-name {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .5px;
}

/* 卡体 */
.vip-plan-body {
    padding: 20px 16px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.vip-plan-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    line-height: 1;
    margin-bottom: 2px;
}

.vip-price-symbol {
    font-size: 16px;
    font-weight: 600;
    color: #dc2626;
    padding-bottom: 4px;
}

.vip-price-amount {
    font-size: 36px;
    font-weight: 700;
    color: #dc2626;
    line-height: 1;
}

.vip-plan-days {
    font-size: 12px;
    color: var(--text-muted);
}

.vip-plan-remark {
    font-size: 12px;
    color: var(--text-muted);
    background: #f8fafc;
    border-radius: 6px;
    padding: 4px 10px;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.5;
}

.vip-plan-action {
    width: 100%;
    margin-top: 8px;
}

.vip-plan-tip-btn {
    display: block;
    width: 100%;
    padding: 9px 0;
    background: #fff7ed;
    border: 1.5px solid #fed7aa;
    border-radius: 8px;
    color: #c2410c;
    font-size: 13px;
    font-weight: 500;
    box-sizing: border-box;
    cursor: default;
}

.vip-plan-buy-btn {
    display: block;
    width: 100%;
    padding: 9px 0;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: opacity .15s;
}

.vip-plan-buy-btn:hover { opacity: .85; color: #fff; }

/* ===== 卡密兑换 ===== */
.redeem-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 28px 32px;
}

.redeem-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.redeem-icon-wrap {
    width: 52px;
    height: 52px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary);
    flex-shrink: 0;
}

.redeem-card-right {
    flex: 1;
    min-width: 0;
}

.redeem-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.redeem-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.redeem-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.redeem-input {
    flex: 1;
    height: 42px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0 14px;
    font-size: 14px;
    font-family: monospace;
    letter-spacing: 1px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    min-width: 0;
}

.redeem-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}

.redeem-btn {
    height: 42px;
    padding: 0 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.redeem-btn:hover { background: var(--primary-hover); color: #fff; }
.redeem-btn:disabled { opacity: .6; cursor: not-allowed; }

.redeem-msg {
    margin-top: 10px;
    font-size: 13px;
    min-height: 18px;
}

.redeem-msg-success { color: #16a34a; }
.redeem-msg-error   { color: #dc2626; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .vip-hero { padding: 36px 0 32px; margin-bottom: 32px; }
    .vip-hero-icon { font-size: 42px; }
    .vip-hero-title { font-size: 20px; }
    .vip-plan-card,
    .vip-plans-grid.plans-4 .vip-plan-card {
        flex: 0 0 calc((100% - 16px) / 2);
    }
    .redeem-card { padding: 20px 16px; }
    .vip-section { margin-bottom: 36px; }
    .vip-section-hd { flex-wrap: wrap; gap: 4px 10px; align-items: center; }
    .vip-section-title { font-size: 15px; }
    .vip-section-sub { font-size: 12px; }
}

@media (max-width: 480px) {
    .vip-plan-card,
    .vip-plans-grid.plans-4 .vip-plan-card {
        flex: 0 0 100%;
    }
    .redeem-card-inner { flex-direction: column; gap: 14px; }
    .redeem-icon-wrap { display: none; }
    .redeem-card-right { width: 100%; }
    .redeem-form { flex-direction: column; }
    .redeem-input, .redeem-btn { width: 100%; box-sizing: border-box; justify-content: center; height: 44px; }
}

/* ===== 支付弹窗 ===== */
.pay-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pay-modal-box {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    overflow: hidden;
}

.pay-modal-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.pay-modal-title { font-size: 16px; font-weight: 600; color: var(--text); }

.pay-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.pay-modal-close:hover { color: var(--text); }

.pay-modal-plan-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.pay-modal-plan-name { font-size: 14px; color: var(--text-muted); }
.pay-modal-plan-price { font-size: 22px; font-weight: 700; color: #e05b3a; }

.pay-modal-methods { padding: 12px 16px; min-height: 80px; }

.pay-modal-loading, .pay-modal-empty {
    text-align: center;
    padding: 24px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.pay-method-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.pay-method-item:last-child { margin-bottom: 0; }
.pay-method-item:hover { border-color: #c7d2fe; background: #f8faff; }
.pay-method-item.selected { border-color: var(--primary); background: #eff6ff; }

.pay-method-label { flex: 1; font-size: 15px; font-weight: 500; color: var(--text); }
.pay-method-check { color: var(--primary); font-size: 18px; opacity: 0; margin-left: auto; flex-shrink: 0; }
.pay-method-item.selected .pay-method-check { opacity: 1; }

.pay-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.pay-confirm-btn {
    flex: 1;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.pay-confirm-btn:hover:not(:disabled) { background: var(--primary-hover); }
.pay-confirm-btn:disabled { opacity: .65; cursor: not-allowed; }

.pay-cancel-btn {
    padding: 12px 20px;
    background: #f1f5f9;
    color: var(--text-muted);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.pay-cancel-btn:hover { background: #e2e8f0; color: var(--text); }
