/* 积分奖励页面样式 */

:root {
    --primary-color: #4f46e5;
    --secondary-color: #7c3aed;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --primary-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.125rem;
    --radius-md: 0.25rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --transition-normal: 0.2s ease;
}

/* 积分奖励内容容器 */
.rewards-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 简约顶部区域 */
.rewards-header {
    position: relative;
    height: 200px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0.8;
}

.header-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    z-index: 2;
    padding: 0 20px;
}

.header-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.header-content p {
    font-size: 1rem;
    font-weight: 400;
    max-width: 500px;
    line-height: 1.5;
}

/* 简约特色介绍卡片区域 */
.rewards-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.feature-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--primary-color);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.5rem;
    color: white;
}

.feature-card h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* 简约积分奖励规则标题区域 */
.rewards-rules-header {
    text-align: center;
    margin-bottom: 30px;
}

.rewards-rules-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.rewards-rules-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

.text-success {
    color: var(--success-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-primary {
    color: var(--primary-color);
}

.text-danger {
    color: var(--danger-color);
}

/* 积分规则列表容器 */
.rewards-rules-container {
    margin-bottom: 40px;
}

/* 加载状态 */
#rewards-rules-loading {
    text-align: center;
    padding: 80px 40px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

#rewards-rules-loading i {
    color: #4f46e5;
    margin-bottom: 20px;
}

#rewards-rules-loading p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

/* 简约规则部分通用样式 */
.rules-section {
    margin-bottom: 30px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.rules-section h4 {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.rules-section h4 i {
    margin-right: 10px;
    font-size: 1.1rem;
}

/* 简约积分获取方式样式 */
.rules-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rule-item {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: var(--radius-md);
}

.rule-number {
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.rule-text {
    flex: 1;
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 0.9rem;
    font-weight: 500;
}

.rule-points {
    background: var(--bg-tertiary);
    color: #4f46e5;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 15px;
    flex-shrink: 0;
    font-size: 0.9rem;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

/* 等级划分标准样式 */
.levels-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.level-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.level-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
}

.level-item:nth-child(1)::before { background: #10b981; }
.level-item:nth-child(2)::before { background: #3b82f6; }
.level-item:nth-child(3)::before { background: #8b5cf6; }
.level-item:nth-child(4)::before { background: #ec4899; }

.level-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    background: var(--bg-primary);
}

.level-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.level-name i {
    margin-right: 8px;
    font-size: 1rem;
}

.level-score {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 加载动画样式 */
.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 15px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-animation p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* 积分获取方式样式 */
.points-acquisition-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.points-acquisition-section h4 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.points-acquisition-section h4 i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.points-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.point-item {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    border-left: 3px solid #4f46e5;
    transition: all 0.2s ease;
}

.point-item:hover {
    transform: translateX(3px);
    box-shadow: var(--shadow-sm);
}

.point-icon {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 1rem;
}

.point-content {
    flex: 1;
}

.point-content h5 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.point-content p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.point-value {
    margin-left: 15px;
    flex-shrink: 0;
}

.points-badge {
    background: var(--bg-tertiary);
    color: #4f46e5;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

/* 简约奖励兑换目录样式 - 固定每排3个卡片 */
.rewards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    min-height: 200px;
    box-sizing: border-box;
}

/* 奖励兑换目录容器样式 */
.rewards-catalog-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
}

.rewards-catalog-container h4 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

/* 确保奖励卡片宽度与容器完美吻合 */
.reward-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* 空状态和错误状态样式 */
.empty-rewards,
.error-rewards {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 12px;
    border: 1px dashed #ddd;
}

.empty-rewards i,
.error-rewards i {
    margin-bottom: 16px;
}

.empty-rewards p,
.error-rewards p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

/* 简约奖励卡片样式 */
.reward-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 简约奖励图片容器 */
.reward-image {
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.reward-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    /* 确保图片在容器内完美显示 */
    transition: transform 0.3s ease;
}

/* 图片悬停效果 */
.reward-card:hover .reward-image img {
    transform: scale(1.05);
}

/* 简约奖励内容区域 */
.reward-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.reward-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px 0;
    line-height: 1.3;
    text-align: center;
}

/* 简约副标题样式 */
.reward-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: left;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.reward-description {
    color: #374151;
    line-height: 1.6;
    margin: 0 0 15px 0;
    font-size: 1rem;
    flex: 1;
    padding: 0;
    font-weight: 500;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

/* 小字体样式 */
.reward-description.small-font {
    font-size: 0.8rem;
}

/* 积分显示 */
.reward-points {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    text-align: center;
    margin: 0 0 15px 0 !important;
    white-space: nowrap;
    align-self: flex-start;
}

/* 库存状态 */
.reward-stock {
    font-size: 0.85rem;
    color: #059669;
    font-weight: 600;
    margin: 0 0 15px 0;
    text-align: center;
}

.reward-stock.out-of-stock {
    color: #dc2626;
    font-weight: 600;
}

/* 操作按钮区域 */
.reward-footer {
    display: flex;
    justify-content: center;
    margin-top: auto;
    padding: 0;
    margin-bottom: 0;
}

.reward-action {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 1rem;
    margin: 0 !important;
    min-width: 100px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.reward-action:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.reward-action.disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .rewards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    .reward-card {
        min-width: 0; /* 允许卡片缩小以适应容器 */
    }
}

@media (max-width: 1200px) {
    .rewards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .rewards-catalog-container {
        padding: 20px;
    }
    
    .rewards-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 积分获取方式响应式 */
    .point-item {
        padding: 12px 15px;
    }
    
    .point-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .point-content h5 {
        font-size: 0.95rem;
    }
    
    .point-content p {
        font-size: 0.8rem;
    }
}

@media (max-width: 992px) {
    .rewards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* 积分获取方式响应式 */
    .points-acquisition-section {
        padding: 20px;
    }
    
    .points-acquisition-section h4 {
        font-size: 1.2rem;
    }
    
    .point-item {
        padding: 10px 12px;
    }
    
    .point-icon {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
        margin-right: 12px;
    }
    
    .point-content h5 {
        font-size: 0.9rem;
    }
    
    .point-content p {
        font-size: 0.75rem;
    }
    
    .points-badge {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

@media (max-width: 768px) {
    .rewards-content {
        padding: 15px;
    }
    
    .rewards-header {
        height: 220px;
    }
    
    .header-content h2 {
        font-size: 2rem;
    }
    
    .header-content p {
        font-size: 1rem;
    }
    
    .rewards-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .rewards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .rewards-catalog-container {
        padding: 15px;
    }
    
    .rules-section {
        padding: 20px;
    }
    
    .rule-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }
    
    .rule-number {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .rule-points {
        margin-left: 0;
        margin-top: 15px;
        align-self: flex-end;
    }
    
    .level-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }
    
    .level-score {
        align-self: flex-end;
    }
    
    .reward-image {
        height: 180px;
    }
    
    .reward-content {
        padding: 15px;
    }
    
    .reward-footer {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .reward-points,
    .reward-action {
        width: 100%;
        text-align: center;
    }
    
    /* 积分获取方式响应式 */
    .points-acquisition-section {
        padding: 15px;
    }
    
    .points-acquisition-section h4 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .points-list {
        gap: 10px;
    }
    
    .point-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        gap: 10px;
    }
    
    .point-icon {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        margin-right: 0;
    }
    
    .point-content {
        width: 100%;
    }
    
    .point-content h5 {
        font-size: 0.9rem;
        margin-bottom: 3px;
    }
    
    .point-content p {
        font-size: 0.75rem;
    }
    
    .point-value {
        margin-left: 0;
        align-self: flex-end;
    }
    
    .points-badge {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .header-content h2 {
        font-size: 1.75rem;
    }
    
    .rewards-rules-header h3 {
        font-size: 1.5rem;
    }
    
    .rules-section h4 {
        font-size: 1.3rem;
    }
    
    .feature-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .reward-image {
        height: 150px;
    }
}