body {
  font-family: Arial;
  background-color: #f0f8ff;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.go-back {
  position: absolute;
  top: 20px;
  right: 20px;
  border-radius: 5px;
  font-size: 18px;
  padding: 5px 10px;
  font-size: 16px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.grid {
  display: grid;
  grid-template-columns: repeat(8, 150px);
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.card {
  width: 150px;
  height: 150px;
  perspective: 1000px;
  cursor: pointer;
}

.inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  /* border: 2px solid #ccc; */
  border-radius: 8px;
}

.card.flipped .inner {
  transform: rotateY(180deg);
}

.front,
.back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #333;
}

.back img {
  width: 150px;
  height: 150px;
  object-fit: contain;
}

.front {
  background-color: white;
  transform: rotateY(180deg);
}

.back {
  background-color: #3498db;
  color: white;
}

.front img {
  max-width: 90%;
  max-height: 90%;
}

#restart-btn {
  padding: 10px 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  margin: 20px auto;
  display: block;
}

#restart-btn:hover {
  background-color: #2980b9;
}