/* --------------------------------------------------
   GLOBAL LAYOUT
-------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: Trebuchet MS, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --------------------------------------------------
   GAME WRAPPER
-------------------------------------------------- */
#game-wrapper {
  width: 90%;
  max-width: 1920px;
  margin: 24px auto;
  display: flex;
  justify-content: center;
}

/* --------------------------------------------------
   MAIN GAME AREA
-------------------------------------------------- */

#game {
  position: absolute;        /* critical */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;              /* critical */
  max-width: none;           /* prevents shrinking */
  aspect-ratio: unset;       /* iframe handles ratio */
  background: url("images/bg.png") center/cover no-repeat;
  border-radius: 12px;
  overflow: hidden;
}

/* --------------------------------------------------
   LOGO
-------------------------------------------------- */
#game-logo {
  position: absolute;
  top: 4%;
  left: 7%;
  width: 20%;
  z-index: 6000;
  pointer-events: none;
}

/* --------------------------------------------------
   BUNNY + SHADOW
-------------------------------------------------- */
#bunny {
  position: absolute;
  pointer-events: none;
}

#shadow {
  position: absolute;
  width: 5%;
  height: 2%;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 50%;
  filter: blur(0.6px);
  pointer-events: none;
}

/* --------------------------------------------------
   EGGS
-------------------------------------------------- */
.egg {
  position: absolute;
  width: 2%;
  transition: opacity 0.3s ease;
}

/* --------------------------------------------------
   SCOREBOARD (CSS-DRAWN, SCALED AS A UNIT)
-------------------------------------------------- */
#scoreboard {
  position: absolute;
  bottom: 4%;
  left: 5%;
  z-index: 6000;
  padding: 0;
  width: auto;
  height: auto;
}

/* Native scoreboard size: 600x143 */
#scoreboard-inner {
  width: 420px;
  height: 100px;

  background: rgba(255, 255, 255, 0.9); /* 90% opacity */
  border: 6px solid #03772c;
  border-radius: 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;

  padding: 0 24px;

  font-family: "Luckiest Guy", cursive;
  color: #03772c;
  filter: drop-shadow(0px 4px 6px #003c10);

  transform-origin: bottom left;
}

#score-text {
  font-size: 32px;
  white-space: nowrap;
}

#egg-checklist {
  display: flex;
  gap: 12px;
}

.egg-check {
  width: 32px;
  opacity: 0.3;
  transition: opacity 0.3s ease, transform 0.25s ease;
}

.egg-pop {
  transform: scale(1.7);
}

/* --------------------------------------------------
   CELEBRATION VIDEO + PLAY AGAIN BUTTON
-------------------------------------------------- */
#celebration-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
  z-index: 9998;
}

#play-again {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translateX(-50%);
  background: #ffdd77;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 22px;
  font-weight: bold;
  border: 3px solid #b88a00;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 9999;
}

/* --------------------------------------------------
   FOREGROUND OBJECTS
-------------------------------------------------- */
.foreground {
  position: absolute;
  pointer-events: none;
}

/* --------------------------------------------------
   DEBUG OVERLAY
-------------------------------------------------- */
#debug {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.debug-box {
  position: absolute;
  border: 2px dashed red;
  background: rgba(255, 0, 0, 0.15);
}

.debug-line {
  position: absolute;
  height: 0;
  border-top: 2px dashed deepskyblue;
}
