/* General Styles */
body {
  font-family: 'Arial', sans-serif;
  background-image: url('Space Pirates.png'); /* Add your background image here */
  background-size: cover; /* Ensure the image covers the entire background */
  background-position: center; /* Center the image */
  background-repeat: no-repeat; /* Prevent the image from repeating */
  background-color: #0b3d91; /* Fallback background color */
  color: white;
  text-align: center;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Game Container */
.game-container {
  background-color: rgba(26, 26, 26, 0.9); /* Slightly transparent dark background */
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  width: 100%;
}

/* Title */
h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #ffcc00; /* Gold color for the title */
  display: none; /* Hidden by default, shown after login */
}

/* Instructions */
p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #ccc;
}

/* Login Container */
#login-container {
  text-align: center;
  margin-bottom: 20px;
}

#login-container h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #ffcc00; /* Gold color for the title */
}

#login-container input {
  padding: 10px;
  font-size: 1rem;
  border: 2px solid #ccc;
  border-radius: 5px;
  margin-right: 10px;
  background-color: #333;
  color: white;
}

#login-container button {
  padding: 10px 20px;
  font-size: 1rem;
  background-color: #4CAF50; /* Green button */
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#login-container button:hover {
  background-color: #45a049; /* Darker green on hover */
}

/* Scoreboard Banner */
#scoreboard {
  margin-top: 20px;
  background-color: rgba(26, 26, 26, 0.9); /* Slightly transparent dark background */
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#scoreboard h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #ffcc00; /* Gold color for the title */
}

#scoreboard-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

#scoreboard-list li {
  font-size: 1rem;
  margin-bottom: 5px;
  color: #ccc;
}

/* Input Boxes */
.guess-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  display: none; /* Hidden by default, shown after login */
}

.guess-box {
  width: 60px;
  height: 60px;
  text-align: center;
  font-size: 1.2rem;
  text-transform: uppercase;
  border: 2px solid #ccc;
  border-radius: 10px;
  background-color: #333;
  color: white;
}

.guess-box:focus {
  border-color: #ffcc00; /* Gold border when focused */
  outline: none;
}

/* Submit Button */
#submit-button {
  display: block;
  margin: 0 auto; /* Center the button */
  padding: 12px 24px;
  font-size: 1.1rem;
  background-color: #4CAF50; /* Green button */
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: none; /* Hidden by default, shown after login */
}

#submit-button:hover {
  background-color: #45a049; /* Darker green on hover */
}

/* Feedback Area */
#feedback {
  margin-top: 20px;
  font-size: 1.2rem;
  font-weight: bold;
}

/* Past Guesses Container */
#past-guesses {
  margin-bottom: 20px;
}

/* Guess Row */
.guess-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* Guess Cell */
.guess-cell {
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  text-transform: uppercase;
  border: 2px solid #ccc;
  border-radius: 10px;
  background-color: #333; /* Default background */
  color: white;
}

/* Green for correct elements in the correct position */
.guess-cell.correct {
  background-color: #4CAF50;
}

/* Orange for correct elements in the wrong position */
.guess-cell.misplaced {
  background-color: #FFA500; /* Orange */
}

/* Red for incorrect elements */
.guess-cell.incorrect {
  background-color: #f44336;
}

/* Dynamic Buttons Container */
#button-container {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Dynamic Buttons */
.element-button {
  padding: 10px 15px;
  font-size: 1rem;
  background-color: #4CAF50; /* Green button */
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.element-button:hover {
  background-color: #45a049; /* Darker green on hover */
}

/* Reset Button */
#reset-button {
  margin-top: 20px;
  padding: 12px 24px;
  font-size: 1.1rem;
  background-color: #f44336; /* Red button */
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#reset-button:hover {
  background-color: #d32f2f; /* Darker red on hover */
}

/* Responsive Design */
@media (max-width: 600px) {
  .guess-box, .guess-cell {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  p {
    font-size: 1rem;
  }

  #submit-button, #reset-button {
    font-size: 1rem;
    padding: 10px 20px;
  }
}