body {
  background-color: beige;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Title */
h1 {
  font-family: "Creepster", cursive;
  font-size: 56px;
  letter-spacing: 3px;
  color: #1a1a1a;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
}

/* Main content */
#main {
  text-align: center;
  padding: 20px;
}

/* Menu image */
#menu-image {
  display: block;
  margin: 24px auto 0;
  width: 640px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Game area */
#game-area:not(.hidden) {
  display: flex;
  justify-content: center;
  position: relative;
  margin-top: 10px;
}

/* Scoreboard (positionné à gauche sans affecter le centrage du jeu) */
#scoreboard {
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.score-box {
  width: 130px;
  padding: 18px 10px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#wins {
  background-color: #1a73e8;
  color: white;
}

#losses {
  background-color: crimson;
  color: white;
}

.score-label {
  display: block;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 8px;
}

.score-value {
  display: block;
  font-size: 44px;
  font-weight: bold;
}

/* Buttons */
button {
  background-color: black;
  color: beige;
  border: none;
  padding: 10px 15px;
  margin: 5px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
}

button:hover {
  background-color: crimson;
}

#back-btn {
  margin-top: 18px;
  font-size: 14px;
  background-color: #444;
}

#back-btn:hover {
  background-color: crimson;
}

.hidden {
  display: none;
}

/* Keyboard */
#keyboard {
  margin-top: 24px;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.key {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: black;
  color: beige;
  width: 48px;
  height: 48px;
  font-size: 18px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 8px;
  user-select: none;
  transition: background-color 0.15s;
}

.key:hover {
  background-color: #333;
}

.key.disabled {
  background-color: #aaa;
  cursor: not-allowed;
}

/* Responsive mobile */
@media (max-width: 640px) {
  h1 {
    font-size: 34px;
    letter-spacing: 1px;
  }

  #main {
    padding: 12px;
  }

  /* Image d'accueil : prend toute la largeur disponible */
  #menu-image {
    width: 100%;
  }

  /* Boutons de difficulté : empilés verticalement */
  #difficulty-menu button {
    display: block;
    width: 80%;
    margin: 6px auto;
  }

  /* Sur mobile : scoreboard en ligne au-dessus du jeu */
  #game-area:not(.hidden) {
    flex-direction: column;
    align-items: center;
  }

  #scoreboard {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
  }

  .score-box {
    width: 100px;
    padding: 12px 8px;
  }

  .score-value {
    font-size: 32px;
  }

  .score-label {
    font-size: 13px;
  }

  /* Clavier : touches plus petites pour tenir sur l'écran */
  .key {
    width: 30px;
    height: 38px;
    font-size: 13px;
    border-radius: 5px;
  }

  .keyboard-row {
    gap: 4px;
    margin-bottom: 5px;
  }

  #back-btn {
    width: 80%;
    font-size: 13px;
  }
}
