@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap");

/* Styles de base pour le corps de la page */
body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  background: linear-gradient(135deg, #1e1e2f, #2d2d44);
  color: #fff;
  text-align: center;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  z-index: -1;
}

/* Styles pour le conteneur principal */
.container {
  background: rgba(0, 0, 0, 0.85);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  max-width: 800px;
  width: 90%;
}

/* Styles pour les titres */
h1 {
  font-size: 2.5em;
  color: #00e676;
  margin-bottom: 30px;
  text-shadow: 0 0 10px #00e676, 0 0 20px #00e676;
}

/* Styles pour le menu de jeu */
#game-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}

/* Styles pour les boutons */
button {
  background: #444;
  border: none;
  color: #00e676;
  padding: 0;
  font-size: 1em;
  cursor: pointer;
  transition: transform 0.3s ease;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  width: 200px; /* Taille des boutons en carré */
  height: 200px; /* Taille des boutons en carré */
}

button:hover {
  transform: scale(1.05);
}

button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: all 0.3s ease;
}

button:hover::before {
  opacity: 1;
}

button:active {
  transform: scale(0.95);
  background: #333;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Styles pour les noms des jeux */
button span {
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  color: rgb(255, 255, 255);
  font-size: 1.2em;
  font-weight: bold;
  text-shadow: 1px 1px 2px black;
}

button:hover span {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Classes spécifiques pour les boutons de jeu avec images en arrière-plan */
.tic-tac-toe {
  background-image: url("../img/tic-tac-toe.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.memory {
  background-image: url("../img/memory.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.game-2048 {
  background-image: url("../img/2048.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.pierre-feuille-ciseaux {
  background-image: url("../img/pierre-feuille-ciseaux.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.simon {
  background-image: url("../img/simon.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.doodle-jump {
  background-image: url("../img/doodle-jump.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.maze {
  background-image: url("../img/maze.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.snake {
  background-image: url("../img/snake.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.coming-soon {
  background-image: url("../img/coming-soon.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* Adaptation du menu de jeu pour les petits écrans */
@media (max-width: 900px) {
  button {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
}

@media (max-width: 600px) {
  button {
    flex: 1 1 100%;
    max-width: 100%;
  }
}
