body {
  background-color: var(--background-color);
}

#multiplayer-button {
  /* Copy the styles from #multiplayer-button here */
  background-color: #4caf50;
  border: none;
  color: white;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s ease;
  font-family: "Press Start 2P", cursive, sans-serif; /* Add the font-family */
}

#multiplayer-button:hover {
  /* Copy the styles from #multiplayer-button:hover here */
  background-color: #45a049;
}

#snakeboard {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin-bottom: 100px; /* Create space between the snake board and controls */
  max-width: 100%; /* Ensure the canvas doesn't exceed its container's width */
  max-height: 100vh; /* Ensure the canvas doesn't exceed the viewport height */
  width: auto; /* Let the canvas scale its width based on its container */
  height: auto; /* Let the canvas scale its height based on its container */
  background-color: var(--snakeboard-background);
  border: 10px solid var(--snakeboard-border);
  box-shadow: 8px 8px 16px var(--snakeboard-shadow-dark),
    -8px -8px 16px var(--snakeboard-shadow-light);
  margin: 0 auto; /* Center the game board horizontally */
}

#score {
  font-size: 100px;
  color: #00ff00;
  text-shadow: 4px 4px 8px var(--snakeboard-shadow-dark);
  text-align: center;
  margin: 0; /* Remove default margin */
}

#high-score {
  font-size: 25px;
  color: #00ff00;
  text-shadow: 1px 1px 1px var(--snakeboard-shadow-dark);
  text-align: center;
  margin: 10px 0 0; /* Adjust the top margin */
}

#game-over {
  text-align: center;
  color: var(--snakeboard-background);
  text-shadow: 2px 2px 4px var(--snakeboard-shadow-dark);
}
#welcome-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: var(--snakeboard-background);
  font-size: 36px;
  z-index: 999;
  text-shadow: 2px 2px 4px var(--snakeboard-shadow-dark);
}
@keyframes levitate {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes glow {
  0%,
  100% {
    text-shadow: none;
  }
  50% {
    text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00;
  }
}

#welcome-text {
  font-family: "Press Start 2P", cursive, sans-serif;
  font-size: 30px; /* Adjust the font size as needed */
  color: #00ff00; /* Set the initial text color */
  animation: levitate 2s ease-in-out infinite, pulse 2s ease-in-out infinite,
    glow 2s ease-in-out infinite;
}

#start-container {
  text-align: center;
  margin-top: 20px;
}

#start-button {
  font-size: 20px;
  padding: 10px 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s;
}

#start-button:hover {
  background-color: #2980b9;
}

#play-text {
  font-size: 24px;
}
/* Add asymmetrical layout for the game over screen */
#game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.8);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 36px;
  z-index: 999;
}
#game-over-content {
  max-width: 400px;
  text-align: center;
}
#game-over h2 {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
}
#game-over p {
  font-size: 24px;
  margin-bottom: 30px;
}
#game-over button {
  font-size: 24px;
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
#game-over button:hover {
  background-color: #45a049;
}
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Rounded slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196f3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196f3;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Rounded sliders ends here */

/* Add the level selection buttons to the welcome-overlay */
#level-selection button {
  font-size: 20px;
  font-family: "Press Start 2P", cursive, sans-serif;
  padding: 8px 16px;
  margin: 4px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
#touch-controls {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 5px;
  align-items: center;
  max-width: 200px; /* Limit the width of the touch controls */
}

#touch-controls button {
  font-size: 24px;
  width: 50px;
  height: 50px;
  background-color: #eee;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s, transform 0.2s;
}

#touch-controls button:hover {
  background-color: #ddd;
}

#touch-controls button.pressed {
  transform: scale(1.1);
}

#moveLeftBtn {
  grid-column: 1;
  grid-row: 2;
}

#moveRightBtn {
  grid-column: 3;
  grid-row: 2;
}

#moveUpBtn {
  grid-column: 2;
  grid-row: 1;
}

#moveDownBtn {
  grid-column: 2;
  grid-row: 3;
}
@media (max-width: 768px) {
  #welcome-text {
    font-size: 24px; /* Adjust the font size for smaller screens */
  }

  #level-indicator {
    font-size: 18px; /* Adjust the font size for smaller screens */
  }

  #level-selection button {
    font-size: 16px; /* Adjust the font size for smaller screens */
  }

  #play-text {
    font-size: 20px; /* Adjust the font size for smaller screens */
  }

  #wall-collision-label {
    font-size: 25px; /* Adjust the font size for smaller screens */
  }
}
/* Example styling for a player indicator */
.player-indicator {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 5px;
  padding: 5px 10px;
  font-family: "Press Start 2P", sans-serif;
  font-size: 14px;
  color: #333;
}
