/* =====================================================
   LEADERBOARD — Locked In Lx
   All selectors are lb-* prefixed / scoped to avoid
   collisions with the rest of the site.
   ===================================================== */

#leaderboard_section{
    --lb-gold:#FFD700;
    --lb-silver:#C7CBD1;
    --lb-bronze:#CD7F32;
    --lb-green:#3FFF6F;
    --lb-red:#EF4444;
    --lb-line:rgba(255,255,255,0.07);
    --lb-dim:#a1a1aa;
    --lb-surface:#0f0f12;
    --lb-ease:cubic-bezier(0.19,1,0.22,1);
    padding-bottom:30px;
}

/* Season chip under the section head */
#leaderboard_section .lb-season{
    display:inline-flex; align-items:center; gap:8px;
    margin-top:12px; padding:6px 16px; border-radius:99px;
    background:rgba(255,215,0,0.10);
    border:1px solid rgba(255,215,0,0.28);
    color:var(--lb-gold);
    font-family:'Inter',sans-serif; font-size:11px; font-weight:700;
    letter-spacing:0.18em; text-transform:uppercase;
}

/* ===================== PODIUM ===================== */
#leaderboard_section .lb-podium{
    max-width:900px; margin:44px auto 0; padding:0 24px;
    display:grid; grid-template-columns:1fr 1.15fr 1fr;
    align-items:end; gap:18px;
}
#leaderboard_section .lb-pod{
    display:flex; flex-direction:column; align-items:center;
    opacity:0; transform:translateY(24px);
    transition:opacity .7s ease, transform .8s var(--lb-ease);
}
#leaderboard_section .lb-pod.in{ opacity:1; transform:translateY(0); }
#leaderboard_section .lb-pod:nth-child(1).in{ transition-delay:.10s; }
#leaderboard_section .lb-pod:nth-child(3).in{ transition-delay:.20s; }

#leaderboard_section .lb-pod-av{
    position:relative;
    width:92px; height:92px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    background:linear-gradient(160deg,#1b1b20,#111114);
    font-family:'Barlow Condensed',sans-serif; font-weight:900;
    font-size:2rem; letter-spacing:.02em; color:#fff;
}
#leaderboard_section .lb-first .lb-pod-av{
    width:112px; height:112px; font-size:2.4rem;
    border:2px solid var(--lb-gold);
    box-shadow:0 0 0 6px rgba(255,215,0,.08), 0 12px 32px -12px rgba(255,215,0,.55);
}
#leaderboard_section .lb-second .lb-pod-av{ border:2px solid var(--lb-silver); }
#leaderboard_section .lb-third  .lb-pod-av{ border:2px solid var(--lb-bronze); }

/* Optional player photo — layered over the initials fallback.
   Self-clips via border-radius so the rank chip can still hang outside. */
#leaderboard_section .lb-photo{
    position:absolute; inset:0; z-index:1;
    width:100%; height:100%;
    object-fit:cover; object-position:center top;
    border-radius:50%;
    display:block;
}

#leaderboard_section .lb-pod-rank{
    z-index:2;
    position:absolute; bottom:-9px; left:50%; transform:translateX(-50%);
    font-family:'Barlow Condensed',sans-serif; font-weight:800;
    font-size:11px; letter-spacing:.12em; text-transform:uppercase;
    padding:3px 11px; border-radius:99px; color:#0a0a0a; white-space:nowrap;
}
#leaderboard_section .lb-first  .lb-pod-rank{ background:var(--lb-gold); }
#leaderboard_section .lb-second .lb-pod-rank{ background:var(--lb-silver); }
#leaderboard_section .lb-third  .lb-pod-rank{ background:var(--lb-bronze); color:#fff; }

#leaderboard_section .lb-pod-name{
    font-family:'Barlow Condensed',sans-serif; font-weight:800;
    font-size:1.15rem; text-transform:uppercase; letter-spacing:.03em;
    margin-top:20px; text-align:center; line-height:1.1; color:#fff;
}
#leaderboard_section .lb-first .lb-pod-name{ font-size:1.3rem; }
#leaderboard_section .lb-pod-alias{
    font-family:'Inter',sans-serif; font-size:12.5px; color:var(--lb-dim); margin-top:3px;
}

