body {
  text-align: center;
  font-family: Arial, sans-serif;
  color: white;

  background: linear-gradient(270deg, #6a11cb, #2575fc, #00c6ff, #ff6ec4);
  background-size: 800% 800%;
  min-height: 100vh;

  animation: gradientMove 10s ease infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
h1 {
  margin-top: 20px;
}

#controls button {
  margin: 5px;
  padding: 10px 15px;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  color: white;
}

#controls button:nth-child(1) {
  background: #2ecc71;
}
#controls button:nth-child(2) {
  background: #f39c12;
}
#controls button:nth-child(3) {
  background: #e74c3c;
}

.info {
  margin: 15px;
  font-size: 18px;
}

#game-board {
  display: grid;
  grid-template-columns: repeat(4, 100px);
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.card {
  width: 100px;
  height: 100px;
  background: #2c3e50;
  border-radius: 15px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 40px;

  transition: transform 0.5s, background 0.3s;
}

.card.flipped {
  background: white;
  color: black;
  transform: rotateY(180deg);
}

.card.matched {
  background: #2ecc71;
  color: white;
}

@media (max-width: 600px) {
  #game-board {
    grid-template-columns: repeat(3, 80px);
  }

  .card {
    width: 80px;
    height: 80px;
  }
}
#controls button.active {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
  border: 2px solid white;
}


/*mettre score et timer dans un cadre*/
.info {
  margin: 15px;
  font-size: 18px;
  display: inline-block;
  padding: 10px 20px;
  border-radius: 15px;

  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}