body {
  background-image: url(../../img/expression-bg2.png);
  color: #fff;
  font-family: "Taipei Sans TC Beta", sans-serif;
  text-align: center;
  margin: 0;
  padding: 2rem;
}

h1 {
  margin-bottom: 1rem;
}

.game-container {
  max-width: 600px;
  margin: 0 auto;
}

.memory-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.memory-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-transform: rotateY(0deg);
  transform: rotateY(0deg);
  -webkit-transition: -webkit-transform 0.6s;
  transition: -webkit-transform 0.6s;
  transition: transform 0.6s;
  transition: transform 0.6s, -webkit-transform 0.6s;
  cursor: pointer;
}

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

.memory-card .front,
.memory-card .back {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-size: 2.5rem;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.memory-card .front {
  background: rgba(255, 255, 255, 0.1);
}

.memory-card .back {
  background: rgba(255, 255, 255, 0.05);
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
}

#restartBtn {
  margin-top: 2rem;
  padding: 0.6rem 1.5rem;
  background: linear-gradient(45deg, #ff00cc, #3333ff);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

#restartBtn:hover {
  opacity: 0.85;
}

.timer {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #ffeb3b;
}