
body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
  background: url('images/Background.png');
}

#voiceButton {
  background-color: green;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 2rem;
  font-weight: bold;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 0 30px green;
  animation: blink 1s infinite;
  transition: transform 0.2s;
}

  #voiceButton:hover {
    transform: scale(1.1);
}

.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: fit;
  z-index: -1;
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.scoreboard {
  font-size: 30px;
  color: #fff;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  border-radius: 10px;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1000px;
}

.card {
  width: 140px;
  height: 180px;
  perspective: 1000px;
  cursor: pointer;
  touch-action: manipulation;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

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

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  font-weight: bold;
}

.card-front {
  background: #555;
}

.card-back {
  background-size: cover;
  background-position: center;
  transform: rotateY(180deg);
}

.card.enlarged .card-inner {
  transform: rotateY(180deg) scale(1.5) rotate(360deg);
  transition: transform 3s ease-in-out;
}

#finalReveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#finalReveal img {
  width: 120px;
  margin: 10px;
  animation: fadeIn 1s ease-in-out;
}

.hidden {
  display: none !important;
}

#replayBtn {
  margin-top: 20px;
  padding: 10px 25px;
  font-size: 20px;
  background: linear-gradient(to right, #ff6a00, #ee0979);
  border: none;
  color: white;
  border-radius: 12px;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

canvas#fireworksCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
}

@media (max-width: 768px) {
  .card {
    width: 100px;
    height: 140px;
  }

  .scoreboard {
    font-size: 18px;
  }

  #replayBtn {
    font-size: 18px;
  }
}
