.game-section{
    background-color: var(--background-dark-default-color);
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0px 20px 100px;
}

.game-container{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: start;
    gap: 20px;
    width: 100%;
}

.game-section-container{
    width: 100%;
    max-width: 1340px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 100px;
}

.game-section-hero-content{
    height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
}

.game-section-hero-content h2{
    font-size: clamp(27px, 4vw, 32px);
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: var(--text-accent-default-color);
}

.game-section-hero-content p{
    font-size: clamp(14px, 3vw, 16px);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    color: var(--text-light-default-color);
    max-width: 70%;
    margin: 0 auto;
}

/*
 * =========================================
 * RANKING GRACZY
 * =========================================
 */

 .game-section-leaderboard {
    width: 27% !important;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 20px;
    background:
        linear-gradient(
            145deg,
            rgba(20, 20, 20, 0.98),
            rgba(7, 7, 7, 0.98)
        );
    color: #ffffff;
}

.game-section-leaderboard-header {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.game-section-leaderboard-header-content{
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 10px;
}

.game-section-leaderboard-eyebrow {
    display: block;
    margin-bottom: 9px;
    color: #a70e13;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 0.9;
}

.game-section-leaderboard-header h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.05;
}

.game-section-leaderboard-header p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.6;
}

.game-section-leaderboard-summary {
    flex: 0 0 auto;
    min-width: 150px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    padding-left: 15px;
}

.game-section-leaderboard-summary span {
    display: block;
    color: rgb(255, 255, 255);
    font-size: 12px;
}

.game-section-leaderboard-summary strong {
    color: rgb(255, 255, 255);
    font-size: 12px;
}

.game-section-leaderboard-status {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.game-section-leaderboard-status.is-error {
    border-color: rgba(226, 55, 62, 0.4);
    background: rgba(226, 55, 62, 0.1);
    color: #ff969a;
}

.game-section-leaderboard-status.is-empty {
    color: rgba(255, 255, 255, 0.68);
}

.game-section-leaderboard-table-wrapper {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}

.game-section-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.game-section-leaderboard-table th,
.game-section-leaderboard-table td {
    padding: 17px 20px;
    text-align: left;
}

.game-section-leaderboard-table th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.46);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.game-section-leaderboard-table th:last-child,
.game-section-leaderboard-table td:last-child {
    text-align: right;
}

.game-section-leaderboard-row {
    transition:
        background-color 160ms ease,
        transform 160ms ease;
}

.game-section-leaderboard-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.game-section-leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.045);
}

.game-section-leaderboard-row.is-current-player {
    background: rgba(189, 17, 24, 0.16);
    box-shadow:
        inset 4px 0 0 #d51a20;
}

.game-section-leaderboard-row.is-position-1 {
    background:
        linear-gradient(
            90deg,
            rgba(224, 177, 72, 0.13),
            transparent
        );
}

.game-section-leaderboard-row.is-position-2 {
    background:
        linear-gradient(
            90deg,
            rgba(190, 200, 216, 0.1),
            transparent
        );
}

.game-section-leaderboard-row.is-position-3 {
    background:
        linear-gradient(
            90deg,
            rgba(181, 110, 63, 0.11),
            transparent
        );
}

.game-section-leaderboard-position {
    width: 110px;
    color: rgba(255, 255, 255, 0.68);
    font-weight: 800;
}

.game-section-leaderboard-nickname {
    color: #ffffff;
    font-weight: 700;
}

.game-section-leaderboard-nickname small {
    display: inline-flex;
    margin-left: 10px;
    border-radius: 999px;
    padding: 3px 8px;
    background: #bd1118;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: middle;
}

.game-section-leaderboard-score {
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.55);
}

.game-section-leaderboard-score strong {
    color: #ffffff;
    font-size: 22px;
}

.game-section-leaderboard-current {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid rgba(213, 26, 32, 0.38);
    border-radius: 12px;
    background: rgba(213, 26, 32, 0.18);
}

.game-section-leaderboard-current[hidden] {
    display: none;
}

.game-section-leaderboard-current > div {
    padding: 16px 18px;
    background: rgba(8, 8, 8, 0.76);
}

.game-section-leaderboard-current span {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.game-section-leaderboard-current strong {
    color: #ffffff;
    font-size: 17px;
}

.game-section-leaderboard-refresh {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;

        padding: 15px 30px;
        color: #ffffff;
        border-radius: 10px;
        cursor: pointer;
        font-family: var(--font-heading);
        font-size: 14px;
        text-decoration: none;
        margin-left: auto;
        margin-top: 10px;
        font-weight: 900;
        text-transform: uppercase;
        transition: 0.3s all !important;
}

.game-section-leaderboard-refresh:hover {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.06);
}

.game-section-leaderboard-refresh:disabled {
    cursor: wait;
    opacity: 0.5;
}

@media (max-width: 1130px){
    .game-container{
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
    }
    .game-section-leaderboard{
        width: 100% !important;
    }
    .game-section-game{
        width: 100%;
    }
    .game-section-canvas-wrapper{
        aspect-ratio: 3/2;
    }
}


@media (max-width: 700px) {
    .game-section-leaderboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .game-section-leaderboard-summary {
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        border-left: 0;
        padding-top: 18px;
        padding-left: 0;
    }

    .game-section-leaderboard-table th,
    .game-section-leaderboard-table td {
        padding: 14px 12px;
    }

    .game-section-leaderboard-position {
        width: 76px;
    }

    .game-section-leaderboard-current {
        grid-template-columns: 1fr;
    }
}