#leaderboard_section .lb-pod-block{
    width:100%; margin-top:18px; border-radius:16px 16px 0 0;
    border:1px solid var(--lb-line); border-bottom:none;
    background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.012));
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    padding:22px 14px;
}
#leaderboard_section .lb-first .lb-pod-block{
    height:210px; border-color:rgba(255,215,0,.35);
    background:linear-gradient(180deg,rgba(255,215,0,.10),rgba(255,215,0,.015));
}
#leaderboard_section .lb-second .lb-pod-block{ height:165px; }
#leaderboard_section .lb-third  .lb-pod-block{ height:140px; }

#leaderboard_section .lb-pod-pct{
    font-family:'Barlow Condensed',sans-serif; font-weight:900;
    font-size:2.6rem; line-height:1; color:#fff;
}
#leaderboard_section .lb-first .lb-pod-pct{ font-size:3.1rem; color:var(--lb-gold); }
#leaderboard_section .lb-u{ font-size:.55em; }
#leaderboard_section .lb-pod-pct-label{
    font-family:'Inter',sans-serif; font-size:9.5px; font-weight:600;
    letter-spacing:.2em; text-transform:uppercase; color:var(--lb-dim); margin-top:6px;
}
#leaderboard_section .lb-pod-wl{
    font-family:'Inter',sans-serif; margin-top:12px; font-size:13px; letter-spacing:.02em;
}
#leaderboard_section .lb-w{ color:var(--lb-green); font-weight:600; }
#leaderboard_section .lb-l{ color:var(--lb-red); font-weight:600; }
#leaderboard_section .lb-sep{ color:rgba(255,255,255,.25); margin:0 5px; }

/* ===================== TABLE ===================== */
#leaderboard_section .lb-table{ max-width:1000px; margin:34px auto 0; padding:0 24px; }
#leaderboard_section .lb-table-inner{
    border:1px solid var(--lb-line); border-radius:18px;
    background:var(--lb-surface); overflow:hidden;
}
#leaderboard_section .lb-table-head{
    display:flex; align-items:center; justify-content:space-between;
    padding:18px 24px; border-bottom:1px solid var(--lb-line);
    background:rgba(255,255,255,.02);
}
#leaderboard_section .lb-table-head .lb-t{
    display:flex; align-items:center; gap:10px;
    font-family:'Barlow Condensed',sans-serif; font-weight:800;
    font-size:1rem; letter-spacing:.14em; text-transform:uppercase; color:#fff;
}
#leaderboard_section .lb-table-head .lb-t svg{ color:var(--lb-gold); }
#leaderboard_section .lb-table-head .lb-c{
    font-family:'Inter',sans-serif; font-size:11px; font-weight:600;
    letter-spacing:.14em; text-transform:uppercase; color:var(--lb-dim);
}

#leaderboard_section .lb-row{
    display:grid;
    grid-template-columns:44px 46px 1fr 96px 128px 76px;
    align-items:center; gap:14px;
    padding:15px 24px; border-bottom:1px solid var(--lb-line);
    transition:background .25s ease;
}
#leaderboard_section .lb-row:last-child{ border-bottom:none; }
#leaderboard_section .lb-row:hover{ background:rgba(255,215,0,.03); }
#leaderboard_section .lb-row.lb-top1{ background:rgba(255,215,0,.045); }

#leaderboard_section .lb-r-pos{
    font-family:'Barlow Condensed',sans-serif; font-weight:900;
    font-size:1.25rem; color:var(--lb-dim);
}
#leaderboard_section .lb-top1 .lb-r-pos{ color:var(--lb-gold); }
#leaderboard_section .lb-top2 .lb-r-pos{ color:var(--lb-silver); }
#leaderboard_section .lb-top3 .lb-r-pos{ color:var(--lb-bronze); }

#leaderboard_section .lb-r-av{
    position:relative;
    width:38px; height:38px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    background:linear-gradient(160deg,#1b1b20,#111114);
    border:1px solid var(--lb-line); color:#fff;
    font-family:'Barlow Condensed',sans-serif; font-weight:800; font-size:14px;
}
#leaderboard_section .lb-top1 .lb-r-av{ border-color:rgba(255,215,0,.55); }

#leaderboard_section .lb-r-id{ min-width:0; }
#leaderboard_section .lb-r-name{
    font-family:'Barlow Condensed',sans-serif; font-weight:700;
    font-size:1.08rem; letter-spacing:.01em; color:#fff;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
