* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  text-align: center;
  background: linear-gradient(#eb9ab5, #f5f5f5);
}

img.sakura {
  width: 500px;
  height: auto;
  display: block;
  margin: auto;
  padding: 1% 0;
}

/* h1 {
  text-decoration: underline solid #fff4a7;
  padding: 10px;
}

h1:hover {
  scale: 1.1;
  color: #e5770f;
} */


#gameBox {
  display: grid;
  grid-template-columns: repeat(5, 150px);
  gap: 35px;
  justify-content: center;
  margin: 20px auto;
}

.card {
  width: 150px;
  height: 300px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s;
  cursor: pointer;
}

.card:hover {
  scale: 1.1;
}

.card.flip {
  transform: rotateY(180deg);
}

.card img {
  width: 100%;
  height: 100%;
  position: absolute;
  backface-visibility: hidden;
  top: 0;
  left: 0;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.card .front {
  transform: rotateY(180deg);
}

.card .back {
  transform: rotateY(0deg);
}

#resetButton {
  padding: 8px 20px;
  margin-top: 20px;
  margin-bottom: 30px;
  color: lightgoldenrodyellow;
  background: pink;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
}

button:hover {
  cursor: pointer;
  scale: 1.12;
  font-weight: bolder;
  color: white;
  background-color: #fff0a1;
}

/* RESPONSIVE QUERIES */
@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  #gameBox {
    gap: 16px;
  }

  .card {
    aspect-ratio: 2.5/4;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  .card {
    aspect-ratio: 2/3.5;
  }

  #resetButton {
    font-size: 0.9rem;
    padding: 10px 20px;
  }
}

@media (max-width: 360px) {
  #gameBox {
    grid-template-columns: repeat(2, 1fr);
  }
}