/* 会员模态框样式 */
#membershipModal .modal-content {
    max-width: min(1000px, 90vw);
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

#membershipModal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    background: transparent;
    flex-shrink: 0;
}

#membershipModal .modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem 2rem;
}

/* 滚动条样式优化 */
#membershipModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#membershipModal .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

#membershipModal .modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    transition: background 0.3s ease;
}

#membershipModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.membership-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.membership-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.membership-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.membership-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.redemption-btn {
    padding: 0.6rem 1.2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-right: 5.5rem;
}

.redemption-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

/* 计划切换器 */
.plan-switcher {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--bg-tertiary);
    padding: 0.5rem;
    border-radius: 12px;
    justify-content: center;
}

.plan-switch-btn {
    flex: 1;
    max-width: 200px;
    padding: 1rem 1.5rem;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.plan-switch-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.plan-switch-btn.active {
    color: white;
    border-color: var(--primary-color);
    background: var(--primary-color);
}

/* 会员计划卡片容器 */
.membership-plans {
    position: relative;
    min-height: 400px;
    margin-bottom: 2rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    #membershipModal .modal-content {
        max-width: 95vw;
        max-height: 90vh;
    }
    
    #membershipModal .modal-body {
        padding: 1rem;
    }
    
    .plan-switcher {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.4rem;
    }
    
    .plan-switch-btn {
        max-width: none;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .membership-plans {
        min-height: 350px;
    }
    
    .plan-card {
        padding: 1.5rem;
    }
    
    .redemption-btn {
        margin-right: 3rem;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    #membershipModal .modal-content {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .plan-price {
        padding: 0.5rem 0;
        margin-bottom: 1rem;
    }
    
    .price-amount {
        font-size: 2.5rem;
    }
    
    .membership-header h2 {
        font-size: 1.3rem;
    }
}

/* 计划卡片基础样式 */
.plan-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transition: all 0.4s ease;
    display: none;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
}

.plan-card.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.plan-card.active:hover {
    transform: translateY(-5px);
}

/* Free计划样式 */
.free-plan {
    border-color: var(--border-color);
}

.free-plan:hover {
    border-color: var(--text-secondary);
    box-shadow: var(--shadow-lg);
}

/* Pro计划样式 */
.pro-plan {
    border-color: var(--primary-color);
}

.pro-plan:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

/* Ultra计划样式 */
.ultra-plan {
    border-color: var(--primary-color);
}

.ultra-plan:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

/* 计划徽章 */
.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-secondary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-badge.popular {
    background: var(--primary-color);
}

.plan-badge.premium {
    background: #f59e0b;
    color: white;
}

/* 计划图标 */
.plan-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.8rem;
    background: var(--bg-tertiary);
}

.free-plan .plan-icon {
    color: var(--text-secondary);
}

.pro-plan .plan-icon {
    color: var(--primary-color);
}

.ultra-plan .plan-icon {
    color: var(--primary-color);
}

/* 计划名称 */
.plan-name {
    text-align: center;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

/* 计划时长选项卡 */
.plan-duration-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: var(--bg-tertiary);
    padding: 0.4rem;
    border-radius: 8px;
}

.duration-tab {
    flex: 1;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 600;
}

.duration-tab:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.duration-tab.active {
    background: var(--primary-color);
    color: white;
}

/* 价格显示 */
.plan-price {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    color: var(--text-primary);
}

.price-symbol {
    font-size: 1.5rem;
    color: var(--text-primary);
    vertical-align: top;
    margin-right: 0.2rem;
}

.price-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.price-period {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

/* 功能列表 */
.plan-features {
    flex: 1;
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.feature-item span {
    color: var(--text-primary);
}

.feature-item i {
    color: #10b981;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.feature-item.highlighted {
    color: var(--text-primary);
    font-weight: 500;
}

.feature-item.highlighted i {
    color: var(--primary-color);
}

/* 订阅按钮 */
.plan-button {
    width: 100%;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pro-button,
.ultra-button {
    background: var(--primary-color);
    color: white;
}

.pro-button:hover,
.ultra-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

/* 支付说明 */
.payment-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.payment-note i {
    color: var(--primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* 关闭按钮样式优化 */
#membershipModal .modal-header {
    position: relative;
}

#membershipModal .modal-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    z-index: 10;
}

#membershipModal .modal-close:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
    transform: scale(1.05);
}
