/* =========================================================
   HANGMAN RESCUE - PREMIUM SCOREBOARD
   ========================================================= */

#players {
    display: grid;
    gap: 9px;
}

#players .hr-score-player {
    position: relative;

    display: block;

    padding: 9px;

    overflow: hidden;

    border: 2px solid rgba(164, 111, 36, 0.62);
    border-radius: 12px;

    background:
        linear-gradient(
            180deg,
            rgba(42, 55, 70, 0.94),
            rgba(19, 31, 45, 0.96)
        );

    box-shadow:
        inset 0 0 0 1px rgba(255, 218, 110, 0.06),
        0 3px 8px rgba(0, 0, 0, 0.29);

    color: #ffffff;
}

#players .hr-score-player.hr-score-leader {
    border-color:
        rgba(255, 208, 66, 0.96);

    background:
        radial-gradient(
            circle at 7% 8%,
            rgba(255, 213, 76, 0.18),
            transparent 34%
        ),
        linear-gradient(
            180deg,
            rgba(91, 66, 22, 0.97),
            rgba(41, 37, 31, 0.97)
        );

    box-shadow:
        inset 0 0 0 1px rgba(255, 231, 142, 0.16),
        0 0 14px rgba(255, 193, 45, 0.23);
}

.hr-score-player__header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hr-score-player__medal {
    flex: 0 0 auto;

    min-width: 25px;

    color: #e4c373;

    font-size: 17px;
    font-weight: 900;
    text-align: center;
}

.hr-score-player__identity {
    min-width: 0;
    flex: 1;
}

