/* ═══════════════════════════════════════
   LAZY LOADER
═══════════════════════════════════════ */

.game-loader-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 100;
  animation: loaderFadeIn 0.3s ease;
}

@keyframes loaderFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.game-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  animation: loaderScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes loaderScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.loader-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 20px rgba(0,234,255,0.3));
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spinnerRotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
  animation-delay: -0.45s;
  border-top-color: rgba(0, 234, 255, 1);
  border-width: 3px;
}

.spinner-ring:nth-child(2) {
  animation-delay: -0.3s;
  border-top-color: rgba(0, 234, 255, 0.6);
  border-width: 3px;
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
}

.spinner-ring:nth-child(3) {
  animation-delay: -0.15s;
  border-top-color: rgba(0, 234, 255, 0.3);
  border-width: 2px;
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
}

@keyframes spinnerRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loader-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--t2);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  animation: loaderPulse 2s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% {
    opacity: 0.4;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* Fade transitions for loaded content */
.gp {
  position: relative;
  min-height: 600px;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gp:not(.ac) {
  opacity: 0;
}

.gp.ac {
  opacity: 1;
}

/* Mobile */
@media (max-width: 768px) {
  .gp {
    min-height: 500px;
  }

  .loader-spinner {
    width: 64px;
    height: 64px;
  }

  .loader-text {
    font-size: 13px;
  }
}
