html {
    width: 100%;
    height: 100%;
    background: linear-gradient(125deg, #ffffff,#e172ff,#5d6dff);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.game {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
}

/* large screen */
@media(min-width:586px){
    .controls {
        display: flex;
        gap: 20px;
        margin-bottom: 15px;
    }

    button {
        background: #282A3A;
        color: #fff;
        border-radius: 5px;
        padding: 10px 30px;
        border: 0;
        cursor: pointer;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        font-size: 18pt;
        font-weight: 600;
    }

    .stats {
        color: #FFF;
        font-size: 14pt;
        font-weight: 600;
    }

    .memorize{
        font-size: 28pt;
        font-weight: 700;
        margin-left: 12px;
    }

    .board {
        padding: 20px;
        display: grid;
        grid-template-columns: repeat(4, auto);
        grid-gap: 20px;
    }

    .card {
        position: relative;
        width: 100px;
        height: 100px;
        cursor: pointer;
    }

    .card-back{
        font-size: 30pt;
    }

    .win-text{
        font-size: 21pt;
        font-weight: 500;
    }

    .you-won{
        font-size: 28pt;
        font-weight: 800;
    }

}

/* small screen */
@media(max-width:586px){
    .controls {
        display: flex;
        gap: 10px;
        margin-bottom: 8px;
    }

    button {
        background: #282A3A;
        color: #fff;
        border-radius: 5px;
        padding: 5px 20px;
        border: 0;
        cursor: pointer;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        font-size: 12pt;
        font-weight: 500;
    }

    .stats {
        color: #ffffff;
        font-size: 12pt;
        font-weight: 300;
    }

    .memorize{
        font-size: 20pt;
        font-weight: 700;
        margin-left: 6px;
    }

    .board {
        padding: 10px;
        display: grid;
        grid-template-columns: repeat(4, auto);
        grid-gap: 10px;
    }

    .card {
        position: relative;
        width: 75px;
        height: 75px;
        cursor: pointer;
    }
    .card-back{
        font-size: 20pt;
    }

    .win-text{
        font-size: 17pt;
        font-weight: 450;
    }

    .you-won{
        font-size: 22pt;
        font-weight: 700;
    }
}


button:hover{
    background: #ffffffcc;
    color: #282a3ade;
}
.disabled {
    color: #757575;
}
.disabled:hover{
    background: #282A3A;
    color: #757575;
}


.board-container {
    position: relative;
}

.board,
.win {
    border-radius: 5px;
    box-shadow: 0 25px 50px rgba(67, 67, 67, 0.25);
    background: linear-gradient(125deg, #fbe1ff,#e586ff,#7e8bff);
    /* background: #ffffff56; */
    transition: transform .6s cubic-bezier(0.4, 0.0, 0.2, 1);
    backface-visibility: hidden;
}


.board-container.flipped .board {
    transform: rotateY(180deg) rotateZ(50deg);
}

.board-container.flipped .win {
    transform: rotateY(0) rotateZ(0);
}


.card-front,
.card-back {
    position: absolute;
    border-radius: 5px;
    width: 100%;
    height: 100%;
    background: #282A3A;
    transition: transform .6s cubic-bezier(0.4, 0.0, 0.2, 1);
    backface-visibility: hidden;
}

.card-back {
    transform: rotateY(180deg) rotateZ(50deg);
    user-select: none;
    justify-content: center;
    display: flex;
    align-items: center;
    background: #f6e1ff;
    border: 3px solid #000000c6;
}

.card.flipped .card-front {
    transform: rotateY(180deg) rotateZ(50deg);
}

.card.flipped .card-back {
    transform: rotateY(0) rotateZ(0);
}

.win {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    background: #FDF8E6;
    transform: rotateY(180deg) rotateZ(50deg);
}

.win-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #282A3A;
}

.highlight {
    color: #6f00fc;
    font-weight: 700;
}