:root{
    --background : linear-gradient(to left, #0f0c29, #302b63, #24243e);
    --colorMain : #e5e5e5;
    --colorSecondary : #bdbdbd;
    --font : 'Noto Sans', sans-serif;
}

@font-face {
    font-family: 'Pixel';
    src: url(../fonts/Pixel.ttf);
}

body{
    box-sizing: border-box;
    margin: 0;
    background : var(--background);
    font-family: var(--font);
}

*{
    user-select: none;
}

.containerHome{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    color: var(--colorMain);
    gap: 3vh;
}

.titleMain{
    font-family: 'Pixel';
    position: absolute;
    text-align: center;
    top: 10vh;
}

.title2{
    font-weight: 400;
    font-size: 1.2rem;
    color: var(--colorSecondary);
    font-family: var(--font);
}

.subtitle{
    color: var(--colorSecondary);
    font-weight: 400;
    font-size: 1rem;
}

.cardLevel{
    display: flex;
}

.cardLevel > li {
    background-color: rgba(0, 0, 0, .1);
    margin: 0 2vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: solid 1px #6F78A870;
    width: 10vw;
    height: 10vw;
    list-style: none;
    text-align: center;
    gap: 4vh;
    border-radius: 5px;
    box-shadow: 2px 2px 15px rgba(0, 0, 0, .2);
    transition: ease .2s;
    cursor: pointer;
}

.cardLevel li:hover{
    transform:scale(1.02);
}

.cardLevel img{
    width: 50px;
    height: 50px;
    opacity: 0.7;
}

.cardLevel a{
    text-decoration: none;
    color: var(--colorSecondary);
}


/*container game*/
.back{
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all .2s;
}

.back:hover{
    transform: scale(1.3);
}

.screenGameEasy{
    display: none;
    color: var(--colorSecondary);
}


.boardContainer{
    position: absolute;
    display: grid;
    gap: 1vw;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


.win{
    font-size: 1.5rem;
    display: none;
    position: absolute;
    align-content: center;
    justify-content: center;
    top: 50%;
    left: 50%;
    width: 20%;
    height: 20%;
    background-color: rgba(0, 0, 0, .1);
    border: 1px solid #6f78a870;
    transform: translate(-50%, -50%);
    border-radius: 50px 50px 50px 0;
}

.win.winner{
    display: grid;
}

.winText{
    user-select: none;
}

.stats{
    width: 100%;
    justify-content: space-around;
    padding-top: .5%;
    display: flex;
    align-items: center;
    user-select: none;
}

.card{
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all .2s;
    cursor: pointer;
}

.card:hover{
    transform: scale(1.02) translate(-48%, -48%);
}


.cardFront,
.cardBack {
    position: absolute;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: #282A3A;
    transition: transform .6s cubic-bezier(0.4, 0.0, 0.2, 1);
    backface-visibility: hidden;
    user-select: none;
}

.cardBack{
    background-color: rgba(0, 0, 0, .2);
    border: 1px solid #6f78a870;
    transform: rotateY(180deg) rotateZ(50deg);
}

.card.flipped.matched{
    animation: correct 1s ease;
}

@keyframes correct {
    0% {
        background-color: rgba(0, 0, 0, .2);
    }
    50% {
        background-color: rgb(255, 255, 255);
    }
    100% {
        background-color: rgba(0, 0, 0, .2);
    }
}

.cardFront{
    border: 1px solid #6F78A870;
    background-color: rgba(256, 256, 256, .3);
}

.cardFront img{
    pointer-events: none;
}

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

.card.flipped .cardBack {
    transform: rotateY(0deg) rotateZ(0);
}

.pairs, .timer, .moves{
    padding: 5px;
    background-color: rgba(0, 0, 0, .1);
    text-align: center;
    width: 15vw;
    border-bottom: 1px solid #6F78A870;
    border-radius: 10px;
}

.cardLevel img{
    animation: images 3s ease 0s infinite normal both;
}

.emoji{
    font-size: 3rem;
}





@media screen and (max-width: 1100px) {
    .cardLevel li{
        width: 15vw;
        height: 15vh;
    }
}


@media screen and (max-width: 720px) {

    .cardLevel{
        flex-direction: column;
        padding: 0;
        justify-content: space-between;
        height: 60%;
    }

    .cardLevel li{
        width: 50vw;
        height: 14vh;
        flex-direction: row;
    }

    .cardFront > img{
        width: 30px;
        height: 30spx;
    }

    .titleMain{
        font-size: 1.4rem;
        top: 1vh;
        margin: 0;
    }

    .title2{
        font-size: 1rem;
    }

    .boardContainer{
        gap: 3vw;
    }

    .win{
        width: 60%;
        height: 20%;
    }

    .back{
        margin-top: 3%;
    }

    .card:hover{
        transform: scale(1) translate(-50%, -50%);
        animation: touch .7s ease;
        animation-iteration-count: 1s;
    }

    .winText{
        font-size: 1.2rem;
    }


    .pairs{
        position: absolute;
        bottom: 4vh;
    }

    
    .pairs, .timer, .moves{
        width: auto;
        padding: 3px 15px;
    }

    .emoji{
        font-size: 2.5rem;
    }

}




@keyframes touch
{
    0%{
        transform: scale(1) translate(-50%, -50%);
    }
    50%{
        transform: scale(1.2) translate(-45%, -45%);
    }
    100%{
        transform: scale(1) translate(-50%, -50%);
    }
}

@keyframes images{
	0% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.1);
	}

	100% {
		transform: scale(1);
	}
}