/* ==========================================================================
   Rankings → Monthly Stats → Top Players: podium
   ========================================================================== */
#view-wins .top-players-container {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

.podium {
    --gold: #eeae00;
    --silver: #c9d1db;
    --bronze: #d08a4e;
    font-family: Verdana, Tahoma, Geneva, sans-serif;
    color: #d8d8d0;
    padding: 14px 6px 0;
}

.podium-stage {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    align-items: end;
    gap: 12px;
}

.podium-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.podium-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 6px 12px;
    min-width: 0;
}

.podium-crown {
    width: 30px;
    height: 30px;
}

.podium-crown {
    color: var(--gold);
    filter: drop-shadow(0 0 8px rgba(238, 174, 0, 0.55));
}

.podium-medal {
    width: 30px;
    height: 30px;
}

.silver .podium-medal {
    color: var(--silver);
    filter: drop-shadow(0 0 6px rgba(201, 209, 219, 0.45));
}

.bronze .podium-medal {
    color: var(--bronze);
    filter: drop-shadow(0 0 6px rgba(208, 138, 78, 0.45));
}

.podium-name {
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    font: 700 15px Tahoma, Verdana, sans-serif;
    color: #fff;
}

.podium-name span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podium-col:hover .podium-name span {
    text-decoration: underline;
}

.podium-flag {
    flex: 0 0 auto;
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.podium-wins {
    display: flex;
    align-items: baseline;
    gap: 6px;
    line-height: 1;
}

.podium-wins b {
    font: 700 34px Tahoma, Verdana, sans-serif;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.podium-wins span {
    font-size: 12px;
    color: #8c8c80;
}

.gold .podium-wins b {
    font-size: 42px;
    color: var(--gold);
}

.podium-pvp {
    margin-top: -2px;
    font-size: 11px;
    color: #8c8c80;
}

.podium-stats {
    display: flex;
    justify-content: center;
    gap: 14px;
    font: 700 12px Tahoma, Verdana, sans-serif;
    color: #e6e6e0;
}

.podium-stats i,
.podium-strip-stats i {
    margin-right: 5px;
    font-style: normal;
    font-weight: 400;
    font-size: 10.5px;
    color: #8c8c80;
}

/* Blocks with embossed HUD-style place numbers */
.podium-block {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    padding-top: 10px;
    border: 1px solid;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    transform-origin: bottom;
}

.podium-block span {
    font: 900 40px Impact, "Arial Narrow Bold", "Arial Black", Tahoma, sans-serif;
    letter-spacing: 1px;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35),
        0 -1px 0 rgba(0, 0, 0, 0.6),
        0 3px 6px rgba(0, 0, 0, 0.45);
}

.gold .podium-block {
    height: 120px;
    color: var(--gold);
    border-color: rgba(238, 174, 0, 0.7);
    background: linear-gradient(180deg, rgba(238, 174, 0, 0.28), rgba(238, 174, 0, 0.04));
}

.gold .podium-block span {
    font-size: 48px;
}

.silver .podium-block {
    height: 84px;
    color: var(--silver);
    border-color: rgba(201, 209, 219, 0.55);
    background: linear-gradient(180deg, rgba(201, 209, 219, 0.2), rgba(201, 209, 219, 0.03));
}

.bronze .podium-block {
    height: 60px;
    color: var(--bronze);
    border-color: rgba(208, 138, 78, 0.6);
    background: linear-gradient(180deg, rgba(208, 138, 78, 0.24), rgba(208, 138, 78, 0.03));
}

/* Slow light sweep across the gold block */
.gold .podium-block::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 45%;
    background: linear-gradient(105deg, transparent, rgba(255, 236, 170, 0.35), transparent);
    transform: skewX(-18deg);
    animation: podium-shine 4.5s ease-in-out 1.6s infinite;
}

@keyframes podium-shine {
    0% { left: -60%; }
    35%, 100% { left: 130%; }
}

