body {
  font-family: "Press Start 2P", cursive;
  text-align: center;
  background-color: #f0f0f0;
  line-height: 1.5;
  font-size: 12px;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  flex-direction: column;
}

h1 {
  color: #333;
  width: 100%;
}

/* Conteneur du jeu */
#game-container {
  position: relative;
  width: 100vw; /* Utiliser toute la largeur de l'écran */
  height: 80vh; /* Hauteur du jeu à 80% de la hauteur de l'écran */
  max-width: 600px; /* Limite maximale de la largeur */
  max-height: 400px; /* Limite maximale de la hauteur */
  margin: 0 auto;
  background-image: url("parquet.avif");
  background-repeat: repeat;
  border: 2px solid #333;
  overflow: hidden;
}

/* Joueur (mariés) - agrandi */
#player {
  width: 120px; /* Plus grand pour les mariés */
  height: 120px;
  background-image: url("player.webp");
  background-size: cover;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

/* DJ élément - repositionné en haut à gauche */
.dj {
  width: 80px; /* Taille du DJ */
  height: 80px;
  background-image: url("dj.webp");
  background-size: cover;
  position: absolute;
  top: 20px; /* Place le DJ en haut */
  left: 20px; /* Place le DJ à gauche */
}

/* Disco ball élément - repositionné en haut à droite */
.disco_ball {
  width: 80px; /* Taille de la disco ball */
  height: 80px;
  background-image: url("disco_ball.webp");
  background-size: cover;
  position: absolute;
  top: 20px; /* Place la disco ball en haut */
  right: 20px; /* Place la disco ball à droite */
}

/* Tables */
.table {
  width: 80px; /* Plus petit pour mobile */
  height: 80px;
  background-image: url("table.webp");
  background-size: cover;
  position: absolute;
  top: 0;
}

/* Bonus */
.bonus {
  width: 50px; /* Plus petit pour mobile */
  height: 50px;
  background-image: url("bonus.webp");
  background-size: cover;
  position: absolute;
  top: -50px;
  display: none;
}

/* Écran d'accueil */
#welcome-screen {
  width: 100vw; /* Utiliser toute la largeur de l'écran */
  height: 80vh; /* Hauteur à 80% de l'écran */
  max-width: 600px;
  max-height: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image: url("welcome-screen.webp");
  background-size: cover;
  color: black;
}

#welcome-screen p {
  background-color: white;
  opacity: 0.7;
  padding: 5px 10px;
  margin-top: 130px;
}

#start-game-btn {
  padding: 10px 20px;
  font-size: 1.2rem;
  background-color: #4caf50;
  color: white;
  border: none;
  cursor: pointer;
}

#start-game-btn:hover {
  background-color: #45a049;
}

/* Contrôles mobiles sous le conteneur du jeu */
#mobile-controls {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

#mobile-controls button {
  font-size: 1.5rem;
  margin: 0 10px;
  color: white;
  border: none;
  cursor: pointer;
  width: 60px;
  height: 60px;
}

#mobile-controls button img {
  width: 100%;
  height: 100%;
}

#mobile-controls button:hover {
  background-color: #45a049;
}

/* Barre de vie */
#score-bar {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 20px;
  background-color: #ccc;
  border: 1px solid #333;
}

#score-fill {
  width: 0%;
  height: 100%;
  background-color: #4caf50;
}

/* Écran de félicitations */
#congrats-screen {
  width: 100vw;
  height: 80vh;
  max-width: 600px;
  max-height: 400px;
  margin: 0 auto;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  color: #333;
}

#congrats-screen a {
  margin-top: 20px;
  font-size: 1.2rem;
  color: #4caf50;
  text-decoration: none;
}

#congrats-screen button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 1.2rem;
  background-color: #4caf50;
  color: white;
  border: none;
  cursor: pointer;
}

#congrats-screen button:hover {
  background-color: #45a049;
}
