:root {
    /* 核心色系 - 现代化配色 */
    --purchase-primary: #3b82f6; /* Blue 500 */
    --purchase-primary-hover: #2563eb; /* Blue 600 */
    --purchase-secondary: #8b5cf6; /* Violet 500 */
    --purchase-accent: #f59e0b; /* Amber 500 */
    --purchase-success: #10b981; /* Emerald 500 */
    
    /* 背景色 */
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-toggle: #f1f5f9;
    
    /* 文本色 */
    --text-main: #1e293b; /* Slate 800 */
    --text-sub: #64748b; /* Slate 500 */
    --text-light: #94a3b8; /* Slate 400 */
    
    /* 边框与阴影 */
    --border-light: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 25px 50px -12px rgb(0 0 0 / 0.15);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
    
    /* 圆角 */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

/* 页面容器 */
.purchase-page-wrapper {
    padding-top: 120px; /* 增加顶部留白，防止导航栏遮挡 */
    padding-bottom: 4rem; /* 增加底部留白 */
    background: radial-gradient(circle at top center, #f1f5f9 0%, #f8fafc 60%, #ffffff 100%);
    min-height: 100vh;
}

/* 头部区域 */
.page-header {
    text-align: center;
    padding: 0 1rem 2rem; /* 增加底部内边距 */
    position: relative;
}

.page-title {
    font-size: 2.5rem; /* 恢复正常标题字号 */
    font-weight: 800;
    margin-bottom: 1rem; /* 增加下边距 */
    letter-spacing: -0.02em;
    line-height: 1.4; /* 增加行高防止截断 */
    padding: 0.2em 0; /* 增加垂直内边距防止渐变文字截断 */
}

.gradient-text {
    background: linear-gradient(135deg, var(--purchase-primary) 0%, var(--purchase-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.page-subtitle {
    font-size: 1.1rem; /* 恢复副标题字号 */
    color: var(--text-sub);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 导航 Tabs - 分段控制器风格 */
.tabs {
    display: inline-flex;
    margin-top: 2rem; /* 恢复上边距 */
    padding: 0.35rem;
    background: white;
    border-radius: 9999px;
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(0,0,0,0.03);
    position: relative;
    z-index: 10;
}

.tab {
    padding: 0.75rem 2rem; /* 恢复舒适的内边距 */
    border-radius: 9999px;
    color: var(--text-sub);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.tab:hover {
    color: var(--text-main);
}

.tab.active {
    background: var(--bg-toggle);
    color: var(--purchase-primary);
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.05);
}

/* 价格切换开关 */
.pricing-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem; /* 恢复下边距 */
}

.pricing-toggle {
    background: var(--bg-toggle);
    padding: 0.35rem; /* 恢复内边距 */
    border-radius: 9999px;
    display: inline-flex;
    position: relative;
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.05);
}

.toggle-btn {
    position: relative;
    z-index: 10;
    border: none;
    background: transparent;
    padding: 0.75rem 2rem; /* 恢复舒适的内边距 */
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-sub);
    cursor: pointer;
    border-radius: 9999px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-btn.active {
    color: var(--text-main);
}

.toggle-slider {
    position: absolute;
    top: 5px;
    left: 5px;
    bottom: 5px;
    background: white;
    border-radius: 9999px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    z-index: 1;
}

.badge-new {
    background: var(--purchase-accent);
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transform: translateY(-1px);
}

/* 价格网格 */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* 价格卡片 */
.pricing-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem; /* 增加内边距 */
    border: 1px solid transparent; /* 预留边框位置 */
    box-shadow: var(--shadow-md);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

/* 推荐卡片样式 */
.pricing-card.featured {
    border: 2px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box,
                linear-gradient(135deg, var(--purchase-primary), var(--purchase-secondary)) border-box;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: scale(1.05);
    z-index: 10;
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
}

.popular-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--purchase-primary), var(--purchase-secondary));
    color: white;
    padding: 0.5rem 1.5rem;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    letter-spacing: 0.02em;
}

/* 卡片头部 */
.card-header {
    text-align: center;
    margin-bottom: 2rem; /* 增加下边距 */
    padding-bottom: 0.5rem;
    border-bottom: none;
    position: relative; /* 确保覆盖 */
}

/* 覆盖全局 styles.css 中的 .card-header::before (那个横线) */
.card-header::before {
    display: none;
    content: none;
}

.plan-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.plan-price {
    font-size: 3rem; /* 恢复价格字号 */
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    justify-content: center;
    letter-spacing: -0.04em;
}

.currency {
    font-size: 2rem;
    font-weight: 600;
    margin-right: 0.25rem;
    color: var(--text-sub);
    vertical-align: top;
}

.period {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-light);
    margin-left: 0.25rem;
}

.plan-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-toggle);
    color: var(--text-sub);
    padding: 0.4rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 600;
}

.pricing-card.featured .plan-subtitle {
    background: rgba(59, 130, 246, 0.1);
    color: var(--purchase-primary);
}

.badge-save {
    background: var(--purchase-success);
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

/* 卡片内容 */
.card-body {
    flex: 1;
    margin-bottom: 2rem; /* 恢复下边距 */
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem; /* 恢复列表项间距 */
    color: var(--text-sub);
    font-size: 1rem; /* 恢复字体大小 */
}

.feature-list li i {
    margin-right: 1rem;
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}

.feature-list li i.fa-check {
    color: var(--purchase-primary);
}

.pricing-card.featured .feature-list li i.fa-check {
    color: var(--purchase-success);
}

.feature-list li i.fa-xmark {
    color: var(--border-light);
}

/* 卡片底部 */
.card-footer {
    margin-top: auto;
}

.btn-buy {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-main);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-buy:hover {
    border-color: var(--text-sub);
    background: #f8fafc;
    transform: translateY(-2px);
}

.btn-buy.primary {
    background: linear-gradient(135deg, var(--purchase-primary), var(--purchase-secondary));
    color: white;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.btn-buy.primary:hover {
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    filter: brightness(1.05);
}

/* FAQ 提示 */
.faq-teaser {
    text-align: center;
    margin-top: 5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.faq-teaser a {
    color: var(--purchase-primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.2s;
}

.faq-teaser a:hover {
    border-bottom-color: var(--purchase-primary);
}

/* 客服弹窗样式 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem 2rem;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: var(--shadow-hover);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-backdrop.active .modal-card {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
}

.modal-close-btn:hover {
    color: var(--text-main);
    background: var(--bg-toggle);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.modal-desc {
    font-size: 0.95rem;
    color: var(--text-sub);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    max-width: 280px;
}

.qr-code-wrapper {
    background: white;
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.qr-code-img {
    width: 180px;
    height: 180px;
    display: block;
    border-radius: var(--radius-sm);
    max-width: 100%;
}

.modal-note {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
    background: var(--bg-toggle);
    padding: 0.35rem 1rem;
    border-radius: 9999px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.25rem;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        gap: 2rem;
    }
    
    .pricing-card.featured {
        transform: none;
        order: -1; /* 让推荐卡片在移动端排第一 */
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-5px);
    }
    
    .tabs {
        flex-wrap: wrap;
        border-radius: var(--radius-lg);
        width: 100%;
        justify-content: center;
    }
    
    .tab {
        flex: 1;
        text-align: center;
        white-space: nowrap;
        padding: 0.6rem 1rem;
    }
}
