/* SECTION WRAPPER */
.leaders-section {
    position: relative;
    padding: 80px 20px;
    overflow: hidden;
    background: linear-gradient(-45deg, #ff6a00, #ff8c42, #ffb347, #ff7a18);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* PARTICLES */
.particles::before,
.particles::after {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    animation: floatParticles 20s linear infinite;
}

.particles::after {
    left: 60%;
    animation-duration: 25s;
}

@keyframes floatParticles {
    0% { transform: translateY(100%) rotate(0deg); }
    100% { transform: translateY(-100%) rotate(360deg); }
}

/* CONTAINER */
.leaders-container {
    max-width: 1100px;
    margin: auto;
    background: rgba(0,0,0,0.75);
    padding: 40px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

.leaders-title {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2rem;
    letter-spacing: 1px;
}

/* TABLE */
.leaders-table {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

.leaders-table th {
    text-align: left;
    padding: 14px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    font-weight: 600;
}

.leaders-table td {
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* RANK */
.rank {
    font-weight: 900;
    font-style: italic;
    font-size: 1.2rem;
}

/* PLAYER */
.player {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ffb347;
}

/* FPE */
.fpe {
    font-weight: 900;
    font-size: 1.1rem;
    color: #00ff88;
    animation: glowPulse 2s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    from { text-shadow: 0 0 5px #00ff88; }
    to { text-shadow: 0 0 20px #00ff88; }
}

/* SPORT SHINE */
.sport {
    position: relative;
    overflow: hidden;
}

.sport::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: sportShine 3s infinite;
}

@keyframes sportShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* NEW ENTRY GOLD SHINE */
.new-entry {
    position: relative;
    animation: goldFlash 4s ease-in-out infinite;
}

@keyframes goldFlash {
    0%, 100% { background: rgba(255,215,0,0.08); }
    50% { background: rgba(255,215,0,0.25); }
}

/* LEGEND */
.legend {
    margin-top: 25px;
    padding: 15px;
    background: #111;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ccc;
}

.legend-box {
    width: 40px;
    height: 20px;
    background: rgba(255,215,0,0.25);
    border-radius: 4px;
}




/* ============================= */
/* MOBILE OPTIMIZATION */
/* ============================= */

@media (max-width: 768px) {

    .leaders-section {
        padding: 50px 12px;
    }

    .leaders-container {
        padding: 20px;
        border-radius: 12px;
    }

    .leaders-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    /* Enable horizontal scroll cleanly */
    .leaders-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    .leaders-table thead {
        position: sticky;
        top: 0;
        background: rgba(0,0,0,0.95);
        z-index: 5;
    }

    .leaders-table th,
    .leaders-table td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    /* Rank slightly smaller but still bold */
    .rank {
        font-size: 1rem;
    }

    /* Player image smaller */
    .player img {
        width: 28px;
        height: 28px;
    }

    .player {
        gap: 8px;
    }

    /* FPE still bold but scaled */
    .fpe {
        font-size: 0.95rem;
    }

    /* Reduce sport shine intensity for performance */
    .sport::after {
        animation-duration: 4s;
        opacity: 0.6;
    }

    /* So highlight doesn't overpower on small screens */
    .new-entry {
        animation-duration: 6s;
    }

    /* Legend stacks vertically */
    .legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 0.85rem;
    }

    .legend-box {
        width: 30px;
        height: 15px;
    }

    /* Reduce particle size */
    .particles::before,
    .particles::after {
        width: 400px;
        height: 400px;
    }
}