.podium-floor {
    height: 3px;
    margin: 0 6px;
    background: linear-gradient(90deg, transparent, rgba(232, 166, 60, 0.8), transparent);
}

/* Rise animation (added by JS; skipped for reduced motion) */
.podium--animate .podium-block {
    animation: podium-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: var(--podium-delay, 0ms);
}

.podium--animate .podium-player {
    animation: podium-fade 0.45s ease-out both;
    animation-delay: calc(var(--podium-delay, 0ms) + 250ms);
}

@keyframes podium-rise {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@keyframes podium-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .gold .podium-block::after {
        animation: none;
        display: none;
    }
}

/* Stats strip under the podium: phones only */
.podium-strip {
    display: none;
}

@media (max-width: 600px) {
    .podium {
        padding: 6px 0 0;
    }

    .podium-stage {
        gap: 6px;
    }

    .podium-player {
        gap: 4px;
        padding: 0 2px 8px;
    }

    .podium-stats,
    .podium-pvp {
        display: none;
    }

    .podium-name {
        gap: 5px;
        font-size: 12px;
    }

    .podium-flag {
        width: 16px;
        height: 12px;
    }

    .podium-crown,
    .podium-medal {
        width: 24px;
        height: 24px;
    }

    .podium-wins {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .podium-wins b {
        font-size: 24px;
    }

    .gold .podium-wins b {
        font-size: 30px;
    }

    .podium-wins span {
        font-size: 10px;
    }

    .gold .podium-block { height: 86px; }
    .silver .podium-block { height: 60px; }
    .bronze .podium-block { height: 44px; }

    .podium-block span { font-size: 30px; }
    .gold .podium-block span { font-size: 36px; }

    .podium-strip {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-top: 12px;
    }

    .podium-strip-row {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 10px;
        border-radius: 5px;
        background: rgba(0, 0, 0, 0.3);
        border-left: 3px solid;
        font-size: 12px;
    }

    .podium-strip-row.gold { border-left-color: var(--gold); order: 1; }
    .podium-strip-row.silver { border-left-color: var(--silver); order: 2; }
    .podium-strip-row.bronze { border-left-color: var(--bronze); order: 3; }

    .podium-strip-row > b {
        font: 900 16px Impact, "Arial Black", Tahoma, sans-serif;
        width: 14px;
        text-align: center;
    }

    .podium-strip-row.gold > b { color: var(--gold); }
    .podium-strip-row.silver > b { color: var(--silver); }
    .podium-strip-row.bronze > b { color: var(--bronze); }

    .podium-strip-name {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 700;
        color: #fff;
    }

    .podium-strip-stats {
        display: flex;
        gap: 10px;
        font: 700 11.5px Tahoma, Verdana, sans-serif;
        color: #e6e6e0;
        white-space: nowrap;
    }
}

/* Older ranking styles uppercase some names; keep names as players typed them */
.podium .podium-name,
.podium .podium-name span,
.podium .podium-strip-name {
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* Monthly Stats: the footer note always sits at the bottom of the panel */
#rankings-dialog #monthly-records-tab:checked + .label + #monthly-records {
    display: flex !important;
    flex-direction: column;
}

#monthly-records > .monthly-header-container {
    flex: 0 0 auto;
}

#monthly-records > #monthly-dynamic-content {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
}

#monthly-records .monthly-view-block {
    flex-direction: column;
    flex: 1 0 auto;
}

/* The script shows a view with display:block and hides the others with
   display:none; make the visible one a column so the note can sit last */
#monthly-records .monthly-view-block:not([style*="none"]) {
    display: flex !important;
}

#monthly-records .monthly-view-block > .table-footer-note {
    margin-top: auto !important;
    padding-top: 16px;
}

/* Very small phones: drop HS in the rows below the podium so names fit */
@media (max-width: 360px) {
    .podium-strip-stats span:nth-child(2) {
        display: none;
    }
}
