/* General Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #e0f7fa; /* Light background for contrast */
}

header {
  background-color: #00796b; /* Teal header */
  color: white;
  padding: 20px;
  text-align: center;
}

nav#links {
  background-color: #004d40; /* Darker teal for navigation */
  padding: 10px;
  text-align: center;
}

nav#links button {
  background-color: #00695c;
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 16px;
}

nav#links button:hover {
  background-color: #00897b;
}

.section {
  display: none; /* Hide all sections initially */
  padding: 40px;
  text-align: center;
}

#main-menu {
  display: block; /* Show main menu by default */
}

#game-selection {
  display: none;
}

#game {
  display: none;
}

/* Buttons */
button#play-game-button,
button#beach-button,
button#underwater-button,
button#ok-button {
  background-color: #00695c;
  color: white;
  border: none;
  padding: 15px 30px;
  margin: 10px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 18px;
}

button#play-game-button:hover,
button#beach-button:hover,
button#underwater-button:hover,
button#ok-button:hover {
  background-color: #00897b;
}

input#turtle-name {
  padding: 10px;
  font-size: 16px;
  width: 200px;
  margin-right: 10px;
  border: 2px solid #004d40;
  border-radius: 5px;
}

div.name-container {
  margin-bottom: 20px;
}

/* Canvas */
canvas#gameCanvas {
  display: block;
  margin: 20px auto;
  background-color: #f0f0f0; /* Default background */
  border: 2px solid #004d40; /* Border to define canvas area */
  width: 90%;
  height: 60vh; /* 60% of viewport height */
}

#score-board {
  font-size: 24px;
  margin-top: 10px;
  color: #333;
}

/* Gray Overlay Styles */
#reset-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 90%; /* Match canvas width */
  height: 60vh; /* Match canvas height */
  background-color: rgba(128, 128, 128, 0.8); /* Semi-transparent gray */
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 24px;
  z-index: 10; /* Ensure it sits above the canvas */
}

/* Positioning the Game Section for Relative Positioning */
#game {
  position: relative; /* To position the overlay absolutely within it */
}

/* Responsive Design */
@media (max-width: 768px) {
  canvas#gameCanvas {
    width: 95%;
    height: 50vh;
  }

  nav#links button {
    padding: 8px 16px;
    font-size: 14px;
  }

  input#turtle-name {
    width: 180px;
  }

  button#ok-button {
    padding: 10px 20px;
    font-size: 16px;
  }

  #reset-overlay {
    width: 95%; /* Adjust to match responsive canvas */
    height: 50vh;
    font-size: 20px;
  }
}
