:root {
    font-family: Inter, sans-serif;
    font-feature-settings: 'liga' 1, 'calt' 1;
    /* fix for Chrome */
}

@supports (font-variation-settings: normal) {
    :root {
        font-family: InterVariable, sans-serif;
    }
}

body {
    background-color: #D4CDA8;
    margin: 0;
}

.content {
    display: grid;
    height: 100vh;
    width: 100vw;
    grid-template-columns: [col-head-start] 1fr [name-end] 1fr [col-grid-start] 4fr [col-final] 1fr;
    grid-template-rows: [first-row] minmax(min-content, 5fr) [grid-row] 3fr [grid-end-row] 1fr[name-row] minmax(min-content, 10fr) [end-row];
    overflow: hidden;
}

@media (max-width: 1200px) {
    .content {
        display: grid;
        height: 100dvh;
        width: 100dvw;
        grid-template-columns: [col-head-start] 5fr [name-end] 10fr [col-grid-start] 5fr [col-final] 5fr;
        grid-template-rows: [first-row] 1fr [grid-row] 3fr [grid-end-row] 1fr[name-row] 1fr [end-row];
        overflow: clip;
    }

    .box {
        width: 100%;
        aspect-ratio: 1/1;
        grid-column: name-end / col-final;
        grid-row: grid-row / grid-end-row;
        gap: 1%;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: max-content max-content max-content;
        justify-content: center;
        vertical-align: middle;
        z-index: 1;
    }

    .box p {
        font-size: min(10dvw, 10rem);

    }


    div.turnindicator {
        grid-column: 2/4;
    }
}

@media (min-width: 1201px) {
    .content {
        display: grid;
        height: 100vh;
        width: 100vw;
        grid-template-columns: [col-head-start] 1fr [name-end] 1fr [col-grid-start] 4fr [col-final] 1fr;
        grid-template-rows: [first-row] 2fr [grid-row] 5fr [grid-end-row] 1fr[name-row] 3fr [end-row];
    }

    .box {
        width: min(150%, 35vw);
        aspect-ratio: 1/1;
        margin: 0;
        grid-column: 2 / 4;
        grid-row: grid-row / grid-end-row;
        display: grid;
        gap: 1%;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: 1fr 1fr 1fr;
        justify-content: center;
        justify-self: center;
        align-items: center;
        z-index: 1;
    }

    .box p {
        font-size: min(8vw, 8rem);
    }

    div.turnindicator {
        grid-column: 2/4;
    }
}

h1 {
    writing-mode: sideways-lr;
    font-weight: 900;
    font-size: 15rem;
    opacity: 30%;
    margin-left: 0;
    line-height: 50%;
    padding: 0;
    grid-row: end-row/grid-row;
    grid-column: col-head-start / col-grid-start;


}

a.forArrow {
    margin: 0.1rem;
    background-color: #e6e2cb;
    color: black;
    text-decoration: none;
    grid-column: col-final;
    grid-row: first-row;
    border: solid black 0.2rem;
    height: min-content;
    width: 7rem;
    justify-self: end;
    align-items: center;
    justify-content: center;
}

a.forArrow:hover {
    transition: 0.5s;
    background-color: #ccc9b9;
    font-style: oblique;

}

p.arrow {
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

a.backArrow {
    margin: 0.1rem;
    background-color: #e6e2cb;
    color: black;
    text-decoration: none;
    grid-column: col-head-start;
    grid-row: first-row;
    border: solid;
    height: min-content;
    width: 7rem;
    align-items: center;
    justify-content: center;
    align-self: start;
}

a#inactive {
    background-color: rgb(53, 53, 53);
    color: rgb(117, 117, 117);
}

a#inactive:hover {
    background-color: rgb(53, 53, 53);
    color: rgb(117, 117, 117);
    font-style: normal;
}



a.backArrow:hover {
    transition: 0.5s;
    background-color: #ccc9b9;
    font-style: oblique;
}

p.title {
    grid-column: col-head-start / col-final;
    text-wrap: nowrap;
    grid-row: name-row;
    font-weight: 200;
    font-style: italic;
    font-size: min(9vw, 5rem);
    align-self: end;
    justify-self: start;
    margin: 0;
    overflow: hidden;
}

p.info {
    text-wrap: nowrap;
    font-weight: 400;
    font-style: italic;
    font-size: min(3vw, 3rem);
    justify-self: center;
    margin: 0;

}

div.tytuł {
    display: flex;
    flex-direction: row;
    justify-content: left;
    gap: 70rem;

}