/*
 * ADAX PGA — finalny widok rankingu.
 *
 * 1. Pobieramy maksymalnie 200 pozycji.
 * 2. W oknie widać nagłówek oraz dokładnie 5 wierszy.
 * 3. Lista przewija się pionowo.
 * 4. Wszystkie trzy kolumny mają po 33,333%.
 * 5. Długie nicki są obcinane wielokropkiem.
 * 6. Pozycja zalogowanego gracza poza TOP 5 jest przypięta pod listą.
 */

 .game-section-leaderboard,
 .game-section-leaderboard-results,
 .game-section-leaderboard-table-wrapper {
     box-sizing: border-box;
     width: 100%;
     min-width: 0;
 }
 
 .game-section-leaderboard-results {
     --leaderboard-header-height: 48px;
     --leaderboard-row-height: 56px;
 
     display: flex;
     flex-direction: column;
     overflow: hidden;
 }
 
 .game-section-leaderboard-table-wrapper {
     max-height: calc(
         var(--leaderboard-header-height) +
         (5 * var(--leaderboard-row-height))
     );
     overflow-x: hidden;
     overflow-y: auto;
     overscroll-behavior: contain;
     scrollbar-gutter: stable;
     -webkit-overflow-scrolling: touch;
 }
 
 .game-section-leaderboard-table-wrapper[hidden] {
     display: none;
 }
 
 .game-section-leaderboard-table-wrapper:focus-visible {
     outline: 2px solid currentColor;
     outline-offset: -2px;
 }
 
 .game-section-leaderboard-table {
     width: 100%;
     min-width: 0;
     table-layout: fixed;
     border-collapse: separate;
     border-spacing: 0;
 }
 
 .game-section-leaderboard-table col:nth-child(1) {
     width: 25%;
 }
 
 .game-section-leaderboard-table col:nth-child(2) {
     width: 40%;
 }
 
 .game-section-leaderboard-table col:nth-child(3) {
     width: 35%;
 }
 
 .game-section-leaderboard-table th,
 .game-section-leaderboard-table td {
     box-sizing: border-box;
     min-width: 0;
     max-width: 0;
     height: var(--leaderboard-row-height);
     padding-inline: 12px;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
 }
 
 .game-section-leaderboard-table th:nth-child(1),
 .game-section-leaderboard-table td:nth-child(1) {
     width: 25%;
 }
 
 .game-section-leaderboard-table th:nth-child(2),
 .game-section-leaderboard-table td:nth-child(2) {
     width: 40%;
 }
 
 .game-section-leaderboard-table th:nth-child(3),
 .game-section-leaderboard-table td:nth-child(3) {
     width: 35%;
 }
 
 .game-section-leaderboard-table thead th {
     position: sticky;
     top: 0;
     z-index: 2;
     height: var(--leaderboard-header-height);
     background: #000;
 }
 
 .game-section-leaderboard-table th:first-child,
 .game-section-leaderboard-table td:first-child {
     text-align: left;
 }
 
 .game-section-leaderboard-table th:nth-child(2),
 .game-section-leaderboard-table td:nth-child(2) {
     text-align: start;
 }
 
 .game-section-leaderboard-table th:last-child,
 .game-section-leaderboard-table td:last-child {
     text-align: start;
 }
 
 .game-section-leaderboard-nickname {
     min-width: 0;
 }
 
 .game-section-leaderboard-nickname > span {
     display: inline-block;
     max-width: calc(100% - 38px);
     overflow: hidden;
     text-overflow: ellipsis;
     vertical-align: middle;
     white-space: nowrap;
 }
 
 .game-section-leaderboard-nickname > small {
     display: inline-block;
     margin-left: 6px;
     vertical-align: middle;
 }
 
 /*
  * Wiersz bieżącego gracza znajduje się poza przewijanym wrapperem.
  * Dzięki temu pozostaje przypięty na dole, a tabela nadal się przewija.
  */
 .game-section-leaderboard-current {
     position: relative;
     z-index: 3;
     display: grid;
     grid-template-columns: repeat(3, minmax(0, 1fr));
     width: 100%;
     min-width: 0;
 }
 
 .game-section-leaderboard-current[hidden] {
     display: none;
 }
 
 .game-section-leaderboard-current > div {
     box-sizing: border-box;
     min-width: 0;
     padding-inline: 12px;
     overflow: hidden;
 }
 
 .game-section-leaderboard-current > div:first-child {
     text-align: left;
 }
 
 .game-section-leaderboard-current > div:nth-child(2) {
     text-align: center;
 }
 
 .game-section-leaderboard-current > div:last-child {
     text-align: right;
 }
 
 .game-section-leaderboard-current span,
 .game-section-leaderboard-current strong {
     display: block;
     min-width: 0;
     max-width: 100%;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
 }
 





@media (max-width: 1000px){
    .game-section-hero-content p{
        max-width: 100%;
        text-align: left;
    }
    .game-section-hero-content h2{
        width: 100%;
        text-align: left;
    }
    .game-container{
        flex-direction: column;
        gap: 20px;
    }
    .game-section-game{
        width: 100%;
    }
    .game-section-canvas-wrapper{
        aspect-ratio: 3/2;
    }
    .game-section-leaderboard{
        width: 100% !important;
    }
}

 @media (max-width: 640px) {
     .game-section-leaderboard-results {
         --leaderboard-header-height: 44px;
         --leaderboard-row-height: 52px;
     }
 
     .game-section-leaderboard-table th,
     .game-section-leaderboard-table td,
     .game-section-leaderboard-current > div {
         padding-inline: 8px;
     }
 }
 