/* Loader Fullscreen */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #434C6B;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease; /* transición suave */
}

/* Cuando se oculta */
#loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Contenedor de la animación */
#ball-loading-wrap {
  position: relative;
  height: 75px;
  width: 30px;
}

/* Sombra */
#ball-loading-wrap::after {
  background: rgba(0, 0, 0, 0.2);
  bottom: 0;
  content: "";
  height: 30px;
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 50%;
  transform: scaleY(0.1);
  transform-origin: center bottom;
  animation: bounceballShadow 0.4s infinite alternate ease-out;
}

/* Pelota */
#ball {
  border-radius: 50%;
  width: 30px;
  height: 30px;
  position: absolute;
  bottom: 0;
  left: 0;
  animation: bounceball 0.4s infinite alternate ease-out;
  overflow: hidden;
}
#ball svg {
  width: 30px;
  height: 30px;
}

/* Animación pelota */
@keyframes bounceball {
  from { bottom: 0; height: 20px; }
  10%  { bottom: 0; height: 30px; }
  to   { bottom: 50px; }
}

/* Animación sombra */
@keyframes bounceballShadow {
  from { background: rgba(0, 0, 0, 0.2); transform: scaleY(0.1) scaleX(1); }
  10%  { background: rgba(0, 0, 0, 0.3); transform: scaleY(0.1) scaleX(0.8); }
  to   { background: rgba(0, 0, 0, 0.2); transform: scaleY(0.1) scaleX(1); }
}