#leaderboard_section .lb-alias{
    color:var(--lb-dim); font-weight:500; font-size:.95rem; margin-left:7px;
}
#leaderboard_section .lb-r-postag{
    font-family:'Inter',sans-serif; font-size:11px; color:var(--lb-dim);
    letter-spacing:.1em; margin-top:2px;
}

#leaderboard_section .lb-r-wl{ text-align:center; }
#leaderboard_section .lb-r-wl .lb-v{
    font-family:'Barlow Condensed',sans-serif; font-weight:700; font-size:1rem; color:#fff;
}
#leaderboard_section .lb-r-wl .lb-k{
    font-family:'Inter',sans-serif; font-size:9px; letter-spacing:.18em;
    color:var(--lb-dim); text-transform:uppercase; margin-top:2px;
}

#leaderboard_section .lb-r-bar{ display:flex; flex-direction:column; gap:6px; }
#leaderboard_section .lb-r-bar-track{
    height:5px; border-radius:99px; background:rgba(255,255,255,.07);
    overflow:hidden; position:relative;
}
#leaderboard_section .lb-r-bar-fill{
    display:block; height:100%; width:0; border-radius:99px;
    position:relative; overflow:hidden;
    background:linear-gradient(90deg, var(--lb-c2), var(--lb-c1));
    box-shadow:0 0 10px -2px var(--lb-glow);
    /* default tier (4th and below) */
    --lb-c1:#ffb800; --lb-c2:#8a6a00; --lb-glow:rgba(255,184,0,.5);
    transition:width 1.25s var(--lb-ease);
}
#leaderboard_section .lb-table.in .lb-r-bar-fill{ width:var(--lb-pct); }

/* Medal-tier bar colours — matches the podium rings + rank numbers */
#leaderboard_section .lb-top1 .lb-r-bar-fill{
    --lb-c1:#FFE86B; --lb-c2:#D4A200; --lb-glow:rgba(255,215,0,.75);
}
#leaderboard_section .lb-top2 .lb-r-bar-fill{
    --lb-c1:#EDF1F5; --lb-c2:#8E959D; --lb-glow:rgba(199,203,209,.6);
}
#leaderboard_section .lb-top3 .lb-r-bar-fill{
    --lb-c1:#E8A860; --lb-c2:#9C5A1E; --lb-glow:rgba(205,127,50,.6);
}

/* Cascading fill — each bar starts slightly after the one above it */
#leaderboard_section .lb-row:nth-child(1)  .lb-r-bar-fill{ transition-delay:.10s; }
#leaderboard_section .lb-row:nth-child(2)  .lb-r-bar-fill{ transition-delay:.18s; }
#leaderboard_section .lb-row:nth-child(3)  .lb-r-bar-fill{ transition-delay:.26s; }
#leaderboard_section .lb-row:nth-child(4)  .lb-r-bar-fill{ transition-delay:.34s; }
#leaderboard_section .lb-row:nth-child(5)  .lb-r-bar-fill{ transition-delay:.42s; }
#leaderboard_section .lb-row:nth-child(6)  .lb-r-bar-fill{ transition-delay:.50s; }
#leaderboard_section .lb-row:nth-child(7)  .lb-r-bar-fill{ transition-delay:.58s; }
#leaderboard_section .lb-row:nth-child(8)  .lb-r-bar-fill{ transition-delay:.66s; }
#leaderboard_section .lb-row:nth-child(9)  .lb-r-bar-fill{ transition-delay:.74s; }
#leaderboard_section .lb-row:nth-child(10) .lb-r-bar-fill{ transition-delay:.82s; }

/* Light sweep travelling along the filled portion */
#leaderboard_section .lb-r-bar-fill::after{
    content:""; position:absolute; inset:0; border-radius:inherit;
    background:linear-gradient(100deg,
        transparent 0%, transparent 35%,
        rgba(255,255,255,.75) 50%,
        transparent 65%, transparent 100%);
    transform:translateX(-100%);
}
#leaderboard_section .lb-table.in .lb-r-bar-fill::after{
    animation:lb-sweep 3.2s var(--lb-ease) infinite;
}
#leaderboard_section .lb-top1 .lb-r-bar-fill::after{ animation-duration:2.4s; }
@keyframes lb-sweep{
    0%   { transform:translateX(-100%); }
    55%  { transform:translateX(100%); }
    100% { transform:translateX(100%); }
}

