* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100%;
    background-image: linear-gradient(rgb(15, 15, 175), black);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 30rem;
}

h1 {
    position: absolute;
    font-size: 0px;
    top: 0%;
}

h2 {
    font-size: 3rem;
    color: rgb(255, 208, 0);
    padding-top: 4rem;
    text-shadow: rgba(0, 0, 0, 0.9) 10px 15px 15px;
}

h3 {
    font-size: 4rem;
    color: rgb(238, 10, 10);
    padding: 20px;
    text-shadow: rgba(0, 0, 0, 0.9) 10px 15px 15px;
}

section {
    display: grid;
    grid-template-columns: repeat(4, 7rem);
    grid-template-rows: repeat(4, 7rem);
    background-image: linear-gradient(rgb(194, 82, 38), rgb(255, 0, 0));
    gap: 2rem;
    padding: 2rem;
    border-radius: 10px;
    perspective: 800px;
}

::-webkit-scrollbar {
    width: 0px;
}

.card {
    position: relative;
    transform-style: preserve-3d;
    transition: 2000ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: rgba(0, 0, 0, 0.9) 10px 15px 15px;
    cursor: pointer;
}

.face,
.back {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    pointer-events: none;
}

/* -webkit and -moz taken from stack overflow to allow compatibility across search engines */

.back {
    background-image: linear-gradient(rgb(15, 15, 175), black);
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;

}

.toggleCard {
    transform: rotateY(180deg);
}

@media all and (max-width: 680px) {

    section {
        grid-template-columns: repeat(4, 5rem);
        grid-template-rows: repeat(4, 5rem);
    }
}


@media all and (max-width: 600px) {

    section {
        grid-template-columns: repeat(4, 3rem);
        grid-template-rows: repeat(4, 3rem);
        padding-bottom: 40rem;
        padding: 1rem;
        gap: 1rem;
    }

    h2 {
        padding-top: 10rem;
        text-shadow: rgba(0, 0, 0, 0.9) 5px 10px 10px;
        font-size: 2rem;
    }


    h3 {
        font-size: 2rem;
        text-shadow: rgba(0, 0, 0, 0.9) 5px 5px 5px;
    }

    .card {
        box-shadow: rgba(0, 0, 0, 0.9) 10px 10px 10px;
    }
}