:root {
    --member-teal: #009e91;
    --member-ink: #292929;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--member-ink); background: #f7f7f7; font: 14px/1.6 "Microsoft YaHei", PingFang SC, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.membership-shell { min-height: 100vh; background: #f7f7f7; }

.membership-shell .top-header { position: relative; top: 0; z-index: 20; height: 80px; background: #fff; box-shadow: 0 1px 8px rgba(0, 0, 0, .05); }
.membership-shell .header-container { width: min(1200px, calc(100% - 40px)); height: 80px; margin: 0 auto; padding: 0; display: flex; align-items: center; gap: 18px; }
.membership-shell .logo-section { width: 48px; flex: 0 0 48px; display: flex; justify-content: center; }
.membership-shell .logo-text { max-width: 48px; color: var(--member-teal); font: 700 12px/1.35 "Microsoft YaHei", sans-serif; text-align: center; white-space: normal; }
.membership-shell .nav-menu { min-width: 0; flex: 1; display: flex; align-items: center; }
.membership-shell .nav-item { padding: 28px 11px; color: #333; font-size: 14px; line-height: 24px; white-space: nowrap; }
.membership-shell .nav-item:hover, .membership-shell .nav-item.active { color: var(--member-teal); background: transparent; }
.membership-shell .header-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 20px; }
.membership-shell .membership-nav-link { display: inline-flex; min-width: 50px; height: 20px; padding: 0; align-items: center; justify-content: center; border-radius: 12px; color: #fff; background: var(--member-teal); font: italic 800 14px/20px Arial, sans-serif; }
.header-search-link { position: relative; width: 22px; height: 22px; }
.header-search-link::before { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border: 1.5px solid #222; border-radius: 50%; }
.header-search-link::after { content: ""; position: absolute; right: 1px; bottom: 2px; width: 8px; height: 1.5px; background: #222; transform: rotate(48deg); transform-origin: right center; }
.membership-shell .outline-btn { padding: 5px 12px; border: 1px solid #ddd; border-radius: 3px; color: #666; background: #fff; }
.membership-shell .account-menu { position: relative; }
.membership-shell .account-trigger { min-height: 40px; padding: 0; border: 0; background: transparent; }
.membership-shell .account-avatar { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 2px solid #ddd; border-radius: 50%; color: #fff; background: linear-gradient(155deg, #bad5df 0%, #e0b247 55%, #333 56%, #161616 100%); font-size: 13px; font-weight: 700; }
.membership-shell .account-name, .membership-shell .account-caret { display: none; }
.membership-shell .account-dropdown { position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; min-width: 110px; border: 1px solid #e5e5e5; background: #fff; box-shadow: 0 10px 25px rgba(0, 0, 0, .12); }
.membership-shell .account-menu-item { width: 100%; min-height: 40px; padding: 0 14px; border: 0; border-bottom: 1px solid #eee; display: flex; align-items: center; color: #666; background: #fff; white-space: nowrap; }
.membership-shell .account-menu-item:hover { color: var(--member-teal); }
.membership-shell .mobile-menu-btn { width: 38px; height: 38px; padding: 8px; border: 1px solid #ddd; border-radius: 4px; display: none; flex-direction: column; justify-content: center; gap: 4px; background: #fff; }
.membership-shell .mobile-menu-btn span { width: 100%; height: 2px; background: #555; }

.membership-main { min-height: calc(100vh - 80px); padding: 0 0 72px; }
.membership-hero { width: 100%; aspect-ratio: 24 / 5; min-height: 300px; background: #222 url("images/vip_bg_pc.jpg") center / cover no-repeat; }
.membership-content { position: relative; z-index: 2; width: min(1310px, calc(100% - 48px)); min-height: 510px; margin: -56px auto 0; padding: 32px 52px 42px; border-radius: 12px 12px 0 0; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .05); }
.membership-content-head { margin-bottom: 30px; text-align: center; }
.membership-content-head h1 { margin: 0 0 10px; color: #292929; font-size: 25px; font-weight: 400; }
.membership-content-head p { margin: 0; color: var(--member-teal); font-size: 14px; }
.membership-plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; align-items: stretch; }
.membership-plan-card { position: relative; min-width: 0; min-height: 410px; overflow: hidden; border: 1px solid #f0f0f0; border-radius: 10px 10px 0 0; display: flex; flex-direction: column; background: #fff; box-shadow: 0 8px 25px rgba(20, 30, 45, .06); transition: transform .2s ease, box-shadow .2s ease; }
.membership-plan-card:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(20, 30, 45, .13); }
.membership-plan-head { position: relative; min-height: 66px; padding: 0 16px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--plan-color); }
.membership-plan-head h2 { margin: 0; font-size: 23px; font-weight: 500; }
.membership-plan-badge { position: absolute; top: 7px; right: 7px; padding: 2px 7px; border-radius: 10px; color: var(--plan-color); background: #fff; font-size: 10px; }
.membership-plan-body { display: flex; flex: 1; align-items: center; flex-direction: column; padding: 22px 24px 20px; }
.membership-price { display: flex; align-items: baseline; justify-content: center; color: #252a31; }
.membership-price-symbol { margin-right: 4px; font-size: 18px; font-weight: 700; }
.membership-price-value { font-size: 36px; font-weight: 800; letter-spacing: .02em; }
.membership-daily { min-height: 28px; margin-top: 4px; padding: 3px 14px; border-radius: 15px; color: #fff; background: var(--member-teal); font-size: 12px; }
.membership-original-price { min-height: 22px; margin-top: 47px; color: #333; text-align: center; text-decoration: line-through; }
.membership-duration { width: 100%; margin: 12px 0 10px; padding-top: 12px; border-top: 1px solid #eee; color: var(--member-teal); text-align: center; font-size: 14px; }
.membership-benefits { width: 100%; max-height: 48px; margin: 0 0 16px; padding: 0; overflow: hidden; color: #777; font-size: 12px; list-style: none; text-align: center; }
.membership-benefits li:not(:first-child) { display: none; }
.membership-plan-button { min-width: 146px; min-height: 46px; margin-top: auto; padding: 0 28px; border: 0; border-radius: 24px; color: #fff; background: var(--plan-color); font-size: 16px; font-weight: 700; cursor: pointer; }
.membership-plan-button:hover { filter: brightness(.95); }
.membership-loading, .membership-empty { grid-column: 1 / -1; min-height: 300px; display: grid; place-items: center; color: #888; text-align: center; }
.membership-plan-subtitle,
.membership-mobile-toolbar,
.membership-mobile-hero-card,
.membership-mobile-checkout,
.membership-mobile-benefits { display: none; }

.membership-toast { position: fixed; z-index: 120; right: 24px; bottom: 24px; padding: 12px 18px; border-radius: 6px; color: #fff; background: #ef4444; box-shadow: 0 12px 30px rgba(15, 23, 42, .2); }
.membership-payment-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; }
.membership-payment-modal.hidden, .hidden { display: none !important; }
.membership-payment-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .56); backdrop-filter: blur(2px); }
.membership-payment-card { position: relative; z-index: 1; width: min(430px, calc(100vw - 32px)); overflow: hidden; border-radius: 10px; background: #fff; box-shadow: 0 24px 64px rgba(15, 23, 42, .28); }
.membership-payment-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 15px; border-bottom: 1px solid #edf0f5; }
.membership-payment-header h2 { margin: 0; font-size: 20px; }
.membership-payment-close { width: 30px; height: 30px; border: 0; border-radius: 50%; color: #8a94a3; background: transparent; font-size: 22px; cursor: pointer; }
.membership-payment-body { padding: 8px 20px 4px; }
.membership-payment-row { min-height: 72px; border-bottom: 1px solid #edf0f5; display: grid; grid-template-columns: 105px minmax(0, 1fr); align-items: center; }
.membership-payment-row > span { color: #64748b; font-size: 15px; }
.membership-payment-row > strong { color: #273142; text-align: right; font-size: 15px; }
.membership-payment-row .membership-payment-amount { color: #f02f3b; font-size: 24px; }
.membership-payment-method { color: #07c160 !important; }
.membership-wechat-icon { display: inline-grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: #07c160; font-size: 12px; }
.membership-payment-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 22px 20px 18px; }
.membership-payment-cancel, .membership-payment-submit { min-width: 86px; min-height: 38px; border-radius: 6px; cursor: pointer; }
.membership-payment-cancel { border: 1px solid #d7dee9; color: #526071; background: #fff; }
.membership-payment-submit { border: 1px solid var(--member-teal); color: #fff; background: var(--member-teal); font-weight: 700; }
.membership-payment-submit:disabled { opacity: .65; cursor: wait; }
.membership-payment-result { padding: 25px 10px; text-align: center; }
.membership-payment-result img { display: block; width: min(240px, 80%); margin: 0 auto 14px; }
.membership-payment-result h3 { margin: 0 0 8px; }
.membership-payment-result p { margin: 0; color: #64748b; line-height: 1.7; }
.membership-payment-open { display: inline-flex; min-height: 40px; margin-top: 16px; padding: 0 20px; align-items: center; justify-content: center; border-radius: 6px; color: #fff; background: #07c160; font-weight: 700; }
body.membership-payment-opened { overflow: hidden; }

@media (max-width: 1050px) {
    .membership-shell .nav-item { padding-right: 7px; padding-left: 7px; font-size: 13px; }
    .membership-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .membership-shell .top-header, .membership-shell .header-container { height: 64px; }
    .membership-shell .nav-menu { position: absolute; top: 64px; right: 20px; left: 20px; z-index: 40; display: none; flex-direction: column; align-items: stretch; padding: 8px; border: 1px solid #e5e5e5; background: #fff; box-shadow: 0 14px 30px rgba(0, 0, 0, .15); }
    .membership-shell .nav-menu.open { display: flex; }
    .membership-shell .nav-item { padding: 9px 12px; }
    .membership-shell .mobile-menu-btn { display: flex; }
    .membership-hero { min-height: 220px; }
    .membership-content { width: calc(100% - 28px); margin-top: -34px; padding: 28px 24px 38px; }
}

@media (max-width: 767px) {
    body { min-width: 0; color: #242832; background: #fff; }
    .membership-shell { padding-bottom: 74px; background: #fff; }
    .membership-shell .top-header { display: none; }
    .membership-main { min-height: 100vh; padding: 0; }

    .membership-mobile-toolbar {
        min-height: 58px;
        padding: 0 12px;
        border-bottom: 1px solid #edf0f4;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        background: #fff;
    }
    .membership-mobile-title { min-width: 0; display: inline-flex; align-items: center; gap: 6px; color: #2f333a; font-size: 16px; white-space: nowrap; }
    .membership-mobile-title svg { width: 21px; height: 21px; fill: none; stroke: #727981; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
    .membership-mobile-actions { display: flex; align-items: center; gap: 8px; color: #363a42; font-size: 14px; white-space: nowrap; }
    .membership-mobile-actions button { padding: 8px 0; border: 0; color: inherit; background: transparent; cursor: pointer; }
    .membership-mobile-actions i { width: 1px; height: 16px; background: #b7bbc2; }

    .membership-hero {
        min-height: 0;
        padding: 15px;
        aspect-ratio: auto;
        background: #31394f;
    }
    .membership-mobile-hero-card {
        position: relative;
        min-height: 118px;
        overflow: hidden;
        padding: 22px 20px;
        border: 1px solid rgba(255, 255, 255, .28);
        border-radius: 7px;
        display: flex;
        justify-content: center;
        flex-direction: column;
        color: #55350e;
        background:
            linear-gradient(120deg, rgba(255, 255, 255, .36), transparent 45%),
            linear-gradient(135deg, #ffe6a6 0%, #f7d68f 52%, #e8bc72 100%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
    }
    .membership-mobile-hero-card::after {
        content: "";
        position: absolute;
        right: -12px;
        bottom: -42px;
        width: 190px;
        height: 150px;
        opacity: .16;
        background: repeating-linear-gradient(30deg, transparent 0 22px, #a66c1e 23px 25px);
        transform: rotate(-8deg);
    }
    .membership-mobile-hero-card strong,
    .membership-mobile-hero-card p { position: relative; z-index: 1; }
    .membership-mobile-hero-card strong { font-size: 20px; line-height: 1.35; letter-spacing: .02em; }
    .membership-mobile-hero-card p { margin: 8px 0 0; color: #8c6541; font-size: 14px; line-height: 1.5; }

    .membership-content {
        width: 100%;
        min-height: 0;
        margin: 0;
        padding: 15px 15px 32px;
        border-radius: 0;
        box-shadow: none;
    }
    .membership-content-head { display: none; }
    .membership-plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
    .membership-plan-grid[data-plan-count="1"] { grid-template-columns: minmax(0, 1fr); }
    .membership-plan-grid[data-plan-count="2"],
    .membership-plan-grid[data-plan-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .membership-plan-card {
        min-height: 160px;
        border: 2px solid #e4e4e4;
        border-radius: 9px;
        overflow: visible;
        box-shadow: 0 2px 5px rgba(15, 23, 42, .08);
        cursor: pointer;
        transition: border-color .18s ease, box-shadow .18s ease, color .18s ease;
    }
    .membership-plan-card:hover { transform: none; box-shadow: 0 2px 5px rgba(15, 23, 42, .08); }
    .membership-plan-card.selected { border-color: var(--member-teal); box-shadow: 0 0 0 1px var(--member-teal); }
    .membership-plan-card:focus-visible { outline: 3px solid rgba(0, 158, 145, .22); outline-offset: 2px; }
    .membership-plan-head { min-height: 42px; padding: 7px 3px 0; color: #303238; background: transparent; }
    .membership-plan-head h2 { overflow: hidden; font-size: clamp(13px, 4vw, 17px); font-weight: 700; line-height: 1.25; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
    .membership-plan-badge {
        top: -3px;
        right: -3px;
        padding: 1px 5px;
        border-radius: 0 7px 0 7px;
        color: #fff;
        background: var(--member-teal);
        font-size: 10px;
    }
    .membership-plan-body { min-width: 0; padding: 0 4px 10px; }
    .membership-price { color: #e56a0a; line-height: 1.1; }
    .membership-price-symbol { margin-right: 1px; font-size: 16px; }
    .membership-price-value { font-size: clamp(23px, 7vw, 29px); letter-spacing: 0; }
    .membership-daily { min-height: 23px; margin-top: 7px; padding: 0; color: #3d4148; background: transparent; font-size: 12px; line-height: 23px; white-space: nowrap; }
    .membership-plan-card.selected .membership-daily { color: var(--member-teal); }
    .membership-original-price { min-height: 18px; margin-top: 0; color: #d97706; font-size: 11px; line-height: 18px; text-decoration: none; white-space: nowrap; }
    .membership-duration { display: none; }
    .membership-plan-subtitle { max-width: 100%; min-height: 18px; overflow: hidden; display: block; color: #d97706; font-size: 11px; line-height: 18px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
    .membership-benefits,
    .membership-plan-button { display: none; }
    .membership-loading,
    .membership-empty { min-height: 160px; }

    .membership-mobile-checkout { margin-top: 15px; display: block; }
    .membership-mobile-pay-option {
        min-height: 54px;
        padding: 0 15px;
        border: 1px solid #e3e7ec;
        border-radius: 7px;
        display: flex;
        align-items: center;
        gap: 10px;
        background: #f7f9fc;
    }
    .membership-mobile-pay-option strong { font-size: 16px; font-weight: 500; }
    .membership-mobile-wechat { width: 28px; height: 24px; display: inline-flex; color: #09b83e; }
    .membership-mobile-wechat svg { width: 100%; height: 100%; fill: currentColor; }
    .membership-mobile-radio { width: 21px; height: 21px; margin-left: auto; border: 2px solid var(--member-teal); border-radius: 50%; display: grid; place-items: center; }
    .membership-mobile-radio::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--member-teal); }
    .membership-mobile-buy {
        width: 100%;
        min-height: 48px;
        margin-top: 13px;
        border: 0;
        border-radius: 25px;
        color: #71430c;
        background: linear-gradient(90deg, #ffe9a9, #edbd58);
        box-shadow: 0 5px 14px rgba(215, 162, 65, .2);
        font-size: 18px;
        font-weight: 700;
        cursor: pointer;
    }
    .membership-mobile-buy:disabled { opacity: .58; cursor: wait; }

    .membership-mobile-benefits { margin-top: 18px; display: block; }
    .membership-mobile-benefits h2 { margin: 0 0 8px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--member-teal); font-size: 19px; font-weight: 500; }
    .membership-mobile-benefits h2 span { width: 66px; height: 1px; background: #dbc99d; }
    .membership-mobile-benefits ul { margin: 0; padding: 0; list-style: none; }
    .membership-mobile-benefits li { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #383b42; font-size: 15px; }
    .membership-mobile-benefits li b { width: 19px; height: 19px; flex: 0 0 19px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--member-teal); font-size: 12px; line-height: 1; }

    .membership-payment-modal { align-items: end; padding: 12px 12px calc(78px + env(safe-area-inset-bottom)); }
    .membership-payment-card { width: 100%; border-radius: 14px; }
    .membership-payment-row { grid-template-columns: 88px minmax(0, 1fr); }
    .membership-toast { right: 14px; bottom: calc(82px + env(safe-area-inset-bottom)); left: 14px; text-align: center; }
}
