body {
  background: #000;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  font-family: Arial, sans-serif;
  overflow: hidden;
}

.overlay {
  position: fixed;
  background: rgba(0, 0, 0, 0.9);
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.menu-box {
  background: #fff8dc;
  color: #000;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 0 20px #ffbf00;
}

button {
  background: #ffd700;
  border: none;
  padding: 10px 25px;
  margin-top: 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

.game-container {
  display: grid;
  justify-content: center;
  gap: 10px;
  perspective: 1000px;
}

.card {
  width: 80px;
  height: 80px;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  cursor: pointer;
}

.card.flip {
  transform: rotateY(180deg);
}

.front, .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
}

.front {
  background: #444;
}

.back {
  background: gold;
  transform: rotateY(180deg);
  font-size: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: black;
}

.message {
  position: fixed;
  top: 20px;
  font-size: 1.2rem;
}