@import url('https://fonts.googleapis.com/css2?family=Inspiration&display=swap');

body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-color: #FEF9EF;
}

header {
  text-align: center;
  margin: 0 0 30px;
}

#button-group {
  display: flex;
  justify-content: center;
}

button {
  color: white;
  padding: 12px 20px;
  font-size: 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#start-button {
  background-color: #17C3B2;
}

#reset-button {
  background-color: #FE6D73;
}

#start-button:hover,
#reset-button:hover {
  background-color: black;
}

#game-board {
  padding: 0 12px 60px;
  width: calc(100vw - 24px);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  perspective: 1000px;
}

.game-card {
  height: calc((100vw - 24px - 24px) / 3);
  width: calc((100vw - 24px - 24px) / 3);
  position: relative;
  border-radius: 6px;
  transform: scale(1);
  transform-style: preserve-3d;
  transition: transform 0.8s;
  /* filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1)); */
}

.game-card:active {
  transform: scale(0.97);
  transition: transform 0.3s;
}

.game-card.flipped {
  transform: rotateY(180deg);
}

.card-front,
.card-back,
.confirmation {
  position: absolute;
  border-radius: 6px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-front {
  height: 100%;
  width: 100%;
  display: flex;
  font-family: 'Inspiration', cursive;
  font-size: 30px;
  font-weight: 700;
  justify-content: center;
  align-items: center;
  background-color: #227C9D;
  color: #FEF9EF;
}

.card-back {
  transform: rotateY(180deg);
  object-fit: cover;
  height: calc((100vw - 24px - 24px) / 3);
  width: calc((100vw - 24px - 24px) / 3);
}

.confirmation {
  top: 5px;
  left: 5px;
  border-radius: 50%;
  transform: rotateY(180deg);
  height: 10%;
  width: 10%;
  display: none;
  color: #1d1d1d;
  background-color: #FFCB77;
}

.game-card.matched .confirmation {
  display: flex;
  justify-content: center;
  align-items: center;
}

.confirmation > svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (min-width: 500px) {
  .card-front {
    font-size: 35px;
  }
}

@media (min-width: 640px) {
  .game-card,
  .card-back {
    height: calc((100vw - 24px - 36px) / 4);
    width: calc((100vw - 24px - 36px) / 4);
  }
}

@media (min-width: 768px) {
}

@media (min-width: 1024px) {
  .game-card,
  .card-back {
    height: calc((100vw - 24px - 60px) / 6);
    width: calc((100vw - 24px - 60px) / 6);
  }
}

@media (min-width: 1280px) {
}

@media (min-width: 1536px) {
}
