/* ==========================================================================
   Leaderboard Page Styles
   ========================================================================== */

   .leaderboard-page {
    background-color: var(--gray-light);
    padding-top: 80px;
}

/* 1. Hero Section */
.leaderboard-hero {
    background: var(--white);
    padding: 80px 0 40px;
    text-align: center;
}

.tagline {
    color: var(--primary-pink);
    font-weight: 800;
    letter-spacing: 3px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.leaderboard-hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    color: var(--dark-purple);
    margin-bottom: 20px;
}

.leaderboard-hero h1 span {
    color: var(--primary-pink);
}

.leaderboard-hero .lead-text {
    max-width: 650px;
}

/* ==========================================================================
   2. Podium Section (Top 3)
   ========================================================================== */
.podium-section {
    padding: 50px 0 60px;
    background: linear-gradient(180deg, var(--white) 0%, var(--gray-light) 100%);
}

.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    height: 380px;
    max-width: 800px;
    margin: 0 auto;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30%;
    position: relative;
    animation: riseUp 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
    transform: translateY(50px);
}

.rank-1 { animation-delay: 0.2s; width: 35%; z-index: 3; }
.rank-2 { animation-delay: 0.4s; z-index: 2; }
.rank-3 { animation-delay: 0.6s; z-index: 1; }

@keyframes riseUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Avatar Styling */
.podium-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 4px;
    background: var(--white);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.podium-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.podium-avatar.highlight {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-pink), var(--secondary-purple));
}

/* Crowns & Medals */
.crown, .medal {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
}

.crown { color: #FFD700; font-size: 2rem; top: -25px; }
.silver { color: #C0C0C0; }
.bronze { color: #CD7F32; }

/* Info Text */
.podium-info {
    text-align: center;
    margin-bottom: 20px;
}

.podium-info h3 {
    font-size: 1.1rem;
    color: var(--dark-purple);
    margin-bottom: 5px;
}

.track-badge {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.points {
    font-weight: 800;
    color: var(--secondary-purple);
    font-size: 1rem;
    background: var(--white);
    padding: 4px 12px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.gold-text {
    color: var(--primary-pink);
    font-size: 1.1rem;
}

/* Podium Blocks */
.podium-block {
    width: 100%;
    display: flex;
    justify-content: center;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.podium-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: rgba(255,255,255,0.5);
}

.gold-block { height: 140px; background: linear-gradient(180deg, #FFD700 0%, #FDB931 100%); }
.silver-block { height: 100px; background: linear-gradient(180deg, #E0E0E0 0%, #BDBDBD 100%); }
.bronze-block { height: 70px; background: linear-gradient(180deg, #E6A87C 0%, #CD7F32 100%); }

.rank-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 10px;
}

/* ==========================================================================
   3. Leaderboard List Section (Rank 4+)
   ========================================================================== */
.leaderboard-list-section {
    padding: 20px 0 80px;
}

.list-wrapper {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.03);
    border: 1px solid var(--gray-medium);
    max-width: 900px;
    margin: 0 auto;
}

/* Table Grid System */
.list-header, .list-row {
    display: grid;
    grid-template-columns: 80px 2fr 1.5fr 1fr 1fr;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-medium);
}

.list-header {
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--gray-medium);
    margin-bottom: 10px;
}

.list-row {
    transition: var(--transition);
    border-radius: 12px;
}

.list-row:hover {
    background-color: var(--gray-light);
    transform: translateX(5px);
}

.list-row:last-child {
    border-bottom: none;
}

/* Columns */
.col-rank {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.col-name {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    color: var(--dark-purple);
}

.col-name img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.track-pill {
    background: var(--light-pink);
    color: var(--primary-pink);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.col-trend {
    font-weight: 600;
    font-size: 0.9rem;
}

.col-points {
    font-weight: 800;
    color: var(--secondary-purple);
    text-align: right;
}

/* Self Rank Highlight */
.self-rank {
    background: linear-gradient(90deg, rgba(255, 105, 180, 0.05) 0%, rgba(138, 43, 226, 0.05) 100%);
    border: 1px solid var(--primary-pink);
    margin-top: 15px;
}

.self-rank .col-rank { color: var(--primary-pink); }

.load-more {
    text-align: center;
    margin-top: 30px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .leaderboard-hero h1 { font-size: 2.2rem; }
    
    /* Podium Adjustments for Mobile */
    .podium-container {
        align-items: flex-end;
        gap: 5px;
        height: 300px;
    }
    
    .podium-avatar { width: 60px; height: 60px; }
    .podium-avatar.highlight { width: 75px; height: 75px; }
    
    .podium-info h3 { font-size: 0.85rem; }
    .points { font-size: 0.8rem; padding: 2px 8px; }
    .gold-text { font-size: 0.9rem; }
    
    .rank-num { font-size: 2rem; }
    
    /* List Adjustments for Mobile */
    .list-header { display: none; } /* Hide table header on mobile */
    
    .list-row {
        grid-template-columns: 40px 1fr auto;
        grid-template-rows: auto auto;
        gap: 10px;
        padding: 15px;
    }
    
    .col-rank { grid-row: 1 / 3; font-size: 1.5rem; }
    .col-name { grid-column: 2 / 3; grid-row: 1; }
    .col-points { grid-column: 3; grid-row: 1; text-align: right; }
    
    .col-track { grid-column: 2; grid-row: 2; }
    .col-trend { grid-column: 3; grid-row: 2; text-align: right; }
}