/* Animación de rueda girando */
@keyframes spin-wheel {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@-webkit-keyframes spin-wheel {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
  }
}

/* Animación de pulso para el logo */
@keyframes pulse-logo {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.9;
  }
}

@-webkit-keyframes pulse-logo {
  0%,
  100% {
    -webkit-transform: scale(1);
    opacity: 1;
  }
  50% {
    -webkit-transform: scale(1.1);
    opacity: 0.9;
  }
}

/* Animación de movimiento horizontal */
@keyframes move-horizontal {
  0% {
    transform: translateX(-20px);
  }
  50% {
    transform: translateX(20px);
  }
  100% {
    transform: translateX(-20px);
  }
}

@-webkit-keyframes move-horizontal {
  0% {
    -webkit-transform: translateX(-20px);
  }
  50% {
    -webkit-transform: translateX(20px);
  }
  100% {
    -webkit-transform: translateX(-20px);
  }
}

.app-loading {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #f7f7f7 0%, #ffffff 50%, #f7f7f7 100%);
}

.app-loading p {
  display: block;
  font-size: 1.17em;
  margin-inline-start: 0;
  margin-inline-end: 0;
  font-weight: normal;
  color: #2c2c2c;
  margin-top: 2rem;
  text-align: center;
}

/* Contenedor del loader de moto */
.moto-loader {
  position: relative;
  width: 300px;
  height: 200px;
  margin: 0 auto;
}

/* Logo central con pulso */
.moto-loader .logo-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  z-index: 10;
  animation: pulse-logo 2s ease-in-out infinite;
}

.moto-loader .logo-center img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 10px;
  box-shadow:
    0 4px 20px rgba(44, 44, 44, 0.15),
    0 0 0 3px rgba(229, 183, 0, 0.2);
}

/* Rueda izquierda */
.moto-loader .wheel-left {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  height: 100px;
  border: 8px solid rgba(229, 183, 0, 0.2);
  border-top-color: #e5b700;
  border-right-color: #e5b700;
  border-radius: 50%;
  animation: spin-wheel 1s linear infinite;
}

.moto-loader .wheel-left::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  border: 4px solid rgba(229, 183, 0, 0.15);
  border-top-color: #e5b700;
  border-radius: 50%;
  animation: spin-wheel 0.7s linear infinite reverse;
}

.moto-loader .wheel-left::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(44, 44, 44, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(229, 183, 0, 0.3);
}

/* Rueda derecha */
.moto-loader .wheel-right {
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  height: 100px;
  border: 8px solid rgba(229, 183, 0, 0.2);
  border-top-color: #e5b700;
  border-right-color: #e5b700;
  border-radius: 50%;
  animation: spin-wheel 1s linear infinite;
}

.moto-loader .wheel-right::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  border: 4px solid rgba(229, 183, 0, 0.15);
  border-top-color: #e5b700;
  border-radius: 50%;
  animation: spin-wheel 0.7s linear infinite reverse;
}

.moto-loader .wheel-right::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(44, 44, 44, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(229, 183, 0, 0.3);
}

/* Chasis de la moto (opcional, línea decorativa) */
.moto-loader .chassis {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, #e5b700 50%, transparent 100%);
  border-radius: 2px;
  z-index: 5;
  opacity: 0.6;
}

/* Texto de carga */
.app-loading .loading-text {
  color: #2c2c2c;
  font-size: 1.2rem;
  font-weight: 500;
  margin-top: 2rem;
  text-align: center;
  letter-spacing: 2px;
  animation: pulse-logo 2s ease-in-out infinite;
}

.app-loading .loading-text::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    content: '.';
  }
  40% {
    content: '..';
  }
  60%,
  100% {
    content: '...';
  }
}
