* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    display: grid;
    place-items: center;
    min-height: 100vh;
}

.heading {
    text-align: center;
    font-family: "Poppins", sans-serif;
    font-size: 2rem;
    font-weight: 500;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 2em;

}

.card {
    height: 110px;
    width: 90px;
    background-color: #ffff00;
    border: 10px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: 0.3s all ease;

}

.card:hover {
    transform: scale(1.03);
}

.card img {
    width: 80%;
    max-height: 90px;
    opacity: 0;
    transition: 0.3s all ease;
}

.card.clicked {
    background-color: brown;
}

.card.checked {
    background-color: white;
}

.card.clicked img,
.card.checked img {
    opacity: 1;
}

.card.shake {
    background-color: tomato;
    animation: shake 0.6s;
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}