/**
 * 51xue.vip 会员体系样式文件
 * 文件路径: /wp-content/plugins/51xue-membership/assets/css/membership.css
 */

/* =====================================================
   CSS变量定义
   ===================================================== */
:root {
    --xue-primary: #4F46E5;
    --xue-primary-light: #818CF8;
    --xue-primary-dark: #3730A3;
    --xue-success: #10B981;
    --xue-warning: #F59E0B;
    --xue-danger: #EF4444;
    --xue-gray-50: #F9FAFB;
    --xue-gray-100: #F3F4F6;
    --xue-gray-200: #E5E7EB;
    --xue-gray-300: #D1D5DB;
    --xue-gray-400: #9CA3AF;
    --xue-gray-500: #6B7280;
    --xue-gray-600: #4B5563;
    --xue-gray-700: #374151;
    --xue-gray-800: #1F2937;
    --xue-gray-900: #111827;
    --xue-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --xue-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --xue-radius: 8px;
    --xue-radius-lg: 12px;
}

/* =====================================================
   会员信息卡片
   ===================================================== */
.membership-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--xue-radius-lg);
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
}

.membership-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
}

.membership-level {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.level-icon {
    font-size: 32px;
}

.level-name {
    font-size: 24px;
    font-weight: 600;
}

.membership-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
}

.upgrade-btn {
    display: inline-block;
    background: white;
    color: var(--xue-primary);
    padding: 10px 24px;
    border-radius: var(--xue-radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--xue-shadow-lg);
}

/* =====================================================
   价格表
   ===================================================== */
.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 40px 20px;
}

.pricing-card {
    background: white;
    border-radius: var(--xue-radius-lg);
    padding: 32px 24px;
    box-shadow: var(--xue-shadow);
    transition: all 0.3s;
    position: relative;
    border: 2px solid transparent;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--xue-shadow-lg);
}

.pricing-card.featured {
    border-color: var(--xue-primary);
    transform: scale(1.02);
}

.pricing-card.featured::before {
    content: '推荐';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--xue-primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--xue-gray-200);
}

.pricing-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.pricing-name {
    font-size: 24px;
    font-weight: 600;
    color: var(--xue-gray-800);
    margin-bottom: 8px;
}

.pricing-desc {
    font-size: 14px;
    color: var(--xue-gray-500);
}

.pricing-price {
    text-align: center;
    margin-bottom: 24px;
}

.price-monthly {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.price-currency {
    font-size: 20px;
    color: var(--xue-gray-600);
}

.price-amount {
    font-size: 48px;
    font-weight: 700;
    color: var(--xue-gray-900);
}

.price-unit {
    font-size: 14px;
    color: var(--xue-gray-500);
}

.price-yearly {
    font-size: 14px;
    color: var(--xue-gray-500);
    margin-top: 8px;
}

.price-yearly .highlight {
    color: var(--xue-primary);
    font-weight: 600;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--xue-gray-100);
    font-size: 14px;
    color: var(--xue-gray-700);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features .icon-check {
    color: var(--xue-success);
    font-weight: bold;
}

.pricing-features .icon-cross {
    color: var(--xue-gray-300);
}

.pricing-features .icon-unlock {
    color: var(--xue-primary);
}

.pricing-action {
    text-align: center;
}

.pricing-btn {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    border-radius: var(--xue-radius);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.pricing-btn.primary {
    background: var(--xue-primary);
    color: white;
}

.pricing-btn.primary:hover {
    background: var(--xue-primary-dark);
}

.pricing-btn.secondary {
    background: var(--xue-gray-100);
    color: var(--xue-gray-700);
}

.pricing-btn.secondary:hover {
    background: var(--xue-gray-200);
}

/* =====================================================
   签到组件
   ===================================================== */
.sign-widget {
    background: white;
    border-radius: var(--xue-radius-lg);
    padding: 24px;
    box-shadow: var(--xue-shadow);
}

.sign-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sign-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--xue-gray-800);
}

.sign-streak {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--xue-warning);
}

.sign-btn {
    width: 100%;
    padding: 16px;
    border-radius: var(--xue-radius);
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.sign-btn.active {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}

.sign-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.sign-btn.done {
    background: var(--xue-gray-100);
    color: var(--xue-gray-500);
    cursor: not-allowed;
}

.sign-reward {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--xue-gray-200);
}

.reward-item {
    text-align: center;
}

.reward-days {
    font-size: 12px;
    color: var(--xue-gray-500);
    margin-bottom: 4px;
}

.reward-points {
    font-size: 16px;
    font-weight: 600;
    color: var(--xue-primary);
}

/* =====================================================
   积分记录
   ===================================================== */
.points-logs {
    background: white;
    border-radius: var(--xue-radius-lg);
    overflow: hidden;
}

.logs-header {
    padding: 16px 24px;
    background: var(--xue-gray-50);
    border-bottom: 1px solid var(--xue-gray-200);
}

.logs-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--xue-gray-800);
}

.logs-list {
    max-height: 400px;
    overflow-y: auto;
}

.log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--xue-gray-100);
}

.log-item:last-child {
    border-bottom: none;
}

.log-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-type {
    font-size: 14px;
    font-weight: 500;
    color: var(--xue-gray-800);
}

.log-time {
    font-size: 12px;
    color: var(--xue-gray-500);
}

.log-points {
    font-size: 16px;
    font-weight: 600;
}

.log-points.positive {
    color: var(--xue-success);
}

.log-points.negative {
    color: var(--xue-danger);
}

/* =====================================================
   弹窗组件
   ===================================================== */
.xue-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: var(--xue-radius-lg);
    width: 90%;
    max-width: 400px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--xue-gray-200);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--xue-gray-400);
}

.modal-close:hover {
    color: var(--xue-gray-600);
}

.modal-body {
    padding: 24px;
    text-align: center;
}

.modal-body p {
    margin: 0 0 12px;
    font-size: 16px;
    color: var(--xue-gray-700);
}

.modal-body .tip {
    font-size: 14px;
    color: var(--xue-gray-500);
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    background: var(--xue-gray-50);
}

.btn-cancel {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--xue-gray-300);
    border-radius: var(--xue-radius);
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.btn-upgrade {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--xue-radius);
    background: var(--xue-primary);
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
}

/* =====================================================
   响应式设计
   ===================================================== */
@media (max-width: 768px) {
    .pricing-table {
        grid-template-columns: 1fr;
        padding: 20px 16px;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .membership-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .sign-reward {
        flex-wrap: wrap;
    }
}
