@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Roboto:wght@300;400&display=swap');

/* RESET */
*
{
    margin: 0;
    box-sizing: border-box;
}

/* variables */
:root
{
    --light-brown: #aa997d;
    --dark-brown: #493e3c;
    --lightning-blue: #487ebd;
}

/* General Classes */
html,
body
{
    display: grid;
    place-items: center;
    color: white;
}

body
{
    min-height: 100vh;
    width: 100%;
    position: relative;
    font-family: 'Roboto', sans-serif;
    font-weight: 100;
}

div:has(dialog)
{
    position: absolute;
}

.container
{
    /* max-width: 800px; */
    max-width: min(90%, 800px);
    /* min-width: 300px; */
    width: 100%;
    padding: 1rem;
}

.text-center
{
    text-align: center;
}

.d-flex
{
    display: flex;
}

.flex-column
{
    flex-direction: column;
}

.chips .gold-text
{
    color: #aa997d;
}

.z-1
{
    z-index: 1;
}

.z-2
{
    z-index: 2;
}

.m-auto
{
    margin: auto;
}

.mx-auto
{
    margin-inline: auto;
}

/* @media (min-width: 600px)
{ */
.mx-auto-md
{
    margin-inline: auto;
}

/* } */



.mx-1
{
    margin-inline: 5rem;
}

.my-auto
{
    margin-block: auto;
}

.rounded
{
    border-radius: 1rem;
}

.opacity-0
{
    opacity: 0;
}

/* Modal styles */

dialog
{
    margin-inline: 1rem;
    max-width: 600px;
    transition: opacity ease-in 750ms;
    color: white;
    background-color: var(--dark-brown);
    padding: 1rem;
    border-radius: 1rem;
    border-color: var(--lightning-blue);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 180px;
}

dialog h2
{
    padding: 1rem;
    font-family: 'Cinzel', serif;
    font-weight: 400;
}

dialog button
{
    text-transform: uppercase;
    padding: 0.35rem;
    background-color: var(--lightning-blue);
    border: none;
    border-radius: 0.25rem;
    color: white;
    font-weight: 600;
    letter-spacing: 2px;
}

.radio-group
{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-group div
{
    padding: 0.5rem;
    border-radius: 0.25rem;
}

.radio-group div *
{
    font-weight: 100;
    margin-left: 0.5rem;
}

.radio-group div:nth-of-type(1)
{
    background-color: rgba(220, 20, 60, 0.726);
}

.radio-group div:nth-of-type(2)
{
    background-color: rgba(9, 151, 68, 0.541);
}

.radio-group div:nth-of-type(3)
{
    background-color: rgba(175, 23, 235, 0.6);
}

.radio-group div:nth-of-type(4)
{
    background-color: rgb(9, 79, 185);
}

dialog:not([open])
{
    display: none;
}

/* #starting-dialogs dialog:not([open])::backdrop
{
    background-color: transparent;
    transition: background-color ease-in 15000ms;
} */

#starting-dialogs dialog[open]::backdrop,
#end-window[open]::backdrop
{
    background-color: rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------------------------------- */
.bg-image
{
    position: absolute;
    inset: 0;
    height: 100%;
    background-image: url('./img/large-bg.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    -webkit-box-shadow: inset 0px 0px 12px 12px rgba(0, 0, 0, 0.75);
    -moz-box-shadow: inset 0px 0px 32px 18px rgba(0, 0, 0, 0.75);
    box-shadow: inset 0px 0px 32px 18px rgba(0, 0, 0, 0.75);
    z-index: 0;
    transition: filter ease-in 3s;
}

.blur
{
    filter: blur(3px);
    -webkit-filter: blur(3px);
}

.game-area-bg
{
    background-color: var(--dark-brown);
    background-image: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.75));
    border: 3px solid var(--light-brown);
}

#game-area
{
    transition: opacity ease-in-out 3s;
}

#game-table
{
    /* play around with grid sizing some more? */
    text-align: center;
    min-height: 90vh;
    display: grid;
    grid-template-rows: minmax(min-content, 1fr) minmax(min-content, 1fr);
    padding: 1rem 2.25rem;
    gap: 1rem;
}

#dealer-area,
#player-area
{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    flex-grow: 1;
}

#dealer-area .cards-area
{
    /* place-items: end; */
    place-items: center;
}

#player-area .cards-area
{
    /* place-items: start; */
    place-items: center;
}

#game-area h2
{
    font-family: 'Cinzel', serif;
    font-weight: 400;
}

#game-area h3
{
    font-family: 'Roboto', sans-serif;
    font-weight: 100;
}

#player-area .score-area
{
    display: flex;
    justify-content: center;
    gap: 2rem;
    text-align: left;
    flex-wrap: wrap-reverse;
}

#player-area .score-emblem img
{
    /* max-width: 100%; */
    max-height: 180px;
    min-height: 100px;
}



.cards-area
{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    height: 50%;
    flex-grow: 1;
}

.card
{
    position: relative;
    aspect-ratio: 500 / 726;
    height: 125px;
    transition: opacity ease-in 750ms
}

@media (min-width: 600px)
{
    .card
    {
        height: 200px;
    }
}

.card-back,
.card-front
{
    transition: rotate ease-in-out 750ms;
    border: 1px solid gray;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    backface-visibility: hidden;
    border-radius: 5px;
}

.card-back
{

    background-image: url('https://i.pinimg.com/564x/8f/38/a5/8f38a564428fd1d2b609f59dffbf8489.jpg');
    /* background-size: contain; */
    background-size: 100% 100%;
    background-blend-mode: difference;
    background-color: white;
}

.card-back img
{
    margin-left: 4%;
}

.card-front
{
    rotate: y 180deg;
    background-color: white;
    color: black;
    background-size: cover;
    background-repeat: no-repeat;
}

.card-front.khorne
{
    background-color: rgba(200, 0, 0, 0.95);
    background-blend-mode: screen;
}

.card-front.nurgle
{
    background-color: rgba(9, 151, 68, 0.541);
    background-blend-mode: screen;
}

.card-front.slaanesh
{
    background-color: rgba(175, 23, 235, 0.95);
    background-blend-mode: screen;
}

.card-front.tzeentch
{
    background-color: rgb(9, 79, 185);
    background-blend-mode: color-dodge;
}

.card img
{
    max-width: 100%;
}

.chips .amount
{
    transition: color ease-in-out 1s;
}

.flip-to-front .card-back
{
    rotate: y -180deg;
}

.flip-to-front .card-front
{
    /* rotate: y 360deg; */
    rotate: y 0deg;
}