* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  color: #f0f0f0;
  margin: 0;
  padding: 20px;
  background: none;
}

.game-background {
  background: url("assets/images/clinic-background.png") no-repeat center center fixed;
  background-size: cover;
}

#game-container {
  display: none;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #000000;
  padding: 20px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
  border-radius: 10px;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

h1 {
  text-align: center;
  color: #7ef9ff;
  font-family: 'Courier New', Courier, monospace;
  margin-bottom: 30px;
}

button:not(.bat-button):not(#playAgainBtn) {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  background-color: #7ef9ff;
  color: #1e1e2f;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #5ed1d1;
}

button.completed {
  background-color: #4caf50;
  color: white;
}

/* Back button style */
button.back-button {
  background-color: #333;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  border: 2px solid #7ef9ff;
  padding: 10px 15px;
  font-size: 12px;
  margin-top: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button.back-button:hover {
  background-color: #7ef9ff;
  color: #000;
}

#levelName {
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-weight: bold;
}

/* Removed: #trustPoints (deprecated) */

#homeScreen {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#homeBackground {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: fill;
  top: 0;
  left: 0;
  z-index: -1;
}

#siteDefenderImg {
  position: absolute;
  top: 60%;
  left: -500px;
  width: 60%;
  max-width: 500px;
  animation: slideInImage 1.5s ease-out forwards;
}

@keyframes slideInImage {
  0% {
    left: -500px;
    opacity: 0;
  }
  60% {
    left: 20%;
    opacity: 1;
  }
  100% {
    left: 18.5%;
  }
}

#startBtn {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  padding: 10px 20px;
  background-color: #005eff;
  color: white;
  border: 2px solid white;
  cursor: pointer;
}

.site-option {
  width: 500px;
  height: 500px;
  object-fit: fill;
  display: block;
  border: 4px solid white;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-width: none;
}

.site-option:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px #7ef9ff;
}

.site-options-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

#siteSelectScreen {
  background-color: #000000;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#victoryScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 10;
}

#playAgainBtn {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 240px;
  background: url("assets/images/bat-button.png") no-repeat center center;
  background-size: contain;
  border: none;
  cursor: pointer;
  color: #fff700;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  text-shadow: 1px 1px 2px #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: transparent;
}

.bat-button {
  all: unset;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 480px;
  height: 240px;
  background-image: url('assets/images/bat-button.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
}

.bat-button:focus {
  outline: none;
}

.bat-text,
.bat-button-text {
  font-family: 'Press Start 2P', monospace;
  color: #fff700;
  text-shadow: 2px 2px 0 black;
  font-size: 24px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.message-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #222;
  color: #fff;
  padding: 20px 30px;
  border: 3px solid #7ef9ff;
  border-radius: 10px;
  z-index: 9999;
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  box-shadow: 0 0 20px #7ef9ff;
}

.message-box button {
  margin-top: 20px;
  background-color: #7ef9ff;
  color: #000;
  border: none;
  padding: 10px 20px;
  font-family: 'Press Start 2P', monospace;
  cursor: pointer;
  border-radius: 5px;
}

/* 🏁 Leaderboard box */
#leaderboardBox {
  position: absolute;
  top: 50%;
  left: 30px;
  transform: translateY(-50%);
  width: 300px;
  background-color: rgba(0, 0, 0, 0.85);
  border: 3px solid #7ef9ff;
  border-radius: 10px;
  padding: 20px;
  color: #fff700;
  font-family: 'Press Start 2P', monospace;
  text-align: left;
  white-space: pre-wrap;
  box-shadow: 0 0 30px #7ef9ff, 0 0 60px rgba(126, 249, 255, 0.3);
  z-index: 5;
}

/* 📱 Mobile scaling */
@media (max-width: 600px) {
  #game-container {
    width: 95%;
    padding: 10px;
  }

  button:not(.bat-button):not(#playAgainBtn):not(#soundToggle) {
    font-size: 0.9rem;
    padding: 10px;
  }

  .bat-text,
  .bat-button-text {
    font-size: 16px;
  }
}

#nameEntryBox input {
  margin-top: 10px;
  padding: 10px;
  width: 90%;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  text-align: center;
  border: 2px solid #7ef9ff;
  border-radius: 5px;
  background-color: #111;
  color: #fff;
}

#soundToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;

  width: 42px !important;     /* override inherited 100% */
  height: 42px;

  background-color: #1e1e2f;
  border: 2px solid #7ef9ff;
  border-radius: 6px;

  font-size: 20px;
  color: #7ef9ff;
  font-family: 'Press Start 2P', monospace;

  display: inline-flex !important; /* override display: block */
  align-items: center;
  justify-content: center;

  cursor: pointer;
  text-shadow: 1px 1px 2px #000;
  transition: background-color 0.3s ease, transform 0.2s ease-in-out;
}

#soundToggle:hover {
  background-color: #333c55;
  transform: scale(1.05);
}