/* ============================================================
   会员 开通 / 续购 弹窗（仅前端演示）—— 开通与续购复用同一套样式
   ============================================================ */
body.vipm-open { overflow: hidden; }
.vipm-mask {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5);
    opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 10000;
}
.vipm-mask.show { opacity: 1; visibility: visible; }
.vipm {
    position: fixed; left: 0; right: 0; top: 0; bottom: 0;
    max-width: 500px; margin: 0 auto;
    display: flex; flex-direction: column;
    background: radial-gradient(120% 55% at 50% 0%, #3a2410 0%, #1c1206 45%, #0d0a06 100%);
    transform: translateY(100%); transition: transform .3s ease; z-index: 10001; color: #f3e7d3;
}
.vipm.show { transform: translateY(0); }
.vipm-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 16px 20px; }

.vipm-topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 2px; }
.vipm-back, .vipm-more {
    color: #e9d9bf !important; font-size: 20px; text-decoration: none !important;
    width: 32px; height: 32px; line-height: 32px; text-align: center; border-radius: 50%; background: rgba(255, 255, 255, 0.08);
}

.vipm-hd { text-align: center; padding: 2px 0 18px; }
.vipm-title { margin: 0; font-size: 22px; font-weight: 800; color: #ffd66b; }
.vipm-subtitle { margin: 8px 0 0; font-size: 12.5px; color: #caa978; }

/* 当前状态卡 */
.vipm-current { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; }
.vipm-current-gray { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); }
.vipm-current-green { background: rgba(46, 160, 90, 0.12); border: 1px solid rgba(74, 200, 120, 0.45); }
.vipm-cur-ico { font-size: 20px; flex-shrink: 0; }
.vipm-cur-main { flex: 1; min-width: 0; }
.vipm-cur-l1 { font-size: 13px; color: #d8c4a4; }
.vipm-cur-l1 b { color: #fff; }
.vipm-current-green .vipm-cur-l1 b { color: #7ee29b; }
.vipm-cur-l2 { margin-top: 3px; font-size: 13px; font-weight: 700; color: #ffe9c2; }
.vipm-cur-l3 { margin-top: 3px; font-size: 11px; color: #a98c63; }
.vipm-cur-btn {
    flex-shrink: 0; align-self: center; padding: 5px 10px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25); color: #e9d9bf !important; font-size: 11.5px; text-decoration: none !important; white-space: nowrap;
}

.vipm-sec-row { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
.vipm-sec-title { font-size: 15px; font-weight: 800; color: #ffe9c2; }
.vipm-sec-hint { font-size: 11px; color: #caa978; }

/* 套餐网格 */
.vipm-pkgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.vipm-pkg {
    position: relative; border-radius: 12px; padding: 16px 10px 12px; text-align: center;
    background: rgba(255, 255, 255, 0.04); border: 1.5px solid rgba(255, 255, 255, 0.12); cursor: pointer; overflow: hidden;
}
.vipm-pkg.on { border-color: #ffc24b; background: linear-gradient(180deg, rgba(255, 180, 60, 0.18), rgba(255, 140, 30, 0.08)); }
.vipm-pkg-ribbon { position: absolute; left: -26px; top: 11px; transform: rotate(-45deg); background: #e2453b; color: #fff; font-size: 9px; padding: 2px 26px; }
.vipm-pkg-badge { position: absolute; right: 0; top: 0; background: linear-gradient(90deg, #ff9a3d, #ff6a00); color: #fff; font-size: 9px; padding: 2px 7px; border-bottom-left-radius: 8px; }
.vipm-pkg-name { font-size: 14px; font-weight: 700; color: #ffe9c2; }
.vipm-pkg-price { margin-top: 6px; font-size: 13px; color: #ffce5e; }
.vipm-pkg-price b { font-size: 26px; font-weight: 800; }
.vipm-pkg-origin { font-size: 11px; color: #8a7657; text-decoration: line-through; margin-top: 2px; }
.vipm-pkg-daily { font-size: 10.5px; color: #a98c63; margin-top: 3px; }
.vipm-pkg-tag { display: inline-block; margin-top: 8px; font-size: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(226, 69, 59, 0.18); color: #ff8a7a; }
.vipm-tag-gold { background: rgba(255, 180, 60, 0.18); color: #ffce5e; }
.vipm-tag-green { background: rgba(74, 200, 120, 0.18); color: #7ee29b; }

/* 权益 */
.vipm-benefits { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 14px; margin-bottom: 18px; }
.vipm-benefits-title { font-size: 14px; font-weight: 800; color: #ffe9c2; margin-bottom: 10px; }
.vipm-benefit-row { font-size: 12.5px; color: #d8c4a4; padding: 5px 0; }
.vipm-benefit-row b { color: #fff7ec; }
.vipm-check { color: #5ed98a; margin-right: 6px; font-weight: 800; }

/* 支付方式 */
.vipm-pays { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.vipm-pay { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1.5px solid rgba(255, 255, 255, 0.12); cursor: pointer; }
.vipm-pay.on { border-color: #ffc24b; background: rgba(255, 180, 60, 0.08); }
.vipm-pay-ico { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; background: rgba(255, 255, 255, 0.1); }
.vipm-pay-name { flex: 1; font-size: 14px; color: #f3e7d3; }
.vipm-pay-tag { font-size: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(74, 200, 120, 0.18); color: #7ee29b; }
.vipm-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); position: relative; flex-shrink: 0; }
.vipm-pay.on .vipm-radio { border-color: #ffc24b; }
.vipm-pay.on .vipm-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #ffc24b; }

/* 说明 */
.vipm-note { background: rgba(255, 255, 255, 0.03); border-radius: 12px; padding: 12px 14px; }
.vipm-note-title { font-size: 12px; font-weight: 700; color: #ffce5e; margin-bottom: 6px; }
.vipm-note p { margin: 0 0 6px; font-size: 11px; line-height: 1.6; color: #a98c63; }
.vipm-note b { color: #d8c4a4; }
.vipm-note-link { display: inline-block; margin-top: 4px; font-size: 11px; color: #ffce5e !important; text-decoration: none !important; }

/* 底部支付条 */
.vipm-bar { flex-shrink: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(20, 14, 6, 0.96); border-top: 1px solid rgba(255, 255, 255, 0.1); }
.vipm-bar-main { display: flex; align-items: center; gap: 12px; }
.vipm-bar-info { flex: 1; min-width: 0; }
.vipm-bar-note { display: block; font-size: 11px; color: #a98c63; }
.vipm-bar-price { font-size: 13px; color: #caa978; }
.vipm-bar-price b { font-size: 22px; font-weight: 800; color: #ffce5e; }
.vipm-bar-price s { color: #8a7657; font-size: 12px; margin-left: 4px; }
.vipm-pay-btn { flex-shrink: 0; padding: 12px 26px; border-radius: 999px; background: linear-gradient(135deg, #FFB088 0%, #FF8FA3 38%, #C44569 76%, #8B2C3F 100%); color: #fff !important; font-size: 15px; font-weight: 800; text-decoration: none !important; white-space: nowrap; }
.vipm-agree { display: block; margin-top: 8px; font-size: 11px; color: #a98c63; }
.vipm-agree a { color: #ffce5e !important; text-decoration: none; }
.vipm-agree input { vertical-align: middle; margin-right: 4px; }

/* ============================================================
   会员相关 居中弹窗：购买成功 / 会员即将到期（仅前端演示）
   ============================================================ */
.vipd-mask {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45);
    display: none; align-items: center; justify-content: center; padding: 0 30px; z-index: 10010;
}
.vipd-mask.show { display: flex; }
.vipd {
    width: 100%; max-width: 330px; background: #fff; border-radius: 18px;
    padding: 18px 18px 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.vipd-head { display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 14px; }
.vipd-title { font-size: 17px; font-weight: 800; color: #1f2329; }
.vipd-x {
    position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    color: #c4c4c4 !important; font-size: 22px; line-height: 1; text-decoration: none !important;
}
.vipd-primary {
    display: block; text-align: center; margin-top: 18px; padding: 13px; border-radius: 999px;
    background: linear-gradient(90deg, #ffd24b, #f5a623); color: #5a3a00 !important;
    font-size: 16px; font-weight: 800; text-decoration: none !important; box-shadow: 0 8px 18px rgba(245, 166, 35, 0.35);
}
.vipd-primary-orange { background: linear-gradient(90deg, #ff9f1a, #f57c00); color: #fff !important; box-shadow: 0 8px 18px rgba(245, 124, 0, 0.35); }
.vipd-link { display: block; text-align: center; margin-top: 14px; color: #9aa0a6 !important; font-size: 14px; text-decoration: none !important; }

/* 购买成功卡 */
.vipd-success-card { background: linear-gradient(180deg, #fff6d6, #ffe9a8); border-radius: 14px; padding: 22px 16px; text-align: center; }
.vipd-crown { font-size: 40px; line-height: 1; }
.vipd-success-l1 { margin-top: 10px; font-size: 15px; color: #7c4a00; }
.vipd-success-l1 b { font-weight: 800; }
.vipd-success-l2 { margin-top: 12px; font-size: 13px; color: #9a6b1f; }
.vipd-success-date { margin-top: 4px; font-size: 20px; font-weight: 800; color: #e2453b; }
.vipd-success-note { margin-top: 14px; font-size: 12px; line-height: 1.7; color: #a07c3a; }

/* 会员即将到期卡 */
.vipd-expire-body { background: #fff8f1; border-radius: 14px; padding: 16px; }
.vipd-expire-hero { text-align: center; padding: 6px 0 12px; border-bottom: 1px dashed #f1d3a6; margin-bottom: 12px; }
.vipd-expire-days-line { font-size: 14px; color: #5a6066; line-height: 1.4; }
.vipd-expire-days-num { font-size: 28px; font-weight: 800; color: #e2453b; padding: 0 4px; vertical-align: -2px; }
.vipd-expire-date { margin-top: 4px; font-size: 13px; color: #9a6b1f; }
.vipd-expire-lose { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #1f2329; }
.vipd-expire-list { margin: 0; padding-left: 18px; }
.vipd-expire-list li { font-size: 12.5px; line-height: 1.65; color: #5a6066; margin-bottom: 2px; }
.vipd-expire-list li:last-child { margin-bottom: 0; }
.vipd-expire-ok { margin: 12px 0 0; font-size: 12.5px; color: #18a85a; font-weight: 600; }

/* ================================================
   Dark-theme overrides — VIP 开通/续购弹窗 + 居中弹窗
   html.app-dark scoped; append-only; no layout props
   vipm-* panel is already dark-themed; only vipd-* dialog needs adjustment
   ================================================ */

/* vipd 居中弹窗：白底 → 深色 surface */
html.app-dark .vipd {
    background: var(--hd-surface);
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.4);
}
html.app-dark .vipd-title {
    color: var(--hd-text);
}
html.app-dark .vipd-x {
    color: var(--hd-text-3) !important;
}
/* html.app-dark .vipd-primary — gold gradient CTA — keep premium feel; color:#5a3a00 kept — dark text on gold btn is intentional */
/* orange CTA — swap to accent gradient */
html.app-dark .vipd-primary-orange {
    background: var(--hd-grad);
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.4);
    /* color:#fff preserved */
}
html.app-dark .vipd-link {
    color: var(--hd-text-3) !important;
}

/* 购买成功卡 — gold tint */
html.app-dark .vipd-success-card {
    background: var(--hd-tint-gold);
}
html.app-dark .vipd-success-l1 {
    color: var(--hd-on-tint-gold);
}
html.app-dark .vipd-success-l2 {
    color: var(--hd-on-tint-gold);
}
html.app-dark .vipd-success-date {
    color: var(--hd-on-tint-red);
}
html.app-dark .vipd-success-note {
    color: var(--hd-text-2);
}

/* 即将到期卡 */
html.app-dark .vipd-expire-body {
    background: var(--hd-tint-orange);
}
html.app-dark .vipd-expire-hero {
    border-bottom-color: var(--hd-border);
}
html.app-dark .vipd-expire-days-line {
    color: var(--hd-text-2);
}
html.app-dark .vipd-expire-days-num {
    color: var(--hd-on-tint-red);
}
html.app-dark .vipd-expire-date {
    color: var(--hd-on-tint-gold);
}
html.app-dark .vipd-expire-lose {
    color: var(--hd-text);
}
html.app-dark .vipd-expire-list li {
    color: var(--hd-text-2);
}
html.app-dark .vipd-expire-ok {
    color: var(--hd-on-tint-green);
}

/* 开通会员套餐弹窗(.vipm-*) 的主 CTA：与首页「暗夜玫瑰·暖金诱惑」主题统一为
   金玫渐变(蜜桃橙→熟桃粉→树莓红→红酒)，即首页下载按钮(.em-dl)的同族金玫主色，
   配玫红光晕 + 金色描边，呼应该主题「金色描边/玫瑰阴影」的招牌质感。
   首页 CTA 原值含极浅蜜桃(#FAD4C0)与近黑红酒(#6B1A2F)两端，本按钮幅面更宽、用白字，
   故收窄到可读的玫红→红酒核心段，避免浅端白字发虚。
   注意：写死色值而非 var(--hd-grad)——本弹窗常挂在详情页，详情页把 --hd-grad 重定义成
   薄荷深绿，跟随 token 会让按钮变绿；写死才能在任何宿主页都对齐首页主题色。 */
html.app-dark .vipm-pay-btn {
    background: linear-gradient(135deg, #FFB088 0%, #FF8FA3 38%, #C44569 76%, #8B2C3F 100%) !important;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(107, 26, 47, 0.55);
    border: 1px solid rgba(244, 212, 168, 0.6) !important;
}

/* ============================================================
   立体感 / 光影 —— 套餐卡 + 确认支付按钮（与速玩空间/邀请页配方对齐）
   原 .vipm-pkg 套餐卡、.vipm-pay-btn 主 CTA 仅平涂底 + 1px 边框，整体偏平。
   套用同款深度配方：外投影抬升 + 顶部内高光 + 底部内暗边 +
   纵向受光渐变 + 左上斜向玻璃高光(::before)，让卡片/按钮有浮起质感。
   仅加阴影/渐变/伪元素，不改布局。.vipm 面板恒为深色，故作用于基础选择器。
   ============================================================ */

/* 套餐卡（周/月/季/年）：玻璃凸面 + 浮起。
   .vipm-pkg 基础已含 position:relative + overflow:hidden，伪元素可直接挂。
   纵向渐变(上亮下暗)模拟受光凸面，亮度与原 rgba(.04) 平涂相当，不改色调。 */
.vipm-pkg {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.30),
        0 1px 3px rgba(0, 0, 0, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 0 -1px 0 rgba(0, 0, 0, 0.28);
}
/* 左上斜向玻璃高光：先于 DOM 中的 ribbon/badge 绘制，故不会盖住角标 */
.vipm-pkg::before {
    content: '';
    position: absolute;
    top: -45%;
    left: -30%;
    width: 65%;
    height: 90%;
    transform: rotate(-15deg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent);
    border-radius: 50%;
    pointer-events: none;
}

/* 选中卡（默认月卡）：金边之上叠金色环境光，作为视觉主角更明显地浮起。
   .vipm-pkg.on 特异性高于 .vipm-pkg，金渐变底与此阴影均覆盖上面的基础卡规则。 */
.vipm-pkg.on {
    box-shadow:
        0 10px 26px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(255, 194, 75, 0.30),
        0 4px 18px rgba(255, 150, 40, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.20),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.vipm-pkg.on::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent);
}

/* 确认支付按钮：玻璃药丸 —— 顶部内高光(受光边) + 底部内暗 + 投影抬升 + 顶部光泽条 */
.vipm-pay-btn {
    position: relative;
    overflow: hidden;
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.28),
        0 2px 5px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.50),
        inset 0 -2px 5px rgba(0, 0, 0, 0.16);
}
/* 顶部光泽：药丸顶半幅白色渐隐，营造高光反射；白字在其上仍清晰 */
.vipm-pay-btn::before {
    content: '';
    position: absolute;
    left: 6%;
    right: 6%;
    top: 2px;
    height: 42%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
    border-radius: 999px;
    pointer-events: none;
}

/* 按钮为金玫渐变：投影换成同色玫红环境光(与首页下载按钮 rgba(255,107,138,.42) 同款) */
html.app-dark .vipm-pay-btn {
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.34),
        0 4px 14px rgba(255, 107, 138, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -2px 5px rgba(0, 0, 0, 0.18);
}

/* 顺带把另外两个面板块(当前状态卡 / 专属权益盒)也做轻量抬升，
   让整张弹窗分层一致；这两块文字多，只加投影不加玻璃高光，避免压字 */
.vipm-current,
.vipm-benefits {
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.24),
        0 1px 2px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