h1.tytuł {
    writing-mode: sideways-lr;
    font-weight: 900;
    font-size: min(10rem,80dvh);
    opacity: 30%;
    margin-left: 0;
    line-height: 50%;
    padding: 0;
    grid-row: end-row/grid-row;
    grid-column: col-head-start / col-grid-start;



}

p.tytuł {
    grid-column: col-head-start / col-final;
    text-wrap: nowrap;
    grid-row: name-row;
    font-weight: 200;
    font-style: italic;
    font-size: min(40vw, 5rem);
    align-self: end;
    justify-self: start;
    margin: 0;
    overflow: hidden;

}

.card {
    aspect-ratio: 1/1;
    transition: 1s ease-in-out;
    transform-style: preserve-3d;
    cursor: pointer;
    position: relative;

}

.box {
    perspective: 205rem;
}

.card__face {
    aspect-ratio: 1/1;
    height: 100%;
    width: 100%;
    backface-visibility: hidden;
}

.box div.card__face--front {

    display: grid;
    grid-template-columns: minmax(0, 15fr) minmax(0, 20fr) minmax(0, 15fr);
    grid-template-rows: minmax(0, 15fr) minmax(0, 20fr) minmax(0, 15fr);
    justify-items: center;
    align-items: center;
    height: max-content;
    width: auto;
    border: solid;
    margin: 0;
    transition: 0.5s;
    background-color: #e6e2cb;

}

.box div.card__face--front:hover {
    background-color: #8e8e8e;
}

.box div.card__face--back:hover {
    background-color: #3463af;
}

.card.is-flipped {
    transform: rotateY(180deg);
}

.card.off-screen {
    translate: 100vw;

}

.card__face--back {
    position: absolute;
    background: #447fdf;
    transform: rotateY(180deg);
    border: 0.2rem solid white;
    height: auto;
    top: 0%;
    word-wrap: break-word;
    overflow: hidden;
    
}
.card__face--back > p{
    color: #dbdbdb;
    font-size: min(2vw, 1.5rem);
    overflow: hidden;
    height:90%;
    width: 200%;
    font-weight: 900 !important;
    transform: translate(0,-30px) rotate(-20deg) scale(1.4);
    }


p.diamond {
    font-size: min(4rem, 7vw);
    color: #ef2d3d;
}

p.heart {
    font-size: min(6dvw, 3rem);
    color: #ef2d3d;
}

p.club {
    font-size: min(4rem, 6vw);
}

p.spade {
    font-size: min(4rem, 6vw);
}

.suit.top {
    grid-column: 1;
    grid-row: 1;


}

.suit.bottom {
    grid-column: 3;
    grid-row: 3;

}

.cardnum {
    grid-column: 2;
    grid-row: 2;
}







.box div.succcard {
    background-color: rgb(175, 225, 100);
}

.box div.high {
    background-color: rgb(223, 225, 100) !important;
}

.box div.opp {
    background-color: rgb(100, 192, 225) !important;
}



.box div.on {
    background-color: rgb(254, 254, 254);
}

.box div.card:hover {
    background-color: #8e8e8e;
}


.box p {
    font-family: 'Inter', 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    text-align: center;
    font-weight: 500;
    margin: 0;

}

div.turnindicator {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

div.player {
    width: min(10vw, 5rem);
    height: min(10vw, 5rem);
    aspect-ratio: 1/1;
    border-radius: 50%;
    transition: 0.75s;
    margin: 2%;
    text-align: center;
    align-content: center;
    font-size: min(8vw, 4rem);
    font-style: italic;
}

div.cpu {
    width: min(10vw, 5rem);
    height: min(10vw, 5rem);
    aspect-ratio: 1/1;
    border-radius: 50%;
    transition: 0.75s;
    margin: 2%;
    text-align: center;
    align-content: center;
    font-size: min(8vw, 4rem);
    font-style: italic;
}


div.player.on {
    background-color: rgb(239, 242, 107);
}

div.player.off {
    background-color: rgb(169, 170, 79);
}

div.cpu.on {
    background-color: rgb(114, 212, 248);
}

div.cpu.off {
    background-color: rgb(73, 138, 161);

}

p#tracker {
    font-style: italic;
    font-size: min(2vw, 2rem);
    grid-row: 2/5;
    grid-column: 4;
    margin-left: 2%;
    overflow: scroll;
}


player-info {
    font-size: min(3vw, 2.8rem);
    color: rgb(169, 170, 79);
    font-style: normal;
}

com-info {
    font-size: min(3vw, 2.8rem);
    color: rgb(73, 138, 161);
    font-style: normal;
}