/* Row hover: bar brightens and the % pops */
#leaderboard_section .lb-row:hover .lb-r-bar-fill{
    filter:brightness(1.25);
    box-shadow:0 0 14px -1px var(--lb-glow);
}
#leaderboard_section .lb-row:hover .lb-r-pct{ transform:scale(1.06); }
#leaderboard_section .lb-r-bar-k{
    font-family:'Inter',sans-serif; font-size:9px; letter-spacing:.18em;
    color:var(--lb-dim); text-transform:uppercase;
}

#leaderboard_section .lb-r-pct{
    text-align:right;
    font-family:'Barlow Condensed',sans-serif; font-weight:900;
    font-size:1.5rem; color:#ffb800; line-height:1;
    font-variant-numeric:tabular-nums;   /* stops width jitter while counting */
    transition:transform .3s var(--lb-ease), color .3s ease;
}
#leaderboard_section .lb-top1 .lb-r-pct{
    color:var(--lb-gold); text-shadow:0 0 16px rgba(255,215,0,.45);
}
#leaderboard_section .lb-top2 .lb-r-pct{ color:var(--lb-silver); }
#leaderboard_section .lb-top3 .lb-r-pct{ color:#E8A860; }
#leaderboard_section .lb-r-pct .lb-u{ font-size:.6em; opacity:.65; margin-left:1px; }

#leaderboard_section .lb-foot{
    max-width:1000px; margin:16px auto 0; padding:0 24px;
    text-align:center; font-family:'Inter',sans-serif;
    font-size:12px; color:rgba(255,255,255,.35); letter-spacing:.02em;
}

/* ===================== RESPONSIVE ===================== */
@media (min-width:1440px){
    #leaderboard_section .lb-podium{ max-width:980px; }
    #leaderboard_section .lb-table{ max-width:1100px; }
}
@media (max-width:820px){
    #leaderboard_section .lb-podium{ max-width:520px; gap:10px; padding:0 16px; }
    #leaderboard_section .lb-pod-av{ width:70px; height:70px; font-size:1.5rem; }
    #leaderboard_section .lb-first .lb-pod-av{ width:84px; height:84px; font-size:1.8rem; }
    #leaderboard_section .lb-pod-name{ font-size:.95rem; margin-top:16px; }
    #leaderboard_section .lb-first .lb-pod-name{ font-size:1.05rem; }
    #leaderboard_section .lb-pod-alias{ font-size:11px; }
    #leaderboard_section .lb-pod-pct{ font-size:1.9rem; }
    #leaderboard_section .lb-first .lb-pod-pct{ font-size:2.2rem; }
    #leaderboard_section .lb-first .lb-pod-block{ height:170px; }
    #leaderboard_section .lb-second .lb-pod-block{ height:135px; }
    #leaderboard_section .lb-third  .lb-pod-block{ height:115px; }
    #leaderboard_section .lb-pod-wl{ font-size:11.5px; }

    #leaderboard_section .lb-row{
        grid-template-columns:30px 34px 1fr 66px; gap:10px; padding:13px 14px;
    }
    #leaderboard_section .lb-r-bar,
    #leaderboard_section .lb-r-wl{ display:none; }
    #leaderboard_section .lb-table{ padding:0 14px; }
    #leaderboard_section .lb-table-head{ padding:15px 16px; }
    #leaderboard_section .lb-r-name{ font-size:.98rem; }
    #leaderboard_section .lb-alias{ display:none; }
    #leaderboard_section .lb-r-pct{ font-size:1.25rem; }
}
@media (prefers-reduced-motion:reduce){
    #leaderboard_section .lb-pod,
    #leaderboard_section .lb-r-bar-fill{
        opacity:1!important; transform:none!important; transition:none!important;
    }
    #leaderboard_section .lb-table.in .lb-r-bar-fill{ width:var(--lb-pct); }
    /* no sweeping light, no delays, no hover scaling */
    #leaderboard_section .lb-table.in .lb-r-bar-fill::after{ animation:none; display:none; }
    #leaderboard_section .lb-row .lb-r-bar-fill{ transition-delay:0s!important; }
    #leaderboard_section .lb-row:hover .lb-r-pct{ transform:none; }
}
