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

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  flex-direction: column;
  position: relative;
  background-color: #db0085;
  font-family: "Poppins", sans-serif;
}

section {
  display: grid;
  grid-template-rows: repeat(4, 8rem);
  grid-template-columns: repeat(4, 8rem);
  perspective: 800px;
  grid-gap: 2rem;
}
.game {
  padding-top: 2rem;
}

h1 {
  color: #ffffff;
}

.card {
  transform-style: preserve-3d;
  transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 15px;
}

.back {
  background-color: white;
  backface-visibility: hidden;
}

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

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

.back-btn {
  display: block;
  text-align: center;
  padding: 0.6rem 1rem;
  margin: 4rem auto 0 auto;
  text-decoration: none;
  font-size: 18px;
  width: 7rem;
  background: #db0085;
  color: white;
  border: none;
  box-shadow: 0px 5px 4px rgba(0, 0, 0, 0.25);
  border-radius: 19px;
}
.back-btn a {
  text-decoration: none;
  color: white;
}

.game-header {
  height: 4rem;
  margin: 1rem 0 4rem 0;
  display: flex;
  justify-content: center;
}

.game-header img {
  display: block;
  margin: 0 auto;
}

@media (max-width: 768px) {
  section {
    grid-template-rows: repeat(4, 6rem);
    grid-template-columns: repeat(4, 6rem);
    grid-gap: 1rem;
  }

  h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  section {
    grid-template-rows: repeat(4, 4rem);
    grid-template-columns: repeat(4, 4rem);
    grid-gap: 1rem;
  }
  h1 {
    font-size: 1.5em;
  }
}
