:root {
    --dealer-width: 612px;
    --dealer-height: 408px;
}

body {
    overflow: hidden;
    background-color: #000;
    color: #fff;
}

#popup-container {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
    width: 600px;
    height: 600px;
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    transition: filter 1s ease-out;
}

#how-to-play {
    display: none;
    z-index: 100;

    position: absolute;
    color: #bbb;
    background-color: #111;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;

    width: 40vw;
    height: 40vh;
}

#saved-stats {
    position: absolute;
    color: #aaa;
    top: 4px;
    left: 4px;
    margin: 0;
}

#player-avatar-menu {
    position: relative;
    display: none;
    flex-direction: column;
    left: calc(100% + 1rem);
    width: 150px;
    gap: 8px;
    user-select: none;
}
#player-avatar-menu > * {
    width: 100%;
    height: 25px;
    background-color: #333;
    border-radius: 6px;
    border-style: none;
    color: #fff;
    font-size: 0.8rem;
    transition: all 0.14s ease-in-out;
    user-select: none;
}

#scoreboard {
    z-index: 4;
    background-color: #0d0d0d;
    position:absolute;
    top: 36px;
    width: 100%;
    display:flex;
    flex-direction: row;
    justify-content: center;
}

.scoreboard-item {
    display:flex;
    flex-direction:column;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
}

.scoreboard-avatar {
    width: 64px;
    height: 64px;
    border-radius: 15%;
    background-size: contain;
    background-repeat: no-repeat;
}

.scoreboard-score {
    width: 100%;
    font-size: 1.5rem;
    color: #fff;
    text-align: center;
    margin-top: 4px;
}

#scores {
    position: absolute;
    top: 50%;
    left: 128px;
}

#buttons {
    align-items: flex-end;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    height: calc(100% - 12px);
}

.button {
    flex-wrap: nowrap;
    font-size: 1.2rem;
    width: 25%;
    height: 50px;
    border-color: transparent;
    border-radius: 12px;
    background-color: #111;
    border-color: #ccc;
    border-style: groove;
    transition: all 0.14s ease-in-out;
}

.button:hover {
    background-color: #222;
    cursor: pointer;
}

.hand {
    overflow: hidden;
    position: absolute;
    margin: 0;
    padding: 0;
    left: 50%;
    transform: translateX(-50%);
    top: calc(50% + (var(--dealer-height) / 2 + 20px));
    display: flex;
    transition: all 0.5s ease-in-out;
}

.card {
    background-image: url('/images/cards/6_of_hearts.webp');
    background-size: contain;
    background-repeat: no-repeat;
    width: 165px;
    height: 239px;
    transition: all 0.5s ease-in-out;
}

.hand > * {
    margin: 0;
    padding: 0;
}

#dealer {
    position: absolute;
    width: var(--dealer-width);
    height: var(--dealer-height);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: url('/images/gambler/dealer.webp');
    background-size: contain;
    background-repeat: no-repeat;
}

@media screen and (max-width: 901px) {
    #popup-container {
        transform: translate(-50%, -50%) scale(0.4);
    }

    .hand {
        transform: translateX(-50%) scale(50%);
        top: calc(50% + (var(--dealer-height) / 2 + 20px));;
    }
}