* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #cee0fc;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.game-container {
  background-color: rgba(255, 255, 255, 0.356);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 100%;
  max-width: 450px;
  margin: 20px;
}

h1 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #047dff;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  transition: transform 0.3s ;
}

.card {
  width: 90px;
  height: 90px;
  background-color: #0077ff9a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 30px;
  cursor: pointer;
  border-radius: 8px;
  transform: scale(1);
  transition: transform 0.3s ease-in-out, background-color 0.3s ease;
  perspective: 1000px; /* For better 3D effect */
}

.card.flipped {
  animation: flip 0.6s forwards;
  color: #007BFF;
  background-color: #fff;
}

@keyframes flip {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(180deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

.card .front {
  position: absolute;
  backface-visibility: hidden;
}

.card .back {
  position: absolute;
  transform: rotateY(180deg);
  backface-visibility: hidden;
}

button {
  padding: 10px 20px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 20px;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #45a049;
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

#message {
  margin-top: 20px;
  font-size: 18px;
  color: #333;
}

.reward-message {
  font-size: 20px;
  font-weight: bold;
  color: #4CAF50;
  margin-top: 20px;
}

#cardContainer {
  transform: scale(1);
}

.card-container.animate {
  animation: slideIn 0.5s ease-out forwards;
}

@keyframes slideIn {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(0);
  }
}

