/* =========================================
   BRAINBYT LEADERBOARD.CSS
   PREMIUM GAMING DESIGN (OVERLAP FIXED)
========================================= */

/* Main Container */
.leaderboard-app { 
    max-width: 600px; 
    margin: 0 auto; 
    padding: 20px; 
    padding-top: 40px; 
}

.hero-section { 
    margin-bottom: 40px; 
}

/* =========================================
   TOP 3 PODIUM DESIGN
========================================= */
.podium-container { 
    display: flex; 
    justify-content: center; 
    align-items: flex-end; 
    gap: 15px; 
    margin-top: 30px; /* Overlap fix: Added space above the podium */
    margin-bottom: 40px; 
    height: 300px; /* Overlap fix: Increased height so the crown doesn't touch the text */
}

.podium-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    width: 30%; 
}

.podium-item .name { 
    color: #fff; 
    font-weight: bold; 
    font-size: 0.9rem; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
    width: 100%; 
}

.podium-item .uid { 
    color: #64748b; 
    font-size: 0.7rem; 
    font-family: monospace; 
    margin-bottom: 5px; 
}

.podium-item .score { 
    color: #facc15; 
    font-weight: 800; 
    font-size: 1rem; 
    margin: 5px 0; 
}

.podium-item .pillar { 
    width: 100%; 
    border-radius: 12px 12px 0 0; 
    margin-top: 5px; 
    box-shadow: inset 0 4px 15px rgba(255,255,255,0.1); 
}

/* Pillar Colors & Heights */
.rank-1 .pillar { background: linear-gradient(180deg, #fbbf24, #b45309); height: 120px; }
.rank-2 .pillar { background: linear-gradient(180deg, #94a3b8, #475569); height: 90px; }
.rank-3 .pillar { background: linear-gradient(180deg, #b45309, #78350f); height: 70px; }


/* =========================================
   AVATARS & MEDALS
========================================= */
.avatar-img {
    border-radius: 50%;
    object-fit: cover;
    background: #1e293b;
    border: 2px solid #3b82f6;
    margin-bottom: 5px;
}

.rank-1 .avatar-img { width: 65px; height: 65px; border-color: #fbbf24; border-width: 3px; }
.rank-2 .avatar-img { width: 50px; height: 50px; border-color: #94a3b8; }
.rank-3 .avatar-img { width: 50px; height: 50px; border-color: #b45309; }

.medal-icon { font-size: 1.5rem; margin-bottom: 5px; }
.rank-1 .medal-icon { font-size: 2.2rem; }


/* =========================================
   LIST DESIGN (RANK 4 TO 10)
========================================= */
.leaderboard-list { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.list-item { 
    display: flex; 
    align-items: center; 
    background: rgba(30, 41, 59, 0.7); 
    padding: 15px 20px; 
    border-radius: 16px; 
    border: 1px solid rgba(255, 255, 255, 0.05); 
}

.list-item .rank { 
    font-size: 1.2rem; 
    font-weight: bold; 
    color: #94a3b8; 
    width: 45px; 
}

.list-avatar {
    width: 42px;
    height: 42px;
    margin-bottom: 0;
    margin-right: 12px;
    border-width: 1px;
}

.list-item .info { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
}

.list-item .info .name { 
    color: #fff; 
    font-weight: 600; 
    font-size: 1rem; 
}

.list-item .info .uid { 
    color: #64748b; 
    font-size: 0.75rem; 
    font-family: monospace; 
}

.list-item .score { 
    color: #4ade80; 
    font-weight: 800; 
    font-size: 1.1rem; 
}

/* =========================================
   MY RANK CARD (HIGHLIGHTED)
========================================= */
.my-rank-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 2px solid #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
    position: sticky;
    bottom: 20px;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.my-rank-card .rank { 
    color: #3b82f6; 
}
