#screen-evolution {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 200;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#screen-evolution.active-screen {
  display: flex;
}

.fusion-title {
  font-size: 3rem;
  color: #fff;
  text-shadow: 0 0 20px var(--accent-color);
  margin-bottom: 50px;
  animation: pulseText 1s infinite alternate;
}

.fusion-stage {
  position: relative;
  width: 300px;
  height: 300px;
}

.sacrificial-pet {
  position: absolute;
  width: 80px;
  height: 80px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-color);
  transition: all 1s ease;
}

.p1 {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.p2 {
  bottom: 0;
  left: 0;
}
.p3 {
  bottom: 0;
  right: 0;
}

.fusion-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 50px white, 0 0 100px var(--accent-color);
  opacity: 0;
}

.fusion-active .sacrificial-pet {
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) scale(0.1);
  opacity: 0;
  transition: all 2s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.fusion-active .fusion-core {
  animation: coreExplode 2.5s forwards;
}

@keyframes coreExplode {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 1;
  }
  80% {
    transform: translate(-50%, -50%) scale(50);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes pulseText {
  from {
    opacity: 0.8;
    letter-spacing: 2px;
  }
  to {
    opacity: 1;
    letter-spacing: 5px;
  }
}

#fusion-result {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  width: 100%;
  z-index: 205;
  animation: floatIn 1s ease 2s backwards;
}

#mega-reveal-img {
  width: 300px;
  filter: drop-shadow(0 0 30px var(--accent-color));
  animation: shake 0.5s;
}

#mega-reveal-name {
  font-size: 2.5rem;
  color: gold;
  text-transform: uppercase;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  text-align: center;
}

#fusion-result button {
  background: white;
  color: black;
  border: none;
  padding: 15px 40px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  transition: transform 0.2s;
}

#fusion-result button:hover {
  transform: scale(1.1);
}
