html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background-color: #ffff;
}

/* Shared full-screen background */
.fullscreen-bg {
  height: 100vh;
  width: 100vw;
  background-image: url('../images/menu-bg.webp');
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Game board container */
#board {
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

#selection-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  padding-top: 10px;
  box-sizing: border-box;
}

/* All falling or movable game elements */
#player,
.obstacle,
.collectible {
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 10;
  box-sizing: border-box;
}

/* Main sign board for menu/gameover */
#sign-board {
  background-image: url('../images/sign-board.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 100vw;
  max-width: 1000px;
  min-width: 800px;
  height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;
}

/* Titles */
#sign-board h1,
#sign-board h2 {
  font-size: 3.5vh;
  margin-bottom: 0.5vh;
  color: #fff;
  font-family: "Ranchers", sans-serif;
  font-weight: 50;
  letter-spacing: 6px;
  text-shadow: 1px 1px #333;
}

/* Paragraph text */
#sign-board p {
  font-size: 2.2vh;
  color: #333;
  margin: 0.5vh 0;
}

/* Buttons and links inside sign-board */
#sign-board button,
#sign-board a {
  font-family: "Ranchers", sans-serif;
  font-weight: 50;
  letter-spacing: 6px;
  font-size: 2.9vh;
  padding: 1vh 2vw;
  margin: 0;
  background-color: #FFD369;
  color: #222;
  border: none;
  border-radius: 1vh;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  text-decoration: none;
}

#sign-board button:hover,
#sign-board a:hover {
  background-color: #E8B64C;
  transform: scale(1.05);
}

#sign-board button:disabled {
  background-color: #95a5a6;
  color: #666;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

#sign-board button:disabled:hover {
  background-color: #95a5a6;
  transform: none;
}

#sign-board a {
  display: inline-block;
  margin: 2vh;
  font-family: "Ranchers", sans-serif;
  font-weight: 50;
  letter-spacing: 6px;
}

/* Final score display */
#final-score {
  color: #fff;
  font-weight: 50;
  font-size: 3vh;
  padding: 1vh 2vw;
  border-radius: 1vh;
  font-family: "Ranchers", sans-serif;
  font-weight: bold;
  letter-spacing: 2px;
  margin: 2vh 0;
  white-space: nowrap;
}

#score-value {
  color: #E74C3C;
  font-weight: bold;
}

/* In-game UI */
#game-screen {
  text-align: center;
}

.game-ui-container {
  position: absolute;
  top: 2vh;
  left: 2vw;
  display: flex;
  gap: 20px;
  z-index: 1000;
}

#score,
#lives {
  font-size: 3vh;
  color: #222;
  background-color: #FFD369;
  padding: 1vh 2vw;
  border-radius: 1vh;
  font-family: "Ranchers", sans-serif;
  font-weight: bold;
  letter-spacing: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}


.game-controls-container {
  position: absolute;
  top: 2vh;
  right: 2vw;
  display: flex;
  gap: 8px;
  z-index: 1000;
}

#exit-btn,
#pause-btn,
#mute-btn {
  border: none;
  padding: 0;
  transition: all 0.3s ease;
  background: transparent;
}

#exit-btn:hover {
  transform: scale(1.05);
}

#pause-btn:hover {
  transform: scale(1.05);
}

#mute-btn:hover {
  transform: scale(1.05);
}

.control-icon {
  width: 40px;
  height: 40px;
  transition: all 0.3s ease;
}

/* Player icon selection */
.player-icons {
  display: flex;
  gap: 7vw;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 0px;
  padding: 0
}

#selected-player {
  visibility: hidden;
}

.player-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vh;
  cursor: pointer;
}

.player-name {
  font-size: 2vh;
  color: #fff;
  font-family: "Ranchers", sans-serif;
  font-weight: bold;
  letter-spacing: 2px;
  text-shadow: 1px 1px #333;
}

.player-icon {
  width: 90px;
  height: 130px;
  cursor: pointer;
  border: 3px solid transparent;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.player-icon:hover {
  transform: scale(1.1);
}

.player-icon.selected {
  border-color: gold;
  border-radius: 8px;
  box-shadow: 0 0 10px gold;
}

#game-title {
  font-family: "Freckle Face", system-ui;
  font-weight: 400;
  font-style: normal;
  text-align: center;
  font-size: 12vh;
  color: #ffff;
  text-shadow: 4px 4px 9px rgba(0, 0, 0, 0.3);
  letter-spacing: 5px;
  padding-top: 40px;
  margin: 0;
  animation: pulse 2s infinite;
}



