/**
 * VIP Page - Apple Minimalist Style
 * 子主题样式，覆盖父主题 b2/Pages/vips.php 的默认样式
 */

/* ========== Reset parent VIP styles ========== */
#vips {
    --vip-accent: #0071e3;
    --vip-accent-hover: #0077ed;
    --vip-accent-soft: rgba(0, 113, 227, 0.08);
    --vip-text-primary: #1d1d1f;
    --vip-text-secondary: #86868b;
    --vip-text-tertiary: #afafb2;
    --vip-bg: #ffffff;
    --vip-card-bg: #ffffff;
    --vip-border: rgba(0, 0, 0, 0.04);
    --vip-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --vip-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
    --vip-radius: 20px;
    --vip-radius-sm: 14px;
    --vip-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --vip-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --vip-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --vip-gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --vip-font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'PingFang SC', 'Noto Sans CJK SC', sans-serif;
}

#vips {
    background: #fff;
    position: relative;
    overflow: hidden;
}

#vips * {
    font-family: var(--vip-font);
}

#vips .zx-vip-emoji-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#vips .zx-vip-emoji {
    position: absolute;
    user-select: none;
    filter: grayscale(0.08);
    line-height: 1;
    animation: vipFloat 18s ease-in-out infinite;
}

#vips .vip-top,
#vips .vip-page {
    position: relative;
    z-index: 1;
}

/* ========== Animations ========== */
@keyframes vipFadeInUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes vipFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes vipScaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes vipSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes vipShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes vipFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-12px) rotate(1deg); }
    66% { transform: translateY(6px) rotate(-1deg); }
}

@keyframes vipPulseGlow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes vipGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes vipCheckPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* ========== Top Section - Hero ========== */
#vips .vip-top {
    background: linear-gradient(180deg, #fff 0%, #fbfbfd 100%);
    border-bottom: none;
    margin-top: -24px;
    margin-bottom: 0;
    padding: 118px 0 88px;
    position: relative;
    overflow: hidden;
}

#vips .vip-top::before,
#vips .vip-top::after {
    display: none;
}

#vips .vip-top > div {
    position: relative;
    z-index: 1;
    flex-flow: column;
    align-items: center;
}

#vips .zx-vip-hero {
    width: min(980px, calc(100% - 40px));
    margin: 0 auto 42px;
    text-align: center;
    position: relative;
    z-index: 2;
}

#vips .zx-vip-eyebrow {
    display: inline-flex;
    margin: 0 0 16px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(0, 113, 227, 0.06);
    color: #0066cc;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    animation: vipFadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}

#vips .zx-vip-hero h1 {
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #1d1d1f;
    margin: 0 auto;
    max-width: 700px;
    line-height: 1.1;
    opacity: 0;
    animation: vipFadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards;
}

#vips .zx-vip-subtitle {
    max-width: 520px;
    margin: 18px auto 0;
    font-size: clamp(16px, 1.8vw, 20px);
    color: #6e6e73;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.5;
    opacity: 0;
    animation: vipFadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.22s forwards;
}

#vips .zx-vip-status {
    width: min(560px, 100%);
    margin: 38px auto 0;
    padding: 22px 28px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 30px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    opacity: 0;
    animation: vipFadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.32s forwards;
}

#vips .zx-vip-status-label {
    color: #86868b;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

#vips .zx-vip-status strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #1d1d1f;
    font-size: 24px;
    font-weight: 720;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

#vips .zx-vip-status small {
    color: #6e6e73;
    font-size: 14px;
    line-height: 1.45;
}

#vips .zx-vip-status.is-closed {
    border-color: rgba(255, 149, 0, 0.18);
    background: rgba(255, 251, 245, 0.78);
}

#vips .zx-vip-status.is-active {
    border-color: rgba(0, 113, 227, 0.16);
    background: rgba(248, 251, 255, 0.8);
}

#vips .zx-vip-benefits {
    width: min(680px, 100%);
    margin: 24px auto 0;
    padding: 20px 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.75);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    opacity: 0;
    animation: vipFadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.42s forwards;
}

#vips .zx-vip-benefits-head {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 18px;
}

#vips .zx-vip-benefits-head span {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1d1d1f;
}

#vips .zx-vip-benefits-head small {
    font-size: 13px;
    color: var(--vip-text-secondary);
}

#vips .zx-vip-benefit-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

#vips .zx-vip-benefit {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 13px;
    border-radius: 999px;
    background: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.04);
    color: #1d1d1f;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
}

/* ========== VIP Count Bar ========== */
#vips .vip-count {
    margin-top: 34px;
    width: 100%;
    opacity: 0;
    animation: vipFadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

#vips .vip-count ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

#vips .vip-count ul li {
    width: auto;
    flex: 0 1 auto;
}

#vips .vip-count ul li .vip-in {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 13px 22px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.055);
    border: none;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: default;
}

#vips .vip-count ul li .vip-in:hover {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 10px 26px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

#vips .vip-count ul li .vip-in > span:first-child {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
}

