/* from template */

@font-face {
    font-family: font;
    src: url(../../resources/fonts/darkforest.woff2);
}

.modal {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 10%;
    overflow: hidden;

    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;

    position: absolute;
    top: 0;
    left: 0;

    background-color: black;
    color: red;
    font-family: font;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    z-index: 10000000000000000;
}

.error-modal {
    font-size: min(10vh, 4vw);
    display: none;
}


/* from horse racing */

:root {
    --card-width: 691;
    --card-height: 1056;
}

img {
    width: 100%;
    height: 100%;
    object-fit: contain;

    pointer-events: all;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.card {
    --scale: 1;
    --width: var(--card-width);
    --height: var(--card-height);
    width: var(--width);
    height: var(--height);
    
    --x-position: -1000;
    --y-position: -1000;
    position: absolute;
    top: 0;
    left: 0;
    
    --z-rotation: 0;
    --y-rotation: 180;

    --z-index: 0;
    z-index: var(--z-index);

    transform-origin: top left;
    transform:
        translateX(calc(var(--x-position) * 1px))
        translateY(calc(var(--y-position) * 1px))
        scale(var(--scale));

    pointer-events: none;
}

.card-front {
    transform:
        perspective(calc(var(--card-width) * 4 * 1px))
        rotateZ(calc(var(--z-rotation) * 1deg))
        rotateY(calc(var(--y-rotation) * 1deg));
        
    backface-visibility: hidden;
    position: absolute;
    pointer-events: none;
}

.card-back {
    transform:
        perspective(calc(var(--card-width) * 4 * 1px))
        rotateZ(calc(var(--z-rotation) * 1deg))
        rotateY(calc(var(--y-rotation) * 1deg + 180deg));

    backface-visibility: hidden;
    position: absolute;
    pointer-events: none;
}

.floating {
    transition: top 0.8s ease-in-out, left 0.8s ease-in-out, transform 0.8s ease-in-out;
}






/* ********************************************************** */

body {
    margin: 0px;
    background-color: darkgreen;
    overflow: hidden;
}

.game-container {
    width: 100%;
    height: 100%;

    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.deck-gy-container {
    min-width: 0px;
    min-height: 0px;
    overflow: hidden;

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

.deck, .gy {
    width: 40%;
    height: 60%;
    overflow: hidden;

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

.deck > img, .gy > img {
    width: auto;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.turn-counter {
    width: 10%;
    height: 60%;
    overflow: hidden;

    display: flex;
    align-items: center;
}

.turn-counter > img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.player-list-container {
    grid-row: span 2;
    overflow-y: auto;
    border-left: 2px solid rgb(151, 177, 154);
}

.hand-container {
    border-top: 2px solid rgb(151, 177, 154);
    width: 100%;
    height: 100%;

    display: grid;
    grid-template-rows: 4fr 1fr;
    grid-template-columns: repeat(6, 1fr);
}

.hand-container > .player-name {
    font-size: 32px;
}

.hand-card {
    width: 100%;
    height: 100%;

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

.hand-card > img {
    width: 100%;
    height: auto;
    object-fit: contain;

    margin-left: 10px;
    margin-right: 10px;
    pointer-events: none;
}

.player-item {
    display: grid;
    grid-template-rows: 1fr 2fr;
    grid-template-columns: repeat(6, 1fr);
}

.player-name {
    display: flex;
    align-items: center;
    justify-content: space-around;
    grid-column: span 6;

    /* font-weight: 900; */
    font-weight: bold;
    color: rgb(151, 177, 154);
}

.player-card {
    padding-left: 4px;
    padding-right: 4px;
}

.name-entry-modal {
    display: flex;
    flex-direction: column;
}

.modal input {
    color: red;
    background-color: black;
    border: 3px solid darkred;
    border-radius: 30px;
    text-align: center;
    font-size: 5vw;
    font-family: font;
}

.modal input:focus {
    border: 3px solid red;
    outline: none;
}

.player-name-label {
    /* width: 100%; */
    height: 100%;
    flex-basis: 75%;
    
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-buttons {
    height: 100%;
    flex-basis: 25%;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.player-buttons > button {
    width: 100%;
    height: 100%;
}

button {
    width: 100%;
    height: 10%;
    /* font-size: calc(9vh - 12px); */
    font-weight: bold;
    color: #fdcd44;
    border-width: 3;
    border-color: #fdcd44;
    padding: 0px;
}

#shake-button {
    background-color: #00539b;
}

#small-button {
    background-color: darkgreen;
}

#big-button {
    background-color: red;
}

.glowing-text {
    text-shadow: 0px 0px 10px yellow;
}

.glowing-card {
    box-shadow: 0px 0px 10px 10px yellow;
}
