body {
  font-family: system-ui, sans-serif;
  background-color: #f2f4f8;
  margin: 0;
  padding: 2rem;
  text-align: center;
}

#bottle-game {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.bottle {
  width: 60px;
  height: 200px;
  border: 2px solid #aaa;
  border-radius: 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.bottle:hover {
  border-color: #2196f3;
}

.bottle.selected {
  border: 3px solid #2196f3;
}

.liquid {
  width: 100%;
  height: 25%;
  border-radius: 11px;
  border-top: 1px solid #ddd;
  transition: background-color 0.3s ease;
}

#game-status {
  margin-top: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  min-height: 1.5em;
}
.bottle.clicked {
  transform: translateY(-8px);
  transition: transform 0.2s ease;
}

.liquid {
  transform: scaleY(0);
  transform-origin: bottom;
  animation: fillUp 0.6s ease-out forwards;
}

@keyframes fillUp {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}
.bottle.pop {
  animation: popBottle 2s ease-out;
}

@keyframes popBottle {
  0% {
    transform: scale(1) rotate(0deg);
    box-shadow: 0 0 0 transparent;
  }
  25% {
    transform: scale(1.15) rotate(-3deg);
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.7);
  }
  50% {
    transform: scale(1.2) rotate(3deg);
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.8);
  }
  75% {
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  }
  100% {
    transform: scale(1) rotate(0deg);
    box-shadow: 0 0 0 transparent;
  }
}
#undo-btn {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  display: inline-block; /* or block/flex depending on layout */
}

#undo-btn.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}


