/* ============================================
   PREMIUM HOME PAGE LAYOUT
   Modern Dashboard with Hero Section
   ============================================ */

/* ============================================
   HERO SECTION WITH GRADIENT
   ============================================ */

.hero-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 32px;
    padding: 48px 32px;
    margin: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-depth-xl);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    animation: heroRotate 20s linear infinite;
}

@keyframes heroRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #10b981 0%, #6366f1 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 500;
}

.hero-cta {
    display: inline-flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================
   QUICK STATS GRID
   ============================================ */

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.stat-box {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-depth-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.stat-box:hover::before {
    transform: scaleX(1);
}

.stat-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-depth-lg);
    border-color: rgba(16, 185, 129, 0.3);
}

.stat-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: var(--shadow-glow-primary);
    transition: transform 0.3s ease;
}

.stat-box:hover .stat-icon-circle {
    transform: scale(1.1) rotate(10deg);
}

.stat-icon-circle i {
    font-size: 1.5rem;
    color: white;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   FEATURED COACHES CAROUSEL
   ============================================ */

.featured-section {
    padding: 24px;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.view-all-btn {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateX(4px);
}

.coaches-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.coaches-scroll::-webkit-scrollbar {
    height: 6px;
}

.coaches-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.coaches-scroll::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 3px;
}

.coach-card-mini {
    min-width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    scroll-snap-align: start;
    box-shadow: var(--shadow-depth-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.coach-card-mini::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--gradient-primary);
    opacity: 0.1;
}

.coach-card-mini:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-depth-xl);
    border-color: rgba(16, 185, 129, 0.5);
}

.coach-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.coach-avatar-mini {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(16, 185, 129, 0.3);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 0 6px rgba(16, 185, 129, 0.1);
    transition: all 0.3s ease;
}

.coach-card-mini:hover .coach-avatar-mini {
    transform: scale(1.1);
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        0 0 0 8px rgba(16, 185, 129, 0.2);
}

.coach-info {
    flex: 1;
}

.coach-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.coach-specialty {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.coach-tier-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-free {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.tier-pro {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.tier-vip {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.coach-stats-mini {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.stat-mini {
    flex: 1;
    text-align: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.stat-mini-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}

.stat-mini-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ============================================
   LIVE MATCHES SECTION
   ============================================ */

.live-matches {
    padding: 24px;
    margin-bottom: 24px;
}

.match-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-depth-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.match-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.match-card:hover::before {
    transform: scaleY(1);
}

.match-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-depth-md);
    border-color: rgba(16, 185, 129, 0.3);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.match-league {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.team {
    flex: 1;
    text-align: center;
}

.team-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.team-score {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vs-divider {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

/* ============================================
   TOURNAMENTS GRID
   ============================================ */

.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 24px;
}

.tournament-card-enhanced {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    padding: 2px;
    box-shadow: var(--shadow-depth-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.tournament-card-enhanced::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, #10b981, #6366f1, #f59e0b);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.tournament-card-enhanced:hover::before {
    opacity: 1;
}

.tournament-card-enhanced:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-depth-xl), 0 0 40px rgba(16, 185, 129, 0.3);
}

.tournament-inner {
    background: var(--bg-secondary);
    border-radius: 22px;
    padding: 24px;
    position: relative;
}

.tournament-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 3px solid rgba(16, 185, 129, 0.3);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 0 8px rgba(16, 185, 129, 0.1);
    transition: all 0.3s ease;
}

.tournament-card-enhanced:hover .tournament-icon {
    transform: scale(1.1) rotate(5deg);
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.4),
        0 0 0 12px rgba(16, 185, 129, 0.2),
        var(--shadow-glow-primary);
}

.tournament-title {
    font-size: 1.3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tournament-prize {
    font-size: 1.8rem;
    font-weight: 900;
    text-align: center;
    color: #fbbf24;
    margin-bottom: 16px;
}

.tournament-info {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 16px;
}

.info-item {
    text-align: center;
}

.info-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .hero-section {
        padding: 32px 20px;
        margin: 16px;
        border-radius: 24px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
        gap: 12px;
    }
    
    .coach-card-mini {
        min-width: 240px;
    }
    
    .tournaments-grid {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn-primary {
        width: 100%;
    }
}

/* ============================================
   DAILY SUMMARY CARD
   ============================================ */

.dashboard-section {
    padding: 0 24px;
    margin-bottom: 24px;
}

.daily-summary-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-header h3 i {
    color: var(--primary);
}

.summary-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 16px;
}

.summary-stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.summary-stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
}

.summary-stat-item .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.summary-stat-item .value {
    font-size: 1.1rem;
    font-weight: 700;
}

.summary-stat-item.highlight .value {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.value.earned { color: #10b981; }
.value.spent { color: #ef4444; }
.value.net.positive { color: #10b981; }
.value.net.negative { color: #ef4444; }

.summary-footer {
    display: flex;
    justify-content: center;
}

.view-history-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-history-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}

.daily-summary-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    color: var(--text-muted);
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(16, 185, 129, 0.1);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 600px) {
    .summary-stats {
        flex-direction: column;
        gap: 16px;
    }
    .summary-stat-divider {
        width: 100%;
        height: 1px;
    }
}

/* ============================================
   TOP EARNERS LEADERBOARD WIDGET
   ============================================ */

.leaderboard-card {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.leaderboard-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.leaderboard-header h3 i {
    color: #fbbf24;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    gap: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
    border-color: rgba(251, 191, 36, 0.2);
}

.leaderboard-item.current-user {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.player-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.player-rank.gold { font-size: 1.4rem; color: #fbbf24; }
.player-rank.silver { font-size: 1.4rem; color: #9ca3af; }
.player-rank.bronze { font-size: 1.4rem; color: #d97706; }

.player-avatar {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.player-earnings {
    display: flex;
    align-items: center;
    gap: 6px;
}

.player-earnings .coin-icon {
    font-size: 14px;
}

.player-earnings .amount {
    font-weight: 800;
    color: #10b981;
    font-size: 1rem;
}

.leaderboard-footer {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.view-all-leaderboards {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-all-leaderboards:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #fbbf24;
    color: #fbbf24;
}

.leaderboard-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-muted);
}


