body {
  margin: 0;
  padding: 0;
  font-family: 'Baloo 2', cursive;
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 700px;
  padding: 20px;
  text-align: center;
}

h1 {
  color: #ff6f61;
  margin-bottom: 10px;
  font-size: 2.5rem;
}

p {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #555;
}

.controls {
  margin-bottom: 20px;
}

#new-game {
  background: #ff6f61;
  color: white;
  border: none;
  padding: 10px 20px;
  margin-bottom: 10px;
  border-radius: 20px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.3s;
}

#new-game:hover {
  background: #ff3b2e;
}

#game-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.card {
  background: #ffffff;
  border-radius: 20px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s;
  user-select: none;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card:hover {
  transform: scale(1.05);
}

.card.flipped {
  background: #ffecb3;
  transform: rotateY(180deg);
}

@keyframes victory-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Optimisation smartphone */
@media (max-width: 600px) {
  .container {
    padding: 10px;
  }
  h1 {
    font-size: 2rem;
  }
  p {
    font-size: 1.2rem;
  }
  #game-board {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
  }
  .card {
    font-size: 2.5rem;
    border-radius: 15px;
  }
  #new-game {
    padding: 8px 16px;
    font-size: 1rem;
  }
}
