@import url('https://fonts.googleapis.com/css2?family=Rubik+Burned&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cute+Font&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap');

*{
    overflow: hidden;
}

@keyframes flipCard {

    0%{
        background-color: coral;
        background-image: none;
    }

    50%{
        background-color: coral;
    }

    100%{
        transform: scaleX(-1);
    }

}

@keyframes flipCardBack {
    0%{
        background-color: rgb(40, 200, 200);
    }

    50%{
        background-color: coral;
    }
    
    100%{
        background-color: coral;
        transform: scaleX(1);
    }
}

@keyframes matched {
    0%{
        transform: scale(100%) rotateY(180deg);
    }
    50%{
        transform: scale(130%);
    }
    100%{
        transform: scale(100%);
    }
}

@keyframes load {
    0% {
        width: 0%;
    }

    40%{
        width: 40%;
    }

    90%{
        width: 100%;
        /* filter: opacity(100%); */
    }

    100%{
        width: 100%;
        /* filter: opacity(0%); */
    }
}

@keyframes fadeOut {
    0%{
        opacity: 100%;
    }
    100%{
        opacity: 0%;
    }
}

@keyframes pulse{
    0%{
        transform: scale(100%);
        text-shadow: 0px 0px none;
    }
    
    50%{
        transform: scale(120%);
        text-shadow: 10px 10px 50px yellowgreen, 10px 10px 50px lime;
    }

    100%{
        transform: scale(100%);
        text-shadow: 0px 0px none;
    }
}

body {
    margin: 0;
}

.background {
    background-color: dodgerblue;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    padding: 20px;
    width: 1000px;
    height: 800px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.card {
    width: 140px;
    height: 140px;
    background-color: coral;
    border: 5px solid white;
    border-radius: 20px;
    margin: 0px 50px;
}

.card:hover {
    transform: scale(110%);
    cursor: pointer;
}

.clickedCard{
    width: 140px;
    height: 140px;
    /* background-color: blue; */
    border: 5px solid white;
    border-radius: 20px;
    margin: 0px 50px;
    
    background-color: rgb(40, 200, 200);
    background-position: center;
    background-size: 65%;
    background-repeat: no-repeat;
    transform: rotateY(180deg);

    animation: flipCard 0.3s linear;
}

.match{
    width: 140px;
    height: 140px;
    border: 5px solid white;
    border-radius: 20px;
    margin: 0px 50px;
    
    background-color: rgb(100, 255, 100);
    background-position: center;
    background-size: 65%;
    background-repeat: no-repeat;
    transform: scaleX(1);

    animation: matched 1s linear;
}

.picture {
    width: 140px;
    height: 140px;
    background-image: url(img/frog.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 70%;
    border: 5px solid white;
    border-radius: 20px;
    margin: 0px 50px;
}

.timerDiv {
    position: fixed;
    top: 0;
    left: 0;
    width: 700px;
    height: 700px;
    border-radius: 40%;
    border: solid 5px black;
    background-color: #fff3e6;
    transform: translate(-50%, -50%);
    z-index: 1;
}

#countUp {
    position: absolute;
    bottom: 0;
    left: 0;
    margin-bottom: 150px;
    margin-left: 355px;
    font-family: "Rubik Burned";
    font-size: 100px;
    user-select: none;
}

#pauseButton{
    position: absolute;
    bottom: 0;
    left: 0;
    margin-bottom: 100px;
    margin-left: 360px;
    font-family: "Rubik Burned";
    font-size: 40px;
    user-select: none;
}

#pauseButton:hover{
    cursor: pointer;
}


#continueButton{
    position: absolute;
    bottom: 0;
    left: 0;
    margin-bottom: 45px;
    margin-left: 360px;
    font-family: "Rubik Burned";
    font-size: 40px;
    user-select: none;
}

#continueButton:hover{
    cursor: pointer;
}

#pauseDiv{
    position: absolute;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    text-align: center;
    user-select: none;

    color: #fff3e6;
    font-size: 500px;
    font-family: "Cute Font";
    font-weight: bold;

}

#cardBlur{
    filter: blur(4px);
}

#resetButton{
    position: absolute;
    bottom: 0;
    right: 0;
    margin-bottom: 10px;
    margin-right: 20px;
    font-family: "Rubik Burned";
    font-size: 50px;
    color: white;
    user-select: none;
    z-index: 7;
}

#resetButton:hover{
    cursor: pointer;
}

.loadingScreenBG{
    position: absolute;
    width: 100vw;
    height: 100vh;
    background-color: #222222;
    z-index: 8;
    /* filter: opacity(20%); */
    user-select: none;
}

#loadingTitle{
    user-select: none;
    position: absolute;
    transform: translate(-50%,-50%);
    font-size: 130px;
    font-family: "Cute Font";
    color: white;
    width: 700px;
    /* height: 200px; */
    margin: auto;
    top: 50vh;
    left: 50vw;
    text-align: center;
}

#loadingTitle img{
    width: 110px;
    height: 110px;
    /* margin-top: 100px; */
    user-select: none;
}

.loadingBar{
    background-color: #2ECC71;
    animation: load 8s both;
    animation-delay: 1s;
    height: 100%;
}

.loadingBarCont{
    transform: translate(-50%,-50%);
    position: absolute;
    top: 58vh;
    left: 50vw;
    width: 700px;
    height: 20px;
    border: 2px solid white;
    border-radius: 5px;
    margin: auto;
}

.fadeOut{
    animation: fadeOut 1s linear;
}

.youWin{
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0,0, 0.8);
    position: absolute;
    z-index: 6;
}

#youWinText{
    font-family: "Permanent Marker";
    font-size: 200px;
    text-align: center;
    transform: translate(-50%, -50%);
    margin-top: 15vh;
    color: #fff3e6;
    user-select: none;

    animation: pulse 1s infinite linear;
}

#youWinTimeDiv{
    font-family: "Permanent Marker";
    font-size: 100px;
    text-align: center;
    transform: translate(-50%, -50%);
    margin-top: 15vh;
    margin-left: 50vw;
    color: #fff3e6;
    user-select: none;
}