@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');


html { 
  background: url(https://www.marouze.com/GAMES/BRICK_BREAKER/BRICK-BREAKER_bg_1920x1080-min.jpg) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}


body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
}

h1 {
  margin-top: 20px;
  font-family: 'Montserrat', sans-serif;
}

.game-container {
  position: relative;
  width: 600px;
  height: 400px;
  border: 2px solid #333;
  margin-top: 20px;
  display: none;
     background-color: rgba(0, 0, 0, 0.3);
}

.paddle {
  position: absolute;
  bottom: 10px;
  width: 100px;
  height: 10px;
  background-color: #333;
}

.ball {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: red;
}

.bricks-container {
  display: grid; /* Utilisation de CSS Grid */
  grid-template-columns: repeat(8, 60px); /* 8 colonnes de largeur fixe */
  gap: 1px; /* Espacement entre les briques réduit à 1 pixel */
  justify-content: center; /* Centrer les briques horizontalement */
}

.brick {
  width: 60px;
  height: 20px;
}

/* Couleurs de l'arc-en-ciel pour les briques */
.brick:nth-child(1) { background-color: #cd4e38; }
.brick:nth-child(2) { background-color: #f7ab12; }
.brick:nth-child(3) { background-color: #f4cc0c; }
.brick:nth-child(4) { background-color: #7dbd51; }
.brick:nth-child(5) { background-color: #30d284; }
.brick:nth-child(6) { background-color: #3ea9e2; }
.brick:nth-child(7) { background-color: #ac71c3; }

.ball {
  width: 20px;
  height: 20px;
  background-color: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: center;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 0, 0, 0.2) 80%);
}

.lives {
  text-align: center;
  margin-top: 20px; /* Ajoutez une marge pour espacer du contenu précédent */
    display: none;
      font-family: 'Montserrat', sans-serif;
}

#control-buttons{
  text-align: center;
  margin-top: 20px; /* Ajoutez une marge pour espacer du contenu précédent */
    display: none;
      font-family: 'Montserrat', sans-serif;
}

.button {
  font-family: 'Montserrat', sans-serif;
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
  border: 2px solid #4CAF50;
  background-color: white;
  color: #4CAF50;
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
  margin: 5px;
}

.button:hover {
  background-color: #4CAF50;
  color: white;
}

.button.active {
  /* Vos styles pour les boutons actifs */
  background-color: #4CAF50; /* Exemple de couleur de fond */
  color: white; /* Exemple de couleur de texte */
  /* Autres styles que vous souhaitez appliquer aux boutons actifs */
}

.overlay {
  justify-content: center;
  display: none;
  position: absolute;
  top: 50%; /* Aligner au milieu de la fenêtre */
  left: 50%; /* Aligner au milieu de la fenêtre */
  transform: translate(-50%, -50%); /* Déplacer de moitié de sa propre largeur et hauteur */
  background-color: rgba(255, 255, 255, 0.5); /* Fond blanc avec 50% d'opacité */
  z-index: 10; /* Mettre au-dessus des autres éléments */
  text-align: center;
}


.overlay > * {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
}

#winner-text {
    width:100%;
  text-align: center;
  display: none;
  font-family: 'Montserrat', sans-serif;
}

#loser{
    width:100%;
  text-align: center;
  display: none;
  font-family: 'Montserrat', sans-serif;
}

#play_again {
  display: none;
  width:100%;
  margin-top: 10px; /* Ajustez la marge pour espacer le bouton "Rejouer" */
  display: flex;
  flex-direction: column;
  align-items: center;
}

#restart-button {
  font-family: 'Montserrat', sans-serif;
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
  border: 2px solid #4CAF50;
  background-color: white;
  color: #4CAF50;
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
  margin: 5px;
}

.end-message {
  width:100%;
    align-items: center;
  display:block;
  text-align: center; 
  margin-bottom: 10px; /* Ajoutez une marge en bas */
}

#restart-button:hover {
  background-color: #4CAF50;
  color: white;
}

#restart-button.active {
  /* Vos styles pour les boutons actifs */
  background-color: #4CAF50; /* Exemple de couleur de fond */
  color: white; /* Exemple de couleur de texte */
  /* Autres styles que vous souhaitez appliquer aux boutons actifs */
}