@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}
body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #6563ff;
}

canvas {
    display: none;
    position: relative;
    z-index: -1;
}

.wrapper {
    height: 500px;
    width: 500px;
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 10px;
    position: absolute;
}

#scoreTable {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cards,
.card,
.view {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cards {
    width: 100%;
    height: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
}

.cards .card {
    cursor: pointer;
    position: relative;
    perspective: 800px;
    transform-style: preserve-3d;
    height: calc(100% / 4 - 20px);
    width: calc(100% / 4 - 10px);
}

.card.shake {
    animation: shake 0.35s ease-in-out;
}
@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-13px);
    }
    40% {
        transform: translateX(13px);
    }
    60% {
        transform: translateX(-8px);
    }
    80% {
        transform: translateX(8px);
    }
}

.cards .card .view {
    width: 100%;
    height: 100%;
    user-select: none;
    pointer-events: none;
    position: absolute;
    background-color: #fff;
    backface-visibility: hidden;
    transition: transform 0.25s linear;
    border-radius: 7px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.card .front-view img {
    max-width: 50px;
}

.card .back-view img {
    max-width: 50px;
}

.card .back-view {
    transform: rotateY(-180deg);
}

.card.flip .back-view {
    transform: rotateY(0);
}

.card.flip .front-view {
    transform: rotateY(180deg);
}

.buttons {
    display: flex;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 20px;
    align-items: center;
    justify-content: space-between;
}

.buttons button {
    width: auto;
    height: 30px;
    background: #6563ff;
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: 7px;
    font-size: 15px;
    padding: 0px 25px;
    text-transform: uppercase;
    cursor: pointer;
}
#playAgain {
    margin-left: 5px;
}