#vips .vip-count ul li .vip-in .vip-in-number {
    font-size: 13px;
    color: var(--vip-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

#vips .vip-count ul li .vip-in .vip-in-number b {
    font-weight: 400;
    color: var(--vip-text-tertiary);
}

#vips .vip-count ul li .vip-in button.empty {
    background: var(--vip-accent);
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    margin: 0;
    line-height: 1.4;
}

#vips .vip-count ul li .vip-in button.empty:hover {
    background: var(--vip-accent-hover);
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

#vips .vip-count ul li .vip-in button.empty:active {
    transform: scale(0.97);
}

/* ========== Current User Status ========== */
#vips .vip-current {
    display: none;
}

/* ========== Main Content Area ========== */
#vips .vip-page {
    padding-top: 48px;
    padding-bottom: 100px;
}

#vips .vip-page main.site-main {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

/* ========== VIP Plans Grid ========== */
#vips .vip-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

#vips .vip-item {
    width: 100%;
    padding: 0;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

#vips .vip-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

#vips .vip-item:nth-child(1) { transition-delay: 0.05s; }
#vips .vip-item:nth-child(2) { transition-delay: 0.12s; }
#vips .vip-item:nth-child(3) { transition-delay: 0.19s; }
#vips .vip-item:nth-child(4) { transition-delay: 0.26s; }

#vips .vip-list-in {
    background: var(--vip-card-bg);
    border-radius: var(--vip-radius);
    padding: 40px 28px 36px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), inset 0 0 0 0.5px rgba(0, 0, 0, 0.04);
    border: none;
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Top accent gradient bar */
#vips .vip-list-in::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--vip-gradient-1);
    opacity: 0;
    transition: opacity 0.4s ease;
}

#vips .vip-item:nth-child(1) .vip-list-in::before { background: linear-gradient(90deg, #c471f5, #fa71cd); }
#vips .vip-item:nth-child(2) .vip-list-in::before { background: linear-gradient(90deg, #f6d365, #fda085); }
#vips .vip-item:nth-child(3) .vip-list-in::before { background: linear-gradient(90deg, #a18cd1, #fbc2eb); }
#vips .vip-item:nth-child(4) .vip-list-in::before { background: linear-gradient(90deg, #667eea, #764ba2); }

#vips .vip-item:hover .vip-list-in {
    box-shadow: var(--vip-shadow-hover);
    transform: translateY(-8px);
}

#vips .vip-item:hover .vip-list-in::before {
    opacity: 1;
}

/* Subtle inner glow on hover */
#vips .vip-list-in::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--vip-radius);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

#vips .vip-item:nth-child(1) .vip-list-in::after { box-shadow: inset 0 0 0 1px rgba(196, 113, 245, 0.15); }
#vips .vip-item:nth-child(2) .vip-list-in::after { box-shadow: inset 0 0 0 1px rgba(246, 211, 101, 0.15); }
#vips .vip-item:nth-child(3) .vip-list-in::after { box-shadow: inset 0 0 0 1px rgba(161, 140, 209, 0.15); }
#vips .vip-item:nth-child(4) .vip-list-in::after { box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.15); }

#vips .vip-item:hover .vip-list-in::after {
    opacity: 1;
}

/* ========== Plan Header ========== */
#vips .vip-list-in h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 0 0 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* ========== Price Display ========== */
#vips .vip-price {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--vip-border);
    position: relative;
    z-index: 1;
}

#vips .vip-price .vip-price-money {
    font-size: 48px;
    font-weight: 700;
    color: var(--vip-text-primary);
    letter-spacing: -2px;
    line-height: 1;
}

#vips .vip-price .vip-price-money span {
    font-size: inherit;
    font-weight: inherit;
}

#vips .vip-price .vip-price-day {
    font-size: 14px;
    color: var(--vip-text-secondary);
    margin-top: 8px;
    font-weight: 400;
}

/* ========== Features List ========== */
#vips .vip-row {
    flex: 1;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

#vips .vip-row ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

#vips .vip-row ul li.vip-allow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 0;
    font-size: 14px;
    color: var(--vip-text-tertiary);
    transition: color 0.25s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

#vips .vip-row ul li.vip-allow:last-child {
    border-bottom: none;
}

#vips .vip-row ul li.vip-allow.allow {
    color: var(--vip-text-primary);
}

#vips .vip-row ul li.vip-allow > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Custom check/close icons */
#vips .vip-row ul li.vip-allow > div:last-child {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

#vips .vip-row ul li.vip-allow > div:last-child svg,
#vips .vip-row ul li.vip-allow > div:last-child i {
    width: 16px;
    height: 16px;
    color: #d1d1d6;
    transition: all 0.25s ease;
}

#vips .vip-row ul li.vip-allow.allow > div:last-child svg,
#vips .vip-row ul li.vip-allow.allow > div:last-child i {
    color: #30d158;
}

#vips .vip-row ul li.vip-allow.allow > div:last-child span svg {
    width: 12px;
    height: 12px;
    color: #fff;
}

