html, body {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
  overflow: hidden;
}

/* Make the background wrapper fill the entire screen */
.background-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Hide anything that overflows */
}

#gameCanvas {
  display: block;
  margin: 0 auto;
  width: 100%;
  height: 100%;
  background-color: #000;
}

#score-container, #lives-container {
  position: fixed;
  top: 20px;
  left: 20px;
  color: white;
  font-family: Arial, sans-serif;
  font-size: 20px;
  z-index: 10;
  line-height: 20px;
}

#score-container {
  margin-bottom: 10px;
}

#lives-container {
  position: fixed;
  top: 50px;  /* Adjusted to separate from the score */
  left: 20px;
  display: flex;
  align-items: center;  /* Align items vertically centered */
  color: white;
  font-family: Arial, sans-serif;
  font-size: 20px;
  z-index: 10;
  gap: 10px;  /* Adds space between the 'Lives:' label and the heart icons */
}

/* Styling the hearts (lives) */
#lives {
  display: flex;
  flex-direction: row;  /* Align heart icons in a row */
  gap: 5px;  /* Space between heart icons */
}

/* Heart icon styling */
.heart-icon {
  width: 20px;
  height: 20px;
}

.gameText {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: white;
  text-align: center;
  font-family: "Press Start 2P", system-ui;
  display: none;
}

#flapText {
  display: none;
}

#flapAgainButton {
  margin-top: 10px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #86EFBE;
  color: black;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Press Start 2P", system-ui;
}

#leaderboardButton {
  margin-top: 10px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #0E1B17;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Press Start 2P", system-ui;
}


#nameScreen {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center; /* Keeps elements horizontally centered */
  justify-content: flex-start; /* Aligns content to the top */
  color: #ffffff;
  height: 100vh; /* Ensure the container takes up the full screen height */
  padding-top: 50px; /* Optional: Add some spacing from the top */
  box-sizing: border-box; /* Ensures padding doesn't affect height */
}

#nameScreen h1 {
  font-size: 20px;
  margin-bottom: 2rem;
  color: #ffffff;
  font-family: "Press Start 2P", system-ui;
}

#nameScreen p {
  font-size: 1.2rem;
}

#playerNameInput {
  padding: 10px;
  font-size: 1rem;
  margin-bottom: 1rem;
  border: 2px solid #76c893;
  border-radius: 5px;
  text-align: center;
  background-color: #222;
  color: #fff;
}

#flapNowButton {
  background-color: #76c893; /* Jade Green */
  color: #ffffff;
  font-size: 0.8rem;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: "Press Start 2P", system-ui;
}

#flapNowButton:hover {
  background-color: #58a05e; /* Darker green */
}

@media (min-width: 460px) {
  #nameScreen {
    display: none !important;
  }
}

@media (min-width: 460px) {
  #gameCanvas {
    display: none !important;
  }
}
