
body {
  font-family: "Jersey 10", serif;
  font-size: 3rem;
  text-align: center;
  background: black;
  margin: 0;
  padding: 0;
  image-rendering: pixelated;
}

.game-panel {
  width: 500px;
  margin: 0 auto; /* centers horizontally */
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 10px;
  border-radius: 8px;
}

#title-image {
  width: auto;              /* Let the image control its own width */
  max-width: 600px;         /* Absolute maximum no matter the screen */
  min-width: 200px;         /* Don’t shrink below this */
  height: auto;             /* Maintain aspect ratio */
  display: block;
  margin: 0 auto;
  padding: 20px 20px 0px 20px;
}

.top-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap; /* prevent wrapping */
  max-width: 500px;
  margin: 20px auto;
}

#startBtn {
  margin: 0;
  font-size: 2rem;
  padding: 11px 20px;
}

@media (max-width: 480px) {
  .top-panel {
    flex-direction: column;
    gap: 10px;
  }
}

/* Styling the score board */
.scoreboard {
  margin: 5px;
  font-size: 2rem;
  background-color: #ffe400; /* Green background */
  color: black; /* White text */
  border-radius: 30px; /* Rounded corners */
  padding: 10px 20px; /* Add padding around the text */
  display: grid; /* Using grid layout */
  grid-template-columns: 1fr 1fr; /* Two equal columns */
  gap: 20px; /* Space between the two columns */
  align-items: center; /* Center content vertically */
  width: 350px;
  min-width: 350px;
  min-width: 350px;
  margin-left: auto;
  margin-right: auto;  font-family: "Jersey 10", serif; /* Apply Jersey 10 font */
}

.scoreboard span {
  display: inline-block;
  font-weight: normal; /* Make the label text regular weight */
}

button {
  padding: 10px 20px;
  font-size: 3rem;
  cursor: pointer;
  background-color: #ff0000; /* Orange button */
  color: white;
  border: none;
  border-radius: 30px; /* Rounded corners for the button */
  transition: background-color 0.3s ease; /* Smooth transition for hover effect */
  font-family: "Jersey 10", serif; /* Apply Jersey 10 font */
}

button:hover {
  background-color: #e68900; /* Darker orange on hover */
}

.game {
  display: grid;
  grid-template-columns: repeat(3, 128px); /* Adjusted for each hole width */
  gap: 32px; /* Adjusted gap between holes */
  justify-content: center; /* Centering the grid */
  margin-top: 20px;
  margin-left: auto; /* Ensuring it aligns horizontally */
  margin-right: auto; /* Ensuring it aligns horizontally */
}

.timer {
  font-size: 3rem;
  margin: 10px;
}

.hole {
  position: relative;
  width: 128px;
  height: 128px;
  background: url('../images/whacky-chump-images/hole.png') no-repeat center;
  background-size: cover;
}

.mole {
  width: 128px;
  height: 128px;
  position: absolute;
  bottom: 0;
  left: 0;
  background-size: 1024px 128px; /* 8 frames wide */
}

.mole.cane {
  background-image: url('kidz-images/cane-sprite-sheet.png');
}

.mole.enzo {
  background-image: url('kidz-images/enzo-sprite-sheet.png');
}

.mole.purple {
  background-image: url('kidz-images/enzo-purple-sheet.png');
}

.mole.pumped {
  background-image: url('kidz-images/cane-pump-sheet.png');
}

.mole.gold {
  background-image: url('kidz-images/gold-sprite-sheet.png');
}

.mole.fake {
  background-image: url('kidz-images/bot-sprite-sheet.png');
}

.mole.double {
  background-image: url('../images/whacky-chump-images/chump-x2.png');
}

.mole.bomb {
  background-image: url('../images/whacky-chump-images/chump-bomb.png');
}

.mole.extraTime {
  background-image: url('../images/whacky-chump-images/chump-clock.png');
}

.mole.gameover {
  background-image: url('kidz-images/game-over.png');
}

/* Pop-up: frames 0–3 */
@keyframes molePop {
  from { background-position-x: 0; }
  to { background-position-x: -512px; }
}

/* Idle: frame 4 (static) */
.mole.idle {
  background-position-x: -512px;
}

/* Popup backdrop */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* semi-transparent background */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Popup content box */
.popup-content {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Headline */
.popup-content h2 {
  margin-bottom: 15px;
  font-size: 3rem;
  color: #333;
}

/* Final score display */
.popup-content p {
  font-size: 2rem;
  margin-bottom: 15px;
}

/* Input field */
.popup-content input[type="text"] {
  width: 90%;
  padding: 8px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* Buttons */
.popup-content button {
  padding: 8px 15px;
  margin: 5px;
  border: none;
  background-color: #ffe400;
  color: black;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.5rem;
}

.popup-content button:hover {
  background-color: #45a049;
}

/* Hidden class */
.hidden {
  display: none;
}

.score-message {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #0056ff;
  color: #ffe400;
  padding: 20px 30px;
  border-radius: 10px;
  font-size: 2rem;
  z-index: 2000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease;
}

.score-message.hidden {
  opacity: 0;
  pointer-events: none;
}

.score-message.show {
  opacity: 1;
}

/* bottom button styling */
.bottom-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px; /* space between buttons */
  margin-top: 20px;
  flex-wrap: wrap; /* allows stacking on small screens */
}

.home-button,
.leaderboard-link,
.music-toggle {
  font-family: "Jersey 10", serif;
  font-size: 1.5rem;
  padding: 10px 20px;
  border-radius: 20px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.home-button {
  background-color: #0056ff;
  color: #ffe400;
}

.home-button:hover {
  background-color: #0037a4;
  transform: scale(1.05);
}

.leaderboard-link {
  background-color: #ffe400;
  color: black;
}

.leaderboard-link:hover {
  background-color: #ffcc00;
  transform: scale(1.05);
}

.music-toggle {
  background-color: #ffe400;
  border: none;
  border-radius: 20px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-toggle:hover {
  background-color: #ffcc00;
  transform: scale(1.05);
}

.music-toggle img {
  width: 32px;
  height: 32px;
}

/* Bomb flash */
.flash {
  animation: flashRed 0.3s ease;
}

@keyframes flashRed {
  from { background-color: rgba(255, 0, 0, 0.5); }
  to { background-color: transparent; }
}

/* Double points styling */
.double-points-banner {
  position: fixed;
  top: 220px;
  left: 50%;
  transform: translateX(-15%);
  background: #ff0000;
  color: black;
  font-family: "Jersey 10", cursive;
  font-size: 1.5rem;
  padding: 10px 20px;
  border-radius: 10px;
  z-index: 9999;
  animation: fadeInOut 2s ease-out;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -20px); }
  20% { opacity: 1; transform: translate(-50%, 0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -20px); }
}


/* Hit: frames 6–7 */
@keyframes moleHit {
  from { background-position-x: -768px; }
  to { background-position-x: -1024px; }
}

@keyframes moleSink {
  from { background-position-x: -896px; } /* assuming frame 5 is the start of sink */
  to   { background-position-x: -1152px; }  /* frame 6 */
}