.hr-score-player__identity strong {
    display: block;

    overflow: hidden;

    color: #ffffff;

    font-size: 13px;
    line-height: 1.1;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-score-player__identity small {
    display: block;

    margin-top: 2px;

    color: #bcd2e5;

    font-size: 9px;
    font-weight: 700;
}

.hr-score-player__points {
    flex: 0 0 auto;

    color: #ffe18a;

    font-size: 16px;
    line-height: 0.9;
    text-align: right;
}

.hr-score-player__points small {
    display: block;

    margin-top: 4px;

    color: #c8ad66;

    font-size: 7px;
    letter-spacing: 0.08em;
}

.hr-score-player__stats {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 4px 7px;

    margin-top: 8px;
    padding-top: 7px;

    border-top:
        1px solid rgba(255, 255, 255, 0.10);
}

.hr-score-player__stats span {
    overflow: hidden;

    color: #cbdcea;

    font-size: 8px;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-score-player__stats strong {
    color: #ffffff;
}

/* ---------------------------------------------------------
   CHAMPION OVERLAY
   --------------------------------------------------------- */

.hr-champion-overlay {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;
    box-sizing: border-box;

    pointer-events: none;

    opacity: 0;
    visibility: hidden;

    z-index: 10500;

    background:
        radial-gradient(
            circle at center,
            rgba(255, 210, 75, 0.18),
            rgba(8, 17, 31, 0.66) 70%
        );

    transition:
        opacity 220ms ease,
        visibility 220ms ease;
}

.hr-champion-overlay.hr-visible {
    opacity: 1;
    visibility: visible;
}

.hr-champion-card {
    position: relative;

    width:
        min(520px, calc(100vw - 30px));

    overflow: hidden;

    padding: 21px 22px 19px;

    border: 4px solid #c18120;
    border-radius: 22px;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(255, 210, 76, 0.15),
            transparent 42%
        ),
        linear-gradient(
            180deg,
            rgba(60, 38, 11, 0.99),
            rgba(15, 33, 54, 0.99)
        );

    box-shadow:
        inset 0 0 0 2px rgba(255, 231, 147, 0.24),
        0 18px 50px rgba(0, 0, 0, 0.72),
        0 0 28px rgba(255, 190, 42, 0.25);

    color: #ffffff;
    text-align: center;

    pointer-events: auto;

    transform:
        translateY(22px)
        scale(0.86);

    opacity: 0;
}

.hr-champion-overlay.hr-visible
.hr-champion-card {
    animation:
        hrChampionEnter 650ms
        cubic-bezier(0.18, 0.86, 0.24, 1.18)
        forwards;
}

.hr-champion-crown {
    display: block;

    margin-bottom: 3px;

    font-size: 41px;
}

.hr-champion-kicker {
    display: block;

    color: #d9b65e;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hr-champion-name {
    display: block;

    margin: 4px 0 5px;

    color: #ffe28c;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(29px, 7vw, 45px);

    font-weight: 900;
    line-height: 1;

    text-shadow:
        0 3px 0 #723809,
        0 5px 7px rgba(0, 0, 0, 0.65),
        0 0 14px rgba(255, 207, 64, 0.41);
}

.hr-champion-result {
    display: block;

    margin-bottom: 13px;

    color: #e4effa;

    font-size: 12px;
    font-weight: 700;
}

.hr-champion-stats {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 7px;

    margin-bottom: 14px;
}

.hr-champion-stat {
    padding: 8px 5px;

    border: 1px solid rgba(255, 213, 88, 0.33);
    border-radius: 10px;

    background:
        rgba(9, 24, 40, 0.63);
}

.hr-champion-stat strong {
    display: block;

    color: #ffffff;

    font-size: 18px;
}

.hr-champion-stat small {
    display: block;

    margin-top: 3px;

    color: #bcd2e5;

    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.hr-champion-close {
    min-width: 145px;

    padding: 9px 18px;

    border: 2px solid #e8bc4f;
    border-radius: 11px;

    background:
        linear-gradient(
            180deg,
            #345d7c,
            #193950
        );

    color: #ffffff;

    font-size: 12px;
    font-weight: 900;

    cursor: pointer;
}

@keyframes hrChampionEnter {
    0% {
        opacity: 0;

        transform:
            translateY(24px)
            scale(0.82)
            rotate(-2deg);
    }

    66% {
        opacity: 1;

        transform:
            translateY(-5px)
            scale(1.04)
            rotate(1deg);
    }

    100% {
        opacity: 1;

        transform:
            translateY(0)
            scale(1)
            rotate(0);
    }
}

@media (max-width: 700px) {
    #players .hr-score-player {
        padding: 7px;
    }

    .hr-score-player__stats {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .hr-score-player__stats {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .hr-champion-card {
        padding:
            17px 12px 15px;

        border-width:
            3px;
    }

    .hr-champion-stats {
        gap: 5px;
    }

    .hr-champion-stat strong {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hr-champion-overlay,
    .hr-champion-overlay * {
        animation:
            none !important;

        transition-duration:
            1ms !important;
    }
}

/* =========================================================
   PREMIUM SCOREBOARD - LARGE READABLE TYPE OVERRIDE
   ========================================================= */

/* Give the left crew panel more useful room on desktop. */
@media (min-width: 901px) {
    .game-layout {
        grid-template-columns:
            minmax(165px, 205px)
            minmax(0, 1fr)
            minmax(145px, 175px) !important;
    }

    .players-panel {
        min-width: 0;
    }
}

#players {
    gap: 11px;
}

#players .hr-score-player {
    padding: 12px 11px;

    border-radius: 14px;
}

.hr-score-player__header {
    gap: 10px;
}

.hr-score-player__medal {
    min-width: 31px;

    font-size: 23px;
}

.hr-score-player__identity strong {
    font-size: 16px;
    line-height: 1.18;
}

.hr-score-player__identity small {
    margin-top: 4px;

    font-size: 11px;
    line-height: 1.2;
}

.hr-score-player__points {
    font-size: 20px;
    line-height: 1;
}

.hr-score-player__points small {
    margin-top: 5px;

    font-size: 9px;
}

.hr-score-player__stats {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 7px 9px;

    margin-top: 10px;
    padding-top: 9px;
}

.hr-score-player__stats span {
    display: flex;
    align-items: center;
    gap: 3px;

    min-width: 0;

    font-size: 10px;
    line-height: 1.25;

    white-space: normal;
}

.hr-score-player__stats strong {
    font-size: 12px;
}

/* Make the Pirate Crew heading easier to read too. */
.players-panel .panel-heading h2 {
    font-size: 16px;
}

.players-panel .panel-heading span {
    font-size: 18px;
}

/* ---------------------------------------------------------
   MEDIUM DESKTOP / TABLET
   --------------------------------------------------------- */

@media (min-width: 651px) and (max-width: 1100px) {
    .game-layout {
        grid-template-columns:
            minmax(145px, 180px)
            minmax(0, 1fr)
            minmax(125px, 155px) !important;
    }

    #players .hr-score-player {
        padding: 10px 9px;
    }

    .hr-score-player__identity strong {
        font-size: 14px;
    }

    .hr-score-player__identity small {
        font-size: 10px;
    }

    .hr-score-player__points {
        font-size: 18px;
    }

    .hr-score-player__stats span {
        font-size: 9px;
    }

    .hr-score-player__stats strong {
        font-size: 11px;
    }
}

/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 700px) {
    #players {
        gap: 10px;
    }

    #players .hr-score-player {
        padding: 11px 10px;
    }

    .hr-score-player__medal {
        min-width: 29px;

        font-size: 21px;
    }

    .hr-score-player__identity strong {
        font-size: 16px;
    }

    .hr-score-player__identity small {
        font-size: 11px;
    }

    .hr-score-player__points {
        font-size: 20px;
    }

    .hr-score-player__points small {
        font-size: 9px;
    }

    .hr-score-player__stats {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 8px 6px;
    }

    .hr-score-player__stats span {
        justify-content: center;

        font-size: 10px;
        text-align: center;
    }

    .hr-score-player__stats strong {
        font-size: 12px;
    }

    .players-panel .panel-heading h2 {
        font-size: 17px;
    }
}

/* ---------------------------------------------------------
   SMALL PHONES
   --------------------------------------------------------- */

@media (max-width: 430px) {
    .hr-score-player__header {
        gap: 7px;
    }

    .hr-score-player__medal {
        min-width: 26px;

        font-size: 19px;
    }

    .hr-score-player__identity strong {
        font-size: 15px;
    }

    .hr-score-player__identity small {
        font-size: 10px;
    }

    .hr-score-player__points {
        font-size: 18px;
    }

    .hr-score-player__stats {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .hr-score-player__stats span {
        justify-content: flex-start;

        font-size: 10px;
        text-align: left;
    }

    .hr-score-player__stats strong {
        font-size: 12px;
    }
}
