* {

    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {

    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f1f1f1;
}

.game-container {

    background-color: darkgrey;
    padding-bottom: 1.5rem;
    margin: 1.5rem;
    padding: 1rem;
}

.grid-game-container {

    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.game-container button {

    background-color: rgb(248, 211, 0);
    border: 1px solid rgb(0, 170, 170);
    padding: 1.5rem;
    border-radius: 0.4rem;
    margin: 0.5rem;
    cursor: pointer;
    transition: 0.5s;
    font-size: 1.5rem;
    color: transparent; /* nascondo l'emojii per poi farla apparire al click*/
}

.button-click-effect{

 /* make the card rotate like it's getting flipped when clicked*/
  transition: 0.5s;
  transform: rotateY(180deg);
  background-color: white !important;
  color: black !important;

}

@keyframes jiggle {

    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(5deg);
    }

    50% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.matching-cards-animation {

    background-color: rgb(0, 170, 170) !important;
    transition: 0.5s;
    animation: jiggle 0.5s;
    color: white !important;
}

#restart {

    color: white;
    background-color: rgb(248, 211, 0);
    border: 1px solid rgb(0, 170, 170);
    padding: 1rem;
    border-radius: 0.4rem;
    text-align: center;
    width: fit-content;
    font-weight: bold;
    margin-top: 1.5rem !important;
    cursor: pointer;
    transition: 0.3s;
    margin: 0 auto;

}

#restart:hover {

    background-color: rgb(0, 170, 170);
    color: white;
    transition: 0.3s;
}

#game-result {

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 999;
    display: none;
}

#game-result h2 {

    font-size: 2rem;
    text-align: center;
    margin-top: 20%;
    color: blue;
}

#game-result a {

    color: white;
    background-color: rgb(248, 211, 0);
    border: 1px solid rgb(0, 170, 170);
    padding: 1rem;
    border-radius: 0.4rem;
    text-align: center;
    width: fit-content;
    font-weight: bold;
    margin-top: 1.5rem !important;
    cursor: pointer;
    transition: 0.3s;
    margin: 0 auto;
    text-decoration: none;
    display: block;

}

#game-result a:hover {

    background-color: rgb(0, 170, 170);
    color: white;
    transition: 0.3s;
}

#time {

    color: white;
    font-size: 1.1rem;
    text-align: center;
    font-weight: bold;
    margin-top: 1rem;
}


