#butterfly-area {
  position: relative;
  height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0f7fa, #e8f5e9);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
  margin-top: 20px;
}
.butterfly-progress-container {
  position: absolute;
  top: 20px;
  width: 80%;
  height: 15px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.butterfly-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff9a9e, #ff4757);
  transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#bug-character {
  font-size: 5rem;
  cursor: pointer;
  transition: transform 0.1s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  z-index: 10;
  touch-action: none;
}
@keyframes pulseCocoon {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 5px #a55eea);
  }
  100% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px #a55eea);
  }
}

.float-heart {
  position: absolute;
  font-size: 2rem;
  color: #ff4757;
  animation: floatUp 1s ease-out forwards;
  pointer-events: none;
  z-index: 5;
}
@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) scale(1.5);
    opacity: 0;
  }
}

#butterfly-reveal {
  text-align: center;
  padding: 20px;
  animation: fadeIn 1.5s ease;
}
.glowing-butterfly {
  position: relative;
  display: inline-block;
  margin: 40px 0;
  animation: floatSlow 3s infinite ease-in-out;
  perspective: 1000px;
}
.butterfly-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #fff;
  box-shadow: 0 0 35px rgba(255, 71, 87, 0.6);
  position: relative;
  z-index: 10;
}
.wing {
  position: absolute;
  top: -10px;
  width: 150px;
  height: 200px;
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  z-index: 1;
  opacity: 0.9;
  box-shadow:
    inset -5px 0 15px rgba(255, 255, 255, 0.4),
    0 0 20px rgba(255, 117, 140, 0.5);
}
.left-wing {
  right: 50%;
  border-radius: 100% 10% 100% 50%;
  transform-origin: right center;
  animation: flapLeft 0.6s infinite alternate
    cubic-bezier(0.45, 0.05, 0.55, 0.95);
}
.right-wing {
  left: 50%;
  border-radius: 10% 100% 50% 100%;
  transform-origin: left center;
  animation: flapRight 0.6s infinite alternate
    cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

@keyframes flapLeft {
  0% {
    transform: rotateY(0deg) skewY(-5deg);
  }
  100% {
    transform: rotateY(70deg) skewY(10deg);
  }
}
@keyframes flapRight {
  0% {
    transform: rotateY(0deg) skewY(5deg);
  }
  100% {
    transform: rotateY(-70deg) skewY(-10deg);
  }
}
@keyframes floatSlow {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(2deg);
  }
}