:root {
  --color-bottom: #ddd;
  --color-belt: #444;
}

#loader {
  transition: opacity 2s ease;
  -webkit-transition: opacity 2s ease;
  -moz-transition: opacity 2s ease;
  -ms-transition: opacity 2s ease;
  -o-transition: opacity 2s ease;
}
.poke_container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: inherit;
}

.ball {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.pokeball {
  position: relative;
  background: #f03e33;
  border: 2px solid black;
  overflow: hidden;
  animation: moveLat 2s ease-in-out infinite alternate-reverse;
  z-index: 1;
}

.pokeball_ground_shadow {
  width: 60px;
  height: 5px;
  margin-left: 60px;
  margin-top: -3px;
  background: rgba(0, 0, 0, 0.5);
  animation: moveLat 2s ease-in-out infinite alternate-reverse;
  z-index: 0;
  filter: blur(2px);
}

.pokeball_part_bottom {
  position: absolute;
  bottom: 0;
  width: 60px;
  height: 26px;
  background: var(--color-bottom);
  animation: rotateBottom 2s ease-in-out infinite alternate-reverse;
}

.belt,
.belt_bg {
  position: absolute;
  box-sizing: border-box;
  height: 8px;
  width: 100%;
  background: var(--color-belt);
  bottom: calc(50% - 4px);
  border-top: 2px solid black;
  border-bottom: 2px solid black;
  animation: rotate 2s ease-in-out infinite alternate-reverse;
}

.belt_loop {
  position: absolute;
  box-sizing: border-box;
  height: 22px;
  width: 22px;
  top: calc(50% - 11px);
  left: calc(50% - 11px);
  background: var(--color-belt);
  border-radius: 50%;
  border: 2px solid black;
}

.belt_loop_inside {
  position: absolute;
  height: 14px;
  width: 14px;
  top: calc(50% - 7px);
  left: calc(50% - 7px);
  border: 2px solid black;
  border-radius: 50%;
  background: var(--color-bottom);
}

.belt_loop_button {
  position: absolute;
  box-sizing: border-box;
  height: 6px;
  width: 6px;
  top: calc(50% - 3px);
  left: calc(50% - 3px);
  background: var(--color-bottom);
  border-radius: 50%;
  border: 1px solid black;
}

.pokeball_light {
  position: absolute;
  width: 10px;
  height: 20px;
  left: 7px;
  top: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: skew(-35deg, 2deg) rotate(10deg);
}


/* Animaciones */
@keyframes moveLat {
  0% { transform: translateX(0); }
  30% { transform: translateX(15px); }
  50% { transform: translateX(0); }
  70% { transform: translateX(15px); }
  100% { transform: translateX(0); }
}

@keyframes rotate {
  0%, 100% { transform: rotate(0); }
  30%, 70% { transform: rotate(20deg); }
  50% { transform: rotate(0); }
}

@keyframes rotateBottom {
  0%, 100% { transform: rotate(0); }
  30%, 70% {
    transform: rotate(20deg) skew(30deg, 0deg) scale(1.2);
  }
  50% { transform: rotate(0); }
}


@keyframes shiny {
  0% {
    transform: translateX(-100%) skewX(-20deg);
    opacity: 0;
  }
  30% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  70% {
    opacity: 0.6;
  }
  100% {
    transform: translateX(200%) skewX(-20deg);
    opacity: 0;
  }
}

.animate-shiny {
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.6),
    transparent 70%
  );
  animation: shiny 2.5s infinite;
}
