﻿/**
 * 积分中心样式 V2
 * 升级为帮追页面同款橙红主题风格
 */

/* ========== 全局变量 ========== */
:root {
    --primary: #FF6B35;
    --primary-dark: #FF5000;
    --primary-light: #FF8C00;
    --accent: #FFD700;
    --bg-page: #F5F5F5;
    --bg-card: #FFFFFF;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #EEEEEE;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius-card: 16px;
    --radius-btn: 20px;
}

/* ========== 页面容器 ========== */
.integral-center-page {
    background: linear-gradient(180deg, #FF6B35 0%, #FF5000 25%, #F5F5F5 25%);
    min-height: 100vh;
    padding-bottom: 100px;
}

/* ========== 顶部英雄区域 ========== */
.integral-hero {
    position: relative;
    padding: 20px 15px 60px;
    text-align: center;
    overflow: hidden;
}

.integral-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
}

.integral-hero-content {
    position: relative;
    z-index: 1;
}

/* 返回按钮 */
.back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.back-btn:active {
    transform: scale(0.95);
}

.back-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.integral-hero-title {
    font-size: 18px;
    color: white;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.integral-hero-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

/* 抽奖统计卡片 */
.integral-hero-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px 25px;
    margin: -40px 15px 0;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.integral-stat {
    text-align: center;
}

.integral-stat-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
    line-height: 1.2;
}

.integral-stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.integral-stat-divider {
    width: 1px;
    height: 40px;
    background: #E0E0E0;
}

/* ========== 主内容区 ========== */
.integral-content {
    padding: 20px 15px;
}

/* ========== 通用卡片样式 ========== */
.integral-card {
    background: white;
    border-radius: var(--radius-card);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.integral-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title-icon {
    font-size: 20px;
}

.card-badge {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* ========== 进度卡片 ========== */
.lottery-progress {
    margin-bottom: 15px;
}

.progress-bar {
    height: 14px;
    background: #F0F0F0;
    border-radius: 7px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 7px;
    transition: width 0.6s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
}

.progress-percent {
    color: var(--primary);
    font-weight: 600;
}

/* 抽奖信息网格 */
.lottery-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: #FFF9F5;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.info-item {
    text-align: center;
}

.info-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.info-value.highlight {
    color: var(--primary);
}

.info-value.countdown {
    color: var(--primary);
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ========== 任务卡片 ========== */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #FFF9F5;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.task-item.completed {
    border-left-color: #4CAF50;
    background: #F0FFF4;
}

.task-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 14px;
    flex-shrink: 0;
}

.task-icon.completed {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.task-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.task-progress-bar {
    height: 6px;
    background: #E0E0E0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.task-status {
    font-size: 11px;
    color: #666;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-daily-limit {
    font-size: 11px;
    color: #999;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}

.task-action {
    flex-shrink: 0;
    margin-left: 12px;
}

.task-reward {
    background: linear-gradient(135deg, #FF6B35, #f7931e);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

.task-done {
    background: #4CAF50;
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
}
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--accent), #FFA500);
    color: white;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* ========== 奖品卡片 ========== */
.prize-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
}

.prize-tab {
    padding: 8px 18px;
    background: #F5F5F5;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.prize-tab:hover {
    background: #FFF0E8;
}

.prize-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: var(--primary);
}

.prize-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.prize-item {
    background: #FFF9F5;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prize-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.12);
}

.prize-item.popular::before {
    content: '🔥 热门';
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.prize-item.special-prize {
    background: linear-gradient(135deg, #FFF5F5, #FFF0E6);
    border: 2px solid #FF6B35;
}

.prize-item.special-prize::before {
    content: '⭐ 限定';
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    color: white;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.prize-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
}

.prize-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.prize-count {
    font-size: 12px;
    color: #999;
}

/* ========== 排行榜卡片 ========== */
.my-rank {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #FFF9F5;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.leaderboard-item:hover {
    transform: translateX(4px);
}

.leaderboard-item.me {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 140, 0, 0.1));
    border: 2px solid var(--primary);
}

.rank-badge {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 14px;
    flex-shrink: 0;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
}

.rank-badge.default {
    background: #F0F0F0;
    color: #666;
    font-size: 14px;
    font-weight: 600;
}

.leaderboard-user {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
    min-width: 0;
}

.leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
    overflow: hidden;
}

.leaderboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leaderboard-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vip-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

.vip-badge.bronze {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
    color: white;
}

.vip-badge.silver {
    background: linear-gradient(135deg, #C0C0C0, #808080);
    color: white;
}

.vip-badge.gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

.vip-badge.diamond {
    background: linear-gradient(135deg, #B9F2FF, #1E90FF);
    color: white;
}

.ticket-count {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* ========== 底部导航（帮追同款） ========== */
.bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100;
    background: white !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 10px 0 max(10px, env(safe-area-inset-bottom)) !important;
    padding-bottom: max(15px, env(safe-area-inset-bottom)) !important;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08) !important;
}

.bottom-nav .nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-decoration: none !important;
    color: #999 !important;
    font-size: 11px !important;
    padding: 6px 20px !important;
    transition: color 0.2s !important;
}

.bottom-nav .nav-item svg {
    width: 24px !important;
    height: 24px !important;
    margin-bottom: 4px !important;
    fill: #999 !important;
}

.bottom-nav .nav-item svg path {
    fill: #999 !important;
}

.bottom-nav .nav-item.active {
    color: var(--primary) !important;
}

.bottom-nav .nav-item.active svg {
    fill: var(--primary) !important;
}

.bottom-nav .nav-item.active svg path {
    fill: var(--primary) !important;
}

/* ========== 加载状态 ========== */
.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #FFE4D6;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: #999;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.empty-button {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.empty-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

/* ========== 响应式调整 ========== */
@media (max-width: 375px) {
    .integral-hero-card {
        padding: 15px 15px;
    }
    
    .integral-stat-value {
        font-size: 24px;
    }
    
    .prize-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .task-reward {
        padding: 5px 10px;
        font-size: 12px;
    }
}
