/**
 * ESHIFT Campus of Higher Studies - Online Certificate Verification Portal
 * Loading Animation & Micro-Interactions Stylesheet
 * Incorporates the exact glowing letter-by-letter Orbitron animation
 */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;800&display=swap');

/* Loading Screen Overlay */
.eshift-loader-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: radial-gradient(circle at top, #0b1220, #05070d);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Orbitron', -apple-system, BlinkMacSystemFont, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  visibility: hidden;
}

.eshift-loader-overlay.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Background Glow Blobs */
.glow-blob {
  position: absolute;
  width: 400px;
  height: 400px;
  background: rgba(0, 200, 255, 0.15);
  filter: blur(120px);
  border-radius: 50%;
  animation: floatBlob 6s ease-in-out infinite;
  pointer-events: none;
}

.glow-blob.two {
  background: rgba(255, 0, 200, 0.12);
  bottom: 10%;
  right: 10%;
  animation-delay: 2s;
}

@keyframes floatBlob {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-30px); }
}

/* Loader Container */
.loader-content-wrap {
  text-align: center;
  z-index: 10;
  padding: 1.5rem;
}

/* Main Glowing Text */
.loader-brand-text {
  font-size: clamp(18px, 2.6vw, 42px);
  letter-spacing: 2px;
  color: #cfefff;
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}

/* Individual Letters */
.loader-brand-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: loadLetter 1.8s infinite;
  text-shadow: 0 0 10px rgba(0, 200, 255, 0.6),
               0 0 20px rgba(0, 200, 255, 0.4);
}

/* Stagger Effect for "ESHIFT Campus of Higher Studies" */
.loader-brand-text span:nth-child(1)  { animation-delay: 0.00s; }
.loader-brand-text span:nth-child(2)  { animation-delay: 0.05s; }
.loader-brand-text span:nth-child(3)  { animation-delay: 0.10s; }
.loader-brand-text span:nth-child(4)  { animation-delay: 0.15s; }
.loader-brand-text span:nth-child(5)  { animation-delay: 0.20s; }
.loader-brand-text span:nth-child(6)  { animation-delay: 0.25s; }
.loader-brand-text span:nth-child(7)  { animation-delay: 0.30s; }
.loader-brand-text span:nth-child(8)  { animation-delay: 0.35s; }
.loader-brand-text span:nth-child(9)  { animation-delay: 0.40s; }
.loader-brand-text span:nth-child(10) { animation-delay: 0.45s; }
.loader-brand-text span:nth-child(11) { animation-delay: 0.50s; }
.loader-brand-text span:nth-child(12) { animation-delay: 0.55s; }
.loader-brand-text span:nth-child(13) { animation-delay: 0.60s; }
.loader-brand-text span:nth-child(14) { animation-delay: 0.65s; }
.loader-brand-text span:nth-child(15) { animation-delay: 0.70s; }
.loader-brand-text span:nth-child(16) { animation-delay: 0.75s; }
.loader-brand-text span:nth-child(17) { animation-delay: 0.80s; }
.loader-brand-text span:nth-child(18) { animation-delay: 0.85s; }
.loader-brand-text span:nth-child(19) { animation-delay: 0.90s; }
.loader-brand-text span:nth-child(20) { animation-delay: 0.95s; }
.loader-brand-text span:nth-child(21) { animation-delay: 1.00s; }
.loader-brand-text span:nth-child(22) { animation-delay: 1.05s; }
.loader-brand-text span:nth-child(23) { animation-delay: 1.10s; }
.loader-brand-text span:nth-child(24) { animation-delay: 1.15s; }
.loader-brand-text span:nth-child(25) { animation-delay: 1.20s; }
.loader-brand-text span:nth-child(26) { animation-delay: 1.25s; }
.loader-brand-text span:nth-child(27) { animation-delay: 1.30s; }
.loader-brand-text span:nth-child(28) { animation-delay: 1.35s; }
.loader-brand-text span:nth-child(29) { animation-delay: 1.40s; }

@keyframes loadLetter {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    filter: blur(2px);
  }
  30% {
    opacity: 1;
    transform: translateY(0px) scale(1.05);
    filter: blur(0px);
  }
  70% {
    opacity: 1;
    transform: translateY(0px);
  }
  100% {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
    filter: blur(1px);
  }
}

/* Subtitle */
.loader-sub-text {
  margin-top: 24px;
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(200, 220, 255, 0.7);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loader-spinner-ring {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 200, 255, 0.2);
  border-top-color: #00c8ff;
  border-radius: 50%;
  animation: spinRing 0.8s linear infinite;
  display: inline-block;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .loader-brand-text {
    font-size: 17px;
    gap: 1px;
  }
  .loader-sub-text {
    font-size: 11px;
    letter-spacing: 2px;
  }
}
