.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
  overflow: hidden;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  position: relative;
}

.loader-logo {
  max-width: 200px;
  height: auto;
  opacity: 0.9;
}

.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-active {
  opacity: 1;
  visibility: visible;
}

/* Nuevo loader con letras animadas */
.loader-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  width: auto;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.6em;
  font-weight: 600;
  user-select: none;
  color: #fff;
  scale: 1.5;
}

@media (max-width: 768px) {
  .loader-wrapper {
    scale: 1;
    font-size: 1.2em;
  }
}

.loader {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 1;
  background-color: transparent;
  mask: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 6px,
    black 7px,
    black 8px
  );
}

.loader::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 50% 50%, #ffff00 0%, transparent 50%),
    radial-gradient(circle at 45% 45%, #ff0000 0%, transparent 45%),
    radial-gradient(circle at 55% 55%, #00ffff 0%, transparent 45%),
    radial-gradient(circle at 45% 55%, #00ff00 0%, transparent 45%),
    radial-gradient(circle at 55% 45%, #0000ff 0%, transparent 45%);
  mask: radial-gradient(
    circle at 50% 50%,
    transparent 0%,
    transparent 10%,
    black 25%
  );
  animation:
    transform-animation 2s infinite alternate,
    opacity-animation 4s infinite;
  animation-timing-function: cubic-bezier(0.6, 0.8, 0.5, 1);
}

@keyframes transform-animation {
  0% {
    transform: translate(-55%);
  }
  100% {
    transform: translate(55%);
  }
}

@keyframes opacity-animation {
  0%,
  100% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  65% {
    opacity: 0;
  }
}

.loader-letter {
  display: inline-block;
  opacity: 0;
  animation: loader-letter-anim 4s infinite linear;
  z-index: 2;
}

.loader-letter:nth-child(1) {
  animation-delay: 0.1s;
}
.loader-letter:nth-child(2) {
  animation-delay: 0.205s;
}
.loader-letter:nth-child(3) {
  animation-delay: 0.31s;
}
.loader-letter:nth-child(4) {
  animation-delay: 0.415s;
}
.loader-letter:nth-child(5) {
  animation-delay: 0.521s;
}
.loader-letter:nth-child(6) {
  animation-delay: 0.626s;
}
.loader-letter:nth-child(7) {
  animation-delay: 0.731s;
}
.loader-letter:nth-child(8) {
  animation-delay: 0.837s;
}
.loader-letter:nth-child(9) {
  animation-delay: 0.942s;
}
.loader-letter:nth-child(10) {
  animation-delay: 1.047s;
}
.loader-letter:nth-child(11) {
  animation-delay: 1.152s;
}

@keyframes loader-letter-anim {
  0% {
    opacity: 0;
  }
  5% {
    opacity: 1;
    text-shadow: 0 0 4px #fff;
    transform: scale(1.1) translateY(-2px);
  }
  20% {
    opacity: 0.2;
  }
  100% {
    opacity: 0;
  }
}

/* Efecto de gradiente de fondo sutil */
.loader-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(0, 217, 192, 0.05) 0%, rgba(27, 31, 35, 0) 70%);
  z-index: -1;
  animation: gradientPulse 8s ease infinite;
}

@keyframes gradientPulse {
  0%, 100% { 
    opacity: 0.2; 
    transform: scale(1); 
  }
  50% { 
    opacity: 0.5; 
    transform: scale(1.2); 
  }
}