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

body {
    --title-height: 10vh;
    --margin-size: 100px;
    --grid-gap: 3px;

    --max-cell-width: calc((100vw - 2 * var(--margin-size)) / 7);
    --max-cell-height: calc((100vh - 2 * var(--margin-size) - var(--title-height)) / 6);
    --cell-size: min(var(--max-cell-width), var(--max-cell-height));
    
    --border-colour: red;
    --cell-colour: black;
    --background-colour: black;
    --highlight-colour: rgb(36, 0, 0);

    --tile-border-size: 3px;
    --tile-border-colour: black;
    --tile-highlight-colour: rgb(36, 0, 0);

    --p1-colour: red;
    --p2-colour: yellow;

    background-color: var(--background-colour);
    margin: 0px;
}

.container {
    width: 100%;
    height: 100%;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.title {
    font-family: font;
    font-size: min(10vh, 10vw);
    margin-bottom: calc(var(--title-height) / 4);
    color: red;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: underline;
}

.title > .hand {
    width: min(10vh, 10vw);
    height: min(10vh, 10vw);
    padding-left: calc(min(10vh, 10vw) / 16);
}

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

    transition: transform 0.6s ease-in-out;
}

.hand.selected {
    transform: translateY(calc(-0.06 * var(--content-size)));
}

.hand > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    
    filter:
        invert(100%)
        invert(17%)
        sepia(95%)
        saturate(7461%)
        hue-rotate(360deg)
        brightness(101%)
        contrast(105%);

    /* user-drag: none; */
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.board {
    width: calc(var(--cell-size) * 7);
    height: calc(var(--cell-size) * 6);
    background-color: var(--border-colour);
    border: var(--grid-gap) solid var(--border-colour);

    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-gap: var(--grid-gap);
}

.column {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    grid-gap: var(--grid-gap);
}

.cell {
    background-color: var(--cell-colour);
}

.column:hover > .cell {
    background-color: var(--highlight-colour);
}

.p1tile, .p2tile {
    width: calc(var(--cell-size) - 3 * var(--grid-gap));
    height: calc(var(--cell-size) - 3 * var(--grid-gap));

    border-radius: 50%;
    border: var(--tile-border-size) solid var(--tile-border-colour);
}

.p1tile {
    background-color: var(--p1-colour);
}

.p2tile {
    background-color: var(--p2-colour);
}

.column:hover .p1tile, .column:hover .p2tile {
    border: var(--tile-border-size) solid var(--tile-highlight-colour);
}


/* ############################################################ */
/* # sliders ################################################## */

/* https://www.w3schools.com/howto/howto_js_rangeslider.asp */

/* The slider itself */
.slider {
    -webkit-appearance: none;  /* Override default CSS styles */
    appearance: none;
    width: 100%;
    height: 100%; /* Specified height */
    background: black;
    /* outline: 1px solid red; */
    /* opacity: 0.7; */
    /*-webkit-transition: .2s; */
    /* transition: opacity .2s; */
    border-radius: 25px;

    flex: 0;
    /* flex-basis: 10px; */
    width: calc(var(--cell-size) * 7);
    height: 100px;
    margin-top: 40px;

    border: 2px solid red;
    outline: none;
}

/* The slider handle (use -webkit- (Chrome, Opera, Safari, Edge) and -moz- (Firefox) to override default look) */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none; /* Override default look */
    appearance: none;
    width: 25px; /* Set a specific slider handle width */
    height: 25px; /* Slider handle height */
    background: red; /* Green background */
    cursor: pointer; /* Cursor on hover */
    border-radius: 50%;
}

.slider::-moz-range-thumb {
    width: 25px; /* Set a specific slider handle width */
    height: 25px; /* Slider handle height */
    background: red; /* Green background */
    cursor: pointer; /* Cursor on hover */
    border: 1px solid red
}


/* ############################################################ */
/* # modals ################################################### */

.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: rgba(0, 0, 0, 0.8);
    color: red;
    font-family: font;

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

    font-size: min(80vh, 32vw);
    display: none;

    opacity: 0;
    transition: opacity 2s;
}

#gg-bottom {
    font-size: min(20vh, 8vw);
}