/* ========== Buy Button ========== */
#vips .vip-buy {
    text-align: center;
    margin-top: auto;
    position: relative;
    z-index: 1;
}

#vips .vip-buy button {
    width: 100%;
    padding: 15px 32px;
    background: var(--vip-accent);
    color: #fff;
    border: none;
    border-radius: var(--vip-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    letter-spacing: 0;
    position: relative;
    overflow: hidden;
}

/* Shimmer effect on button */
#vips .vip-buy button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

#vips .vip-buy button:hover {
    background: var(--vip-accent-hover);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.3);
}

#vips .vip-buy button:hover::after {
    left: 100%;
}

#vips .vip-buy button:active {
    transform: scale(0.98);
}

/* ========== FAQ Section ========== */
#vips .vip-footer {
    max-width: 720px;
    margin: 100px auto 0;
    text-align: center;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

#vips .vip-footer.is-visible {
    opacity: 1;
    transform: translateY(0);
}

#vips .vip-footer > h2 {
    font-size: 40px;
    font-weight: 700;
    color: var(--vip-text-primary);
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

#vips .vip-footer > p {
    font-size: 17px;
    color: var(--vip-text-secondary);
    margin: 0 0 40px;
}

#vips .vip-faq {
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
}

#vips .vip-faq .vip-faq-list {
    background: var(--vip-card-bg);
    border-radius: var(--vip-radius-sm);
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), inset 0 0 0 0.5px rgba(0, 0, 0, 0.04);
    border: none;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#vips .vip-faq .vip-faq-list:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), inset 0 0 0 0.5px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

#vips .vip-faq .vip-faq-list h2 {
    font-size: 17px;
    font-weight: 600;
    color: var(--vip-text-primary);
    padding: 20px 24px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 0;
}

#vips .vip-faq .vip-faq-list h2::after {
    content: '+';
    font-size: 22px;
    font-weight: 300;
    color: var(--vip-text-secondary);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    flex-shrink: 0;
    margin-left: 16px;
}

#vips .vip-faq .vip-faq-list.is-open h2::after {
    transform: rotate(45deg);
}

#vips .vip-faq .vip-faq-list p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--vip-text-secondary);
    padding: 0 24px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s ease,
                padding-bottom 0.3s ease;
}

/* Override parent theme's .b2-hidden { display: none } */
#vips .vip-faq .vip-faq-list.is-open p {
    display: block !important;
    max-height: 300px;
    opacity: 1;
    padding-bottom: 20px;
}

/* ========== Responsive Design ========== */
@media (max-width: 1080px) {
    #vips .vip-list {
        grid-template-columns: repeat(2, 1fr);
        max-width: 680px;
    }
}

@media (max-width: 768px) {
    #vips .vip-top {
        padding: 76px 20px 56px;
    }

    #vips .zx-vip-hero h1 {
        font-size: 34px;
        letter-spacing: -0.035em;
    }

    #vips .zx-vip-subtitle {
        font-size: 16px;
    }

    #vips .zx-vip-status,
    #vips .zx-vip-benefits {
        border-radius: 26px;
        padding: 20px;
    }

    #vips .vip-count ul {
        flex-direction: column;
        align-items: center;
    }

    #vips .vip-count ul li {
        width: 100%;
        max-width: 400px;
    }

    #vips .vip-count ul li .vip-in {
        justify-content: space-between;
        padding: 16px 20px;
    }

    #vips .vip-list {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 420px;
    }

    #vips .vip-list-in {
        padding: 32px 24px;
    }

    #vips .vip-price .vip-price-money {
        font-size: 42px;
    }

    #vips .vip-footer > h2 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    #vips .vip-top {
        padding: 64px 16px 44px;
    }

    #vips .zx-vip-hero {
        width: 100%;
    }

    #vips .zx-vip-hero h1 {
        font-size: 30px;
        letter-spacing: -0.03em;
    }

    #vips .zx-vip-subtitle {
        font-size: 15px;
    }

    #vips .zx-vip-status strong {
        font-size: 21px;
    }

    #vips .zx-vip-benefits-head span {
        font-size: 18px;
    }

    #vips .vip-count ul li .vip-in {
        flex-wrap: wrap;
        gap: 12px;
    }

    #vips .vip-count ul li .vip-in button.empty {
        width: 100%;
        text-align: center;
    }

    #vips .vip-list-in {
        padding: 28px 20px;
    }

    #vips .vip-price .vip-price-money {
        font-size: 36px;
    }

    #vips .vip-buy button {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* ========== Reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
    #vips .zx-vip-eyebrow,
    #vips .zx-vip-hero h1,
    #vips .zx-vip-subtitle,
    #vips .zx-vip-status,
    #vips .zx-vip-benefits,
    #vips .vip-count,
    #vips .vip-item,
    #vips .vip-footer {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition-delay: 0s !important;
    }

    #vips .zx-vip-emoji,
    #vips .vip-top::before,
    #vips .vip-top::after {
        animation: none !important;
    }
}
