/* ===== LOADER MODERNO MAX HUNTER ===== */

/* Opção 1: Loader com pulsos concêntricos (atual) */
.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 80px; /* Aumentado para acomodar o texto */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Forçar loader a ficar escondido após carregamento */
.loader.loaded {
  opacity: 0 !important;
  transform: translate(-50%, -50%) scale(0.8) !important;
  pointer-events: none !important;
}

.loader.loaded::before,
.loader.loaded::after,
.loader.loaded .inner-circle {
  animation-play-state: paused !important;
}

/* Texto Max Hunter abaixo do loader */
.loader::after {
  content: 'Max Hunter';
  position: absolute;
  bottom: -25px;
  font-family: 'Arial', sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: #13a1f3;
  text-align: center;
  white-space: nowrap;
  animation: text-pulse 2s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(19, 161, 243, 0.5);
  letter-spacing: 1px;
}

.loader::before {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(45deg, #13a1f3, #0d8bd9);
  animation: loader-pulse 2s ease-in-out infinite;
  animation-delay: 0s;
  box-shadow: 0 0 20px rgba(19, 161, 243, 0.3);
}

/* Círculo interno branco */
.loader .inner-circle {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ffffff, #f8f9fa);
  animation: loader-pulse 2s ease-in-out infinite;
  animation-delay: 0.5s;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

@keyframes loader-pulse {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Efeito de rotação adicional */
.loader::before {
  animation: loader-pulse 2s ease-in-out infinite, loader-rotate 3s linear infinite;
}

@keyframes loader-rotate {
  from {
    transform: scale(0.8) rotate(0deg);
  }
  to {
    transform: scale(0.8) rotate(360deg);
  }
}

/* Efeito de brilho */
.loader::after {
  animation: loader-pulse 2s ease-in-out infinite, loader-glow 2s ease-in-out infinite;
}

@keyframes loader-glow {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
  }
}

/* Animação para o texto Max Hunter */
@keyframes text-pulse {
  0%, 100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* ===== ALTERNATIVAS DE DESIGN ===== */

/* Opção 2: Loader com pontos flutuantes */
.loader-dots {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 8px;
  z-index: 9999;
}

.loader-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(45deg, #13a1f3, #0d8bd9);
  animation: dot-bounce 1.4s ease-in-out infinite both;
}

.loader-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dots .dot:nth-child(2) { animation-delay: -0.16s; }
.loader-dots .dot:nth-child(3) { animation-delay: 0s; }

@keyframes dot-bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Opção 3: Loader com anéis rotativos */
.loader-rings {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  z-index: 9999;
}

.loader-rings .ring {
  position: absolute;
  border: 3px solid transparent;
  border-top-color: #13a1f3;
  border-radius: 50%;
  animation: ring-spin 1.5s linear infinite;
}

.loader-rings .ring:nth-child(1) {
  width: 80px;
  height: 80px;
  animation-duration: 1.5s;
}

.loader-rings .ring:nth-child(2) {
  width: 60px;
  height: 60px;
  top: 10px;
  left: 10px;
  animation-duration: 1.2s;
  animation-direction: reverse;
}

.loader-rings .ring:nth-child(3) {
  width: 40px;
  height: 40px;
  top: 20px;
  left: 20px;
  animation-duration: 0.9s;
}

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

/* Opção 4: Loader com barra de progresso */
.loader-bar {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 4px;
  background: rgba(19, 161, 243, 0.2);
  border-radius: 2px;
  overflow: hidden;
  z-index: 9999;
}

.loader-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #13a1f3, transparent);
  animation: bar-slide 1.5s ease-in-out infinite;
}

@keyframes bar-slide {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Opção 5: Loader com logo Max Hunter */
.loader-logo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader-logo::before {
  content: 'MH';
  font-size: 24px;
  font-weight: bold;
  color: #13a1f3;
  animation: logo-pulse 2s ease-in-out infinite;
}

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

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  .loader,
  .loader-dots,
  .loader-rings,
  .loader-bar,
  .loader-logo {
    transform: translate(-50%, -50%) scale(0.8);
  }
}

@media (max-width: 480px) {
  .loader,
  .loader-dots,
  .loader-rings,
  .loader-bar,
  .loader-logo {
    transform: translate(-50%, -50%) scale(0.7);
  }
}
