body {
  margin: 0;
  overflow: hidden;
  font-family: 'Arial', sans-serif;
  background: linear-gradient(to top, #89f7fe, #66a6ff);
  /* Sky blue */
}

#game-container {
  position: relative;
  width: 100vw;
  height: calc(100vh);
  overflow: hidden;
}

#prompt {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 255, 255, 0.8);
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  text-align: center;
  z-index: 10;
}

/* BALLOON */
.balloon-container {
  width: 120px;
  height: 200px;
  position: absolute;
  top: -200px;
  /* Start completely above viewport */
  left: 0;
  cursor: pointer;
  will-change: transform;
  /* Optimize performance */
  animation-timing-function: linear !important;
  /* Force linear timing */
  animation-iteration-count: 1;
  /* Ensure animation only runs once */
  animation-fill-mode: forwards;
  /* Stay at end position */
}

.balloon {
  width: 120px;
  height: 140px;
  background: linear-gradient(135deg, #ff5e7d 0%, #ff2a6d 100%);
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  box-shadow: inset -10px -10px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border: #999 1px solid;
  user-select: none;
  /* padding: 10px; */
}

.balloon-image {
  width: 100px;
  height: 120px;
  object-fit: contain;
  transition: transform 0.2s;
  border-radius: 50%;
  box-shadow: 2px 2px 4px 4px rgba(255, 255, 255, 0.4);
  background: white;
  user-select: none;
}

.balloon-container:hover .balloon-image {
  transform: scale(1.1);
}

.balloon-tip {
  position: absolute;
  width: 10px;
  height: 15px;
  background: #ff2a6d;
  border-radius: 0 0 10px 10px;
  top: 135px;
  left: 55px;
  /* animation: float 3s ease-in-out infinite; */
}

.balloon-string {
  position: absolute;
  width: 2px;
  height: 100px;
  background: #888;
  top: 149px;
  left: 58px;
  transform-origin: top;
  animation: swing 3s ease-in-out infinite;
  z-index: -1;
  opacity: .3;
}


@keyframes fall {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(calc(100vh + 200px));
    /* Move past the viewport */
  }
}

.shake {
  animation: shake 0.5s linear;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes swing {

  0%,
  100% {
    transform: rotate(-5deg) translateY(0);
  }

  50% {
    transform: rotate(5deg) translateY(-10px);
  }
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-10px);
  }

  50% {
    transform: translateX(10px);
  }

  75% {
    transform: translateX(-10px);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes pop {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

@keyframes pop {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.balloon.popping {
  animation: pop 0.3s ease-out forwards;
}

.balloon.shaking {
  animation: shake 0.4s ease-in-out;
}




/* GAME SCORE */
.game-stats {
  width: calc(100vw - 40px);
  position: fixed;
  top: 20px;
  left: 20px;
  border-radius: 10px;
  font-family: Arial, sans-serif;
  font-size: 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

#score-display {
  color: #2ecc71;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.8);
  padding: 10px 20px;
}

#timer-display {
  color: #e74c3c;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.8);
  padding: 10px 20px;
}

/* End game */
@keyframes pulse {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.7;
  }
}

.game-over {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 2rem;
  z-index: 1000;
}

.game-over button {
  padding: 10px 20px;
  font-size: 1.2rem;
  background: #2ecc71;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
}

.game-over button:hover {
  background: #27ae60;
}