* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
}

.tap-reveal-container {
  background: #fff;
  padding: 20px 30px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  text-align: center;
  max-width: 500px;
  width: 90%;
}

h1 {
  margin-bottom: 10px;
}

.stats {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: #555;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.card {
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio */
  position: relative;
  perspective: 1000px;
  cursor: pointer;
}

.card-inner {
  position: absolute;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  border-radius: 10px;
}

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

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

.card-front {
  background: #4e73df;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: #fff;
}

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

#restart-btn {
  padding: 10px 20px;
  background-color: #4e73df;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

#restart-btn:hover {
  background-color: #2e59d9;
}
