/* Leaderboard panel */
.leaderboard-wrap {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(52, 58, 64, 0.08);
    position: relative;
    overflow: hidden;
}

.leaderboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    margin-bottom: 20px;
}

.leaderboard-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.leaderboard-title-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #6f46ff;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(111, 70, 255, 0.35);
}

.leaderboard-title h3 {
    margin: 0;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.leaderboard-fy {
    color: #6f46ff;
    font-weight: 800;
}

.leaderboard-updated {
    color: #6b6b6b;
    font-size: 0.9rem;
}

.leaderboard-big-trophy i {
    font-size: 88px;
    color: #f4b400;
    opacity: 0.95;
}

.leaderboard-confetti span {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    opacity: 0.8;
}

.leaderboard-confetti .confetti-1 {
    top: 8px;
    right: 80px;
    background: #ff6fb1;
    transform: rotate(18deg);
}

.leaderboard-confetti .confetti-2 {
    top: 24px;
    right: 140px;
    background: #6f46ff;
    transform: rotate(-22deg);
}

.leaderboard-confetti .confetti-3 {
    top: 54px;
    right: 110px;
    background: #f4b400;
    transform: rotate(12deg);
}

.leaderboard-confetti .confetti-4 {
    top: 10px;
    right: 200px;
    background: #00c4cc;
    transform: rotate(30deg);
}

.leaderboard-confetti .confetti-5 {
    top: 62px;
    right: 230px;
    background: #ff8b3d;
    transform: rotate(-12deg);
}

/* Podium */
.leaderboard-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 18px;
    margin: 12px 0 26px;
}

