* {
    scroll-behavior: smooth;
    overscroll-behavior-x: none;
    touch-action: manipulation;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-callout: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-modify: none;
    -webkit-highlight: none;
    backface-visibility: hidden;
}

:root {
    --gridSrc: url("../bmp/grid.bmp");
    --numsSrc: url("../bmp/nums.bmp");
}

::-webkit-scrollbar {
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    height: 10px;
    border: 6px solid transparent;
    border-radius: 8px;
    background-clip: content-box;
    background-color: #fff4;
}
::-webkit-scrollbar-corner{
    display: none;
}

body {
    margin: 0;
    background-color: rgb(44, 44, 66);
    color: white;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    /* min-height: 100vh; */
    /* min-height: -webkit-fill-available; */
}

#mainContainer {
    --mcMargin: 32px;
    display: grid;
    height: calc(100vh - (var(--mcMargin) * 2));
    margin: var(--mcMargin);
    grid-template-columns: 1fr 250px;
    transition: margin 0.25s ease;
    box-shadow: 0px 0px 32px #00000088;
    border-radius: 32px;
    overflow: hidden;
}

#gameContent {
    border-bottom: 0;
    border-right: 1px solid black;
    /* background-color: red; */
    /* padding: 15px 15px 0px 15px; */
    overflow: scroll;
}

#controlsScreen {
    padding: 15px 15px 0px 15px;
}

#playerList {
    align-self: start;
    border-top: 0;
    display: grid;
    /* background-color: blue; */
    padding: 15px;
    overflow-y: scroll;
    overflow: hidden;
    gap: 8px;
    max-height: calc(100% - 24px);
}

player {
    /* background-color: red; */
    display: grid;
    grid-template-areas: 
        'p n n n n n n'
        'p d d d d d d';
    background-color: #00000022;
    width: 220px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    transition: scale 0.25s ease, box-shadow 0.25s ease;
}

player:hover.spectate {
    scale: 1.03;
    box-shadow: 0px 2px 10px #00000088;
}

player:active.spectate {
    scale: 0.97;
    box-shadow: 0px 2px 5px #00000088;
}

player img {
    grid-area: p;
    align-self: center;
    width: 48px
}

player name {
    grid-area: n;
    font-weight: bold;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    width: 150px;
    padding-top: 2px;
    text-overflow: ellipsis;
}

player data {
    grid-area: d;
}

.bigInput {
    font-size: 24px;
    text-align: center;
}

.gameScreenTopBar {
    display: grid;
    grid-template-columns: 80px 10px 50px 50px 50px 50px 50px 50px 1fr 100px 10px 80px;
    height: 100%;
    place-items: center;
    text-align: center;
}

#gameScreen {
    grid-template-rows: 60px 1fr;
}

@media (max-width: 950px) {
    #mainContainer {
        --mcMargin: 16px;
        height: calc(100vh - (var(--mcMargin) * 2));
        grid-template-columns: 1fr; 
        grid-template-rows: 1fr 80px;
    }

    .gameScreenTopBar {
        grid-template-areas: 
        'f f f f f t t t t';
        grid-template-rows: 1fr 1fr;
        column-gap: 2px;
        grid-template-columns: unset;
    }

    #flags {
        grid-area: f;
    }

    #time {
        grid-area: t
    }

    #gameScreen {
        grid-template-rows: 120px 1fr;
    }

    #playerList {
        place-items: center;
        grid-auto-flow: column;
        grid-template-rows: 1fr;
    }

    #gameContent {
        border-right: 0;
        border-bottom: 1px solid black;
    }

    #controlsDesktop {
        display: none;
    }

    #controlsMobile {
        display: block !important;
    }
}

.hudButton {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    font-size: 24px;
    background-color: #00000022;
    color: white;
    border: 0;
    border-radius: 8px;
    transition: scale 0.25s ease;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-callout: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-modify: none;
    -webkit-highlight: none;
}

.hudButton:hover {
    scale: 1.075
}

.hudButton:active {
    scale: 0.95;
    background-color: #00000044;
}

.wideHudButton {
    width: max-content;
    height: 40px;
    font-size: 16px;
    background-color: #00000022;
    color: white;
    border: 0;
    border-radius: 8px;
    transition: scale 0.25s ease;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-callout: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-modify: none;
    -webkit-highlight: none;
}

.wideHudButton:hover:not(:disabled) {
    scale: 1.075
}

.wideHudButton:active:not(:disabled) {
    scale: 0.95;
    background-color: #00000044;
}

.wideHudButton:disabled {
    background-color: #00000088;
    color: #888888
}

#resetZoom span {
    font-size: 20px;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-callout: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-modify: none;
    -webkit-highlight: none;
}

#zoomIn span, #zoomOut span {
    display: inline-block;
    /* transform: translateY(-2px); */
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-callout: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-modify: none;
    -webkit-highlight: none;
}

#gameBackButton span {
    display: inline-block;
    transform: rotate(180deg) translateY(-2px);
}

#controlsBackButton span, #controlsBackButton2 span, #settingsBackButton span {
    display: inline-block;
    transform: rotate(180deg) translateY(-2px);
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-callout: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-modify: none;
    -webkit-highlight: none;
}

.leaderboardItem {
    border: 1px solid white;
    padding: 5px
}