/**
 * 会员套餐页面样式
 * 从 membership.html 内联 <style> 块及 style="" 属性提取
 */

/* 防止 Vue 模板闪烁 */
[v-cloak] {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 头部 - 统一风格 */
.page-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 0 0 24px 0;
}

.page-header .header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-header .back-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.page-header .back-btn:hover {
    background: rgba(255,255,255,0.3);
}

.page-header .page-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.header {
    text-align: center;
    color: #333;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 12px;
    color: #333;
}

.header p {
    font-size: 16px;
    color: #666;
}

.back-link {
    display: none;
}

/* 当前会员信息 */
.current-membership {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 16px;
    padding: 20px 30px;
    color: white;
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.current-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.membership-icon {
    font-size: 48px;
}

.membership-details h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.membership-details p {
    font-size: 14px;
    opacity: 0.8;
}

/* 已过期标识 */
.membership-expired {
    color: #ff4d4f;
}

.quota-summary {
    display: flex;
    gap: 20px;
}

.quota-item {
    text-align: center;
    padding: 12px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
}

.quota-item .value {
    font-size: 24px;
    font-weight: bold;
}

.quota-item .label {
    font-size: 12px;
    opacity: 0.8;
}

/* 套餐卡片网格 */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.package-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    transition: all 0.3s;
    overflow: hidden;
}

.package-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.package-card.recommended {
    border: 3px solid #52c41a;
}

.package-card.recommended::before {
    content: '推荐';
    position: absolute;
    top: 16px;
    right: -30px;
    background: #52c41a;
    color: white;
    padding: 4px 40px;
    font-size: 12px;
    font-weight: bold;
    transform: rotate(45deg);
}

.package-card.current {
    border: 3px solid #1890ff;
    background: #e6f7ff;
}

.package-card.current::after {
    content: '当前套餐';
    position: absolute;
    top: 16px;
    left: 16px;
    background: #1890ff;
    color: white;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 12px;
}

.package-name {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.package-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.package-price {
    margin-bottom: 24px;
}

.price-current {
    font-size: 42px;
    font-weight: bold;
    color: #1890ff;
}

.price-unit {
    font-size: 16px;
    color: #666;
}

.price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
    margin-left: 8px;
}

.price-discount {
    display: inline-block;
    background: #fff2e8;
    color: #fa8c16;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

.package-duration {
    color: #999;
    font-size: 14px;
    margin-bottom: 20px;
}

.package-features {
    list-style: none;
    margin-bottom: 24px;
}

.package-features li {
    padding: 8px 0;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.package-features li::before {
    content: none;
}

.package-features .feature-check {
    width: 14px;
    height: 14px;
    color: #52c41a;
    flex-shrink: 0;
}

.package-quota {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.quota-title {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
}

.quota-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quota-box {
    text-align: center;
}

.quota-box .num {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.quota-box .text {
    font-size: 11px;
    color: #666;
}

.buy-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.buy-btn.primary {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: white;
}

.buy-btn.primary:hover {
    background: linear-gradient(135deg, #096dd9 0%, #0050b3 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24,144,255,0.4);
}

.buy-btn.success {
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    color: white;
}

.buy-btn.success:hover {
    background: linear-gradient(135deg, #389e0d 0%, #237804 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82,196,26,0.4);
}

.buy-btn:disabled {
    background: #d9d9d9;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* FAQ区域 */
.faq-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
}

.faq-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 24px;
    text-align: center;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-answer {
    color: #666;
    line-height: 1.6;
    padding-left: 24px;
}

/* FAQ 内联链接（蓝色强调） */
.faq-link {
    color: #1890ff;
}

/* 联系客服 */
.contact-section {
    text-align: center;
    color: white;
    padding: 20px;
}

.contact-section p {
    margin-bottom: 12px;
    opacity: 0.9;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    text-decoration: none;
    transition: all 0.2s;
}

.contact-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* 加载状态 */
.loading {
    text-align: center;
    color: white;
    padding: 60px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 22px;
    }
    .header p {
        font-size: 13px;
    }

    .current-membership {
        flex-direction: column;
        text-align: center;
        padding: 16px !important;
        gap: 12px !important;
    }

    .quota-summary {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px !important;
    }

    .packages-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* 套餐卡片：扩大字号、增加内边距、更易读 */
    .package-card {
        padding: 20px 18px !important;
    }
    .package-title {
        font-size: 18px !important;
    }
    .package-price {
        font-size: 28px !important;
    }
    .package-price .unit,
    .package-price small {
        font-size: 13px !important;
    }
    .package-features {
        font-size: 13px !important;
    }
    .package-features li {
        padding: 6px 0 6px 22px !important;
        line-height: 1.5;
    }
    /* 配额小格：放大数字 */
    .quota-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .quota-box .num {
        font-size: 16px !important;
    }
    .quota-box .label,
    .quota-box small {
        font-size: 11px !important;
    }
    /* 主操作按钮全宽 */
    .package-card .btn,
    .package-card button[class*="btn"] {
        width: 100% !important;
        padding: 12px !important;
        font-size: 15px !important;
    }
    /* FAQ 等下方内容收紧 */
    .container, .membership-page {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}