.podium-card {
    position: relative;
    border-radius: 18px;
    padding: 26px 20px 30px;
    text-align: center;
    min-width: 220px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.podium-main {
    min-width: 260px;
    padding: 34px 22px 36px;
    transform: translateY(-10px);
}

.podium-gold {
    background: linear-gradient(135deg, #fff1b8, #f7c55f);
}

.podium-silver {
    background: linear-gradient(135deg, #eaf1ff, #c8dbff);
}

.podium-bronze {
    background: linear-gradient(135deg, #ffe7d6, #f6b48a);
}

.podium-medal {
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: #ffffff;
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
}

.podium-medal-gold {
    background: linear-gradient(135deg, #f7b731, #f59f00);
}

.podium-medal-silver {
    background: linear-gradient(135deg, #8aa4ff, #5676ff);
}

.podium-medal-bronze {
    background: linear-gradient(135deg, #f38e59, #db6b2c);
}

.podium-ribbon {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 12px;
    border-radius: 10px;
}

.podium-ribbon-gold {
    background: #f7b731;
}

.podium-ribbon-silver {
    background: #5676ff;
}

.podium-ribbon-bronze {
    background: #db6b2c;
}

.podium-label {
    margin-top: 26px;
    display: inline-block;
    padding: 6px 14px;
    font-weight: 700;
    border-radius: 20px;
    font-size: 12px;
    color: #ffffff;
}

.podium-label-gold {
    background: #f59f00;
}

.podium-label-silver {
    background: #4b69ff;
}

.podium-label-bronze {
    background: #d96d35;
}

.podium-code {
    margin-top: 10px;
    font-weight: 800;
}

.podium-name {
    margin-bottom: 8px;
    font-weight: 600;
    color: #2f2f2f;
}

.podium-amount-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.podium-amount {
    font-size: 34px;
    font-weight: 800;
}

.podium-main .podium-amount {
    font-size: 46px;
}

.podium-gold .podium-amount {
    color: #5100ff;
}

.podium-silver .podium-amount {
    color: #4b69ff;
}

.podium-bronze .podium-amount {
    color: #ff6600;
}

.podium-reward {
    display: none;
    /* Removed from podium UI */
}

.podium-laurel {
    width: 25px;
    height: 48px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.podium-laurel.left {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 80'%3E%3Cpath d='M15,80 C10,60 10,40 20,20 C10,30 5,50 15,80 Z' fill='%23d4af37'/%3E%3Cpath d='M20,20 C30,20 35,10 40,5 C30,10 25,15 20,20 Z' fill='%23d4af37'/%3E%3Cpath d='M18,35 C28,35 33,25 38,20 C28,25 23,30 18,35 Z' fill='%23d4af37'/%3E%3Cpath d='M15,50 C25,50 30,40 35,35 C25,40 20,45 15,50 Z' fill='%23d4af37'/%3E%3Cpath d='M12,65 C22,65 27,55 32,50 C22,55 17,60 12,65 Z' fill='%23d4af37'/%3E%3C/svg%3E");
    transform: scaleX(-1);
}

.podium-laurel.right {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 80'%3E%3Cpath d='M15,80 C10,60 10,40 20,20 C10,30 5,50 15,80 Z' fill='%23d4af37'/%3E%3Cpath d='M20,20 C30,20 35,10 40,5 C30,10 25,15 20,20 Z' fill='%23d4af37'/%3E%3Cpath d='M18,35 C28,35 33,25 38,20 C28,25 23,30 18,35 Z' fill='%23d4af37'/%3E%3Cpath d='M15,50 C25,50 30,40 35,35 C25,40 20,45 15,50 Z' fill='%23d4af37'/%3E%3Cpath d='M12,65 C22,65 27,55 32,50 C22,55 17,60 12,65 Z' fill='%23d4af37'/%3E%3C/svg%3E");
}

.podium-base {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 82%;
    height: 16px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.12);
}

.podium-gold .podium-base {
    background: linear-gradient(135deg, #f7b731, #f59f00);
}

.podium-silver .podium-base {
    background: linear-gradient(135deg, #9db2ff, #6e86ff);
}

.podium-bronze .podium-base {
    background: linear-gradient(135deg, #f3a76e, #db6b2c);
}

/* Table */
.leaderboard-table-wrap {
    margin-top: 8px;
}

.leaderboard-table {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #ececec;
}

.leaderboard-table thead th {
    background: linear-gradient(135deg, #8a2be2, #6f46ff);
    color: #ffffff;
    font-weight: 700;
    border: none;
}

.leaderboard-row-gold {
    background: #f5fff5;
}

/* Light green tint like screenshot */
.leaderboard-row-silver {
    background: #f0f4ff;
}

.leaderboard-row-bronze {
    background: #fffdf0;
}

/* Very light tint */

.rank-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-weight: 800;
    color: #ffffff;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.12);
}

.rank-medal-gold {
    background: linear-gradient(135deg, #f7b731, #f59f00);
}

.rank-medal-silver {
    background: linear-gradient(135deg, #b0c4de, #778899);
}

.rank-medal-bronze {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
}

.leaderboard-star {
    color: #f4b400;
    margin-left: 6px;
}

.leaderboard-reward {
    font-weight: 800;
}

.leaderboard-row-gold .leaderboard-reward {
    color: #28a745;
}

.leaderboard-row-silver .leaderboard-reward {
    color: #007bff;
}

.leaderboard-row-bronze .leaderboard-reward {
    color: #fd7e14;
}

.leaderboard-staff {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.staff-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8ddff;
    color: #5b2fd9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

/* Footer */
.leaderboard-footer {
    margin-top: 18px;
    text-align: center;
    color: #6b6b6b;
    font-weight: 600;
}

@media (max-width: 991px) {
    .leaderboard-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .leaderboard-big-trophy {
        align-self: flex-end;
    }

    .leaderboard-podium {
        flex-direction: column;
        align-items: center;
    }

    .podium-main {
        transform: none;
    }
}

/* Leaderboard Tab Highlight & Overlap Fix */
.nav-item:has(#load-performance-tab) {
    position: relative !important;
    z-index: 1050 !important;
}

#load-performance-tab {
    position: relative !important;
    z-index: 1050 !important;
    animation: leaderboard-pulse 1.8s infinite !important;
}

.nav-item:has(#load-performance-tab) {
    position: relative !important;
    z-index: 1050 !important;
}

#load-performance-tab {
    position: relative !important;
    z-index: 1050 !important;
    color: #ffffff !important;
    background-color: transparent !important;
    border: none !important;
}

#load-performance-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    z-index: -1;
    animation: leaderboard-pulse-bg 1.5s infinite;
}

@keyframes leaderboard-pulse-bg {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.9);
    }

    50% {
        box-shadow: 0 0 20px 8px rgba(220, 53, 69, 0.6);
    }

    100% {
        box-shadow: 0 0 0 16px rgba(220, 53, 69, 0);
    }
}