body {
  font-family: Arial, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}
h1 {
  color: #333;
}
.controls {
  margin: 20px 0;
}
button {
  background-color: #4caf50;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin: 5px;
}
button:hover {
  background-color: #45a049;
}
button.toggle-player {
  background-color: #3f51b5;
}
button.toggle-player:hover {
  background-color: #303f9f;
}
button.active-player {
  background-color: #f44336;
}
button.active-player:hover {
  background-color: #d32f2f;
}
.grid-container {
  margin: 20px auto;
  max-width: 600px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 20px auto;
}
.card {
  aspect-ratio: 3/4;
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  cursor: pointer;
}
.card.flipped {
  transform: rotateY(180deg);
}
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.card-front {
  background-color: #f8f8f8;
  border: 2px solid #ddd;
  z-index: 2;
}
.card-back {
  background-color: #e9f7e9;
  border: 2px solid #4caf50;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-number {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 5px;
}
.card-value {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  margin-top: 10px;
}
.card-back .card-value {
  width: 60px;
  height: 60px;
  font-size: 24px;
}
.value-1 {
  background-color: #000000;
}
.value-2 {
  background-color: #f8b8068f;
}
.value-3 {
  background-color: #33ff57;
}
.info {
  margin-top: 20px;
  color: #666;
}
.legend {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 15px 0;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend-color {
  width: 15px;
  height: 15px;
  border-radius: 50%;
}
.player-info {
  font-size: 20px;
  font-weight: bold;
  color: #3f51b5;
  margin-bottom: 10px;
}
.hidden {
  display: none;
}
#toggleValueButton {
  margin-left: 10px;
  padding: 8px 12px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#toggleValueButton:hover {
  background-color: #e0e0e0;
}
.card-word {
  font-size: 14px;
  text-align: center;
  margin-bottom: 8px;
  font-weight: bold;
  max-height: 60px;
  overflow-y: auto;
  word-wrap: break-word;
  padding: 5px;
}

/* Ajuster la taille des cartes pour accommoder les mots plus longs */
.card {
  width: 90px;
  height: 120px;
}

/* Pour la responsivité sur les petits écrans */
@media (max-width: 600px) {
  .card {
    width: 70px;
    height: 100px;
  }
  .card-word {
    font-size: 12px;
    max-height: 50px;
  }
}