/* Information Screen Styles */
#info-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
}

#info-board {
  width: 100vw;
  max-width: 1200px;
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 60px;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;
}

#info-title {
  font-size: 4vh;
  margin-bottom: vh;
  color: #fff;
  font-family: "Ranchers", sans-serif;
  font-weight: 50;
  letter-spacing: 6px;
  text-shadow: 1px 1px #fff;
}

.compact-info {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 2vh;
  padding: 4vh 5vw;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  gap: 1.5vh;
}

.player-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2vw;
  margin-bottom: 2vh;
  padding-bottom: 2vh;
  border-bottom: 2px solid #333333;
  width: 350px;
  box-sizing: border-box;
}

.info-player-icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

#info-player-name {
  font-size: 2.5vh;
  color: #333;
  font-family: "Ranchers", sans-serif;
  font-weight: bold;
  letter-spacing: 2px;
}

.collectibles-info {
  display: flex;
  flex-direction: column;
  gap: 2vh;
  align-items: center;
  justify-content: center;
  margin-bottom: 2vh;
}

.collectible-item {
  display: flex;
  align-items: center;
  gap: 1.5vw;
  padding: 1.5vh 2.5vw;
  border-radius: 1vh;
  width: 350px;
  justify-content: center;
  box-sizing: border-box;
}

.collectible-item.good {
  background-color: rgba(52, 152, 219, 0.1);
  border: 2px solid #333333;
}

.collectible-item.bad {
  background-color: rgba(231, 76, 60, 0.1);
  border: 2px solid #333333;
}

.collectible-item.life {
  background-color: rgba(46, 204, 113, 0.1);
  border: 2px solid #333333;
}

.collectible-icon {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.collectible-item span {
  font-size: 1.8vh;
  color: #333;
  font-family: Arial, sans-serif;
  font-weight: bold;
}

.bonus {
  color: #4CAF50 !important;
  font-weight: bold;
}

.penalty {
  color: #F44336 !important;
  font-weight: bold;
}

.controls-info {
  display: flex;
  flex-direction: row;
  gap: 4vw;
  align-items: center;
  justify-content: center;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 1.5vw;
  padding: 1.5vh 2.5vw;
  background-color: rgba(255, 211, 105, 0.3);
  border-radius: 1vh;
  min-width: 140px;
}

.key {
  background-color: #333;
  color: #fff;
  padding: 0.5vh 1vw;
  border-radius: 0.5vh;
  font-family: monospace;
  font-weight: bold;
  font-size: 1.4vh;
  min-width: 50px;
  text-align: center;
}

.control-item span:last-child {
  font-size: 1.8vh;
  color: #333;
  font-family: Arial, sans-serif;
  font-weight: bold;
}

.info-buttons {
  display: flex;
  flex-direction: row;
  gap: 3vw;
  margin-top: 2vh;
  z-index: 1000;
  position: relative;
  justify-content: center;
  align-items: center;
}

.info-buttons button {
  font-family: "Ranchers", sans-serif;
  font-weight: 10;
  letter-spacing: 6px;
  font-size: 2.5vh;
  padding: 1.5vh 4vw;
  background-color: #FFD369;
  color: #222;
  border: 3px solid #E8B64C;
  border-radius: 1vh;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  position: relative;
}

.info-buttons button:hover {
  background-color: #E8B64C;
  transform: scale(1.05);
}

#back-btn {
  background-color: #333333;
  border-color: #222222;
  color: #ffffff;
}

#back-btn:hover {
  background-color: #222222;
  border-color: #111111;
  color: #ffffff;
}

#start-btn {
  background-color: #FFD369;
  border-color: #E8B64C;
  color: #222;
  border: 3px solid #E8B64C;
  border-radius: 1vh;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  position: relative;
  margin-top: -5vh;
  font-family: "Ranchers", sans-serif;
  font-weight: 10;
  letter-spacing: 6px;
  font-size: 2.5vh;
  padding: 1.5vh 4vw;
}

#start-btn:hover {
  background-color: #E8B64C;
  transform: scale(1.05);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  #info-board {
    padding: 20px 30px;
    min-height: 90vh;
  }

  .collectibles-info {
    flex-direction: column;
    gap: 1vh;
  }

  .controls-info {
    flex-direction: column;
    gap: 1vh;
  }

  .collectible-item {
    width: 95%;
    min-width: auto;
  }

  .control-item {
    width: 95%;
    min-width: auto;
  }

  .info-buttons {
    flex-direction: row;
    gap: 3vw;
  }

  .info-buttons button {
    padding: 2vh 6vw;
  }
}