/* SMR Pilot Academy Loading Animation Styles */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600&display=swap');
/* Perfect Logo Transition System */
/* Header logo perfect sync */
.header-logo {
  opacity: 0 !important;
  transform: scale(0) !important;
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.header-logo.logo-revealed {
  opacity: 1 !important;
  transform: scale(1) !important;
}

.header-logo.logo-enhanced {
  animation: logoBreathing 4s ease-in-out infinite, logoGlow 3s ease-in-out infinite alternate;
}

/* Perfect breathing animation */
@keyframes logoBreathing {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

/* Subtle glow effect */
@keyframes logoGlow {
  0% {
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
  }
  100% {
    filter: drop-shadow(0 0 16px rgba(59, 130, 246, 0.5));
  }
}

/* Loading logo final stage */
.logo-3d.final-stage {
  animation: logoPreTransition 0.8s ease-in-out forwards;
}

@keyframes logoPreTransition {
  0% {
    transform: rotateX(0deg) rotateY(0deg) scale(1);
    filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.7));
  }
  100% {
    transform: rotateX(0deg) rotateY(0deg) scale(1);
    filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.7));
  }
}
:root {
  --font-orbitron: "Orbitron", sans-serif;
  --font-exo2: "Exo 2", sans-serif;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(to bottom right, #000000, #1f2937, #0f172a);
  z-index: 999999;
  overflow: hidden;
  transition: opacity 1.2s ease, visibility 1.2s ease;
}

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

/* Background layers */
.loading-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 58, 138, 0.1), transparent, rgba(88, 28, 135, 0.05));
  z-index: 0;
}

.loading-bg-radial {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.05), transparent);
  z-index: 0;
}

/* Particle system containers */
.particle-system {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cloud-system {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Grid overlay */
.grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  z-index: 1;
  background: 
    linear-gradient(rgba(59,130,246,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Atmospheric horizon lines */
.horizon-line {
  position: absolute;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(59, 130, 246, 0.3), transparent);
  top: 66.67%;
  z-index: 1;
}

.horizon-line-2 {
  position: absolute;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(147, 51, 234, 0.2), transparent);
  top: 75%;
  z-index: 1;
}

/* Radar system */
.radar-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.radar-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
}

.radar-large {
  width: 384px;
  height: 384px;
  border-color: rgba(34, 197, 94, 0.2);
  animation: radarRotate 12s linear infinite;
}

.radar-large::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, rgba(34, 197, 94, 0.4), transparent);
  transform: translateY(-50%);
  transform-origin: left center;
}

.radar-small {
  width: 320px;
  height: 320px;
  border-color: rgba(59, 130, 246, 0.15);
  animation: radarRotateReverse 20s linear infinite;
}

.radar-small::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, rgba(59, 130, 246, 0.3), transparent);
  transform: translateY(-50%);
  transform-origin: left center;
}

/* Main loading content */
.loading-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 1rem;
}

/* Atmospheric entry effect */
.atmospheric-entry {
  position: absolute;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: all 2.5s ease-out;
}

.atmospheric-entry.active {
  top: 250px;
  opacity: 1;
  animation: entryFade 2.5s ease-out forwards;
}

.entry-trail {
  width: 3px;
  height: 192px;
  background: linear-gradient(to bottom, #fb923c, #fde047, #ef4444);
  border-radius: 9999px;
  position: relative;
}

.entry-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 96px;
  background: linear-gradient(to bottom, white, #fed7aa, transparent);
  border-radius: 9999px;
  filter: blur(2px);
}

/* Logo container */
.logo-container {
  position: relative;
  width: 384px;
  height: 384px;
  perspective: 1200px;
  margin-bottom: 2rem;
}

.logo-3d {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  opacity: 0;
  transform: rotateX(-120deg) rotateY(-60deg) scale(0.2) translateZ(-300px);
  transition: all 2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-3d.assembled {
  opacity: 1;
  transform: rotateX(0deg) rotateY(0deg) scale(1) translateZ(0px);
}

.logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.7));
}

/* Glow effects */
.glow-effect {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  filter: blur(48px);
}

.glow-blue {
  background: rgba(59, 130, 246, 0.15);
  animation: glowPulse 4s ease-in-out infinite;
}

.glow-white {
  background: rgba(255, 255, 255, 0.05);
  filter: blur(32px);
  animation: glowPulseAlt 3s ease-in-out infinite 1s;
}

/* Holographic overlay */
.holographic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(6, 182, 212, 0.2), transparent, rgba(6, 182, 212, 0.2));
  transform: skewY(12deg);
  opacity: 0;
  animation: holographicSweep 2s ease-in-out infinite 3s;
}

/* Energy burst */
.energy-burst {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.2), transparent);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  animation: energyBurst 2s ease-out 4s;
}

/* Text content */
.academy-text {
  text-align: center;
  opacity: 0;
  transform: translateY(60px) rotateX(-90deg);
  transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1) 5s;
}

.academy-text.visible {
  opacity: 1;
  transform: translateY(0px) rotateX(0deg);
}

.academy-title {
  font-family: var(--font-orbitron);
  font-weight: 300;
  background: linear-gradient(to right, #e5e7eb, #bfdbfe, #e5e7eb);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  font-size: 3rem;
  letter-spacing: 0.6em;
  margin-bottom: 1.5rem;
  animation: textShimmer 3s linear infinite;
}

.academy-line {
  height: 1px;
  background: linear-gradient(to right, transparent, #3b82f6, transparent);
  width: 0;
  margin: 0 auto;
  transition: width 1s ease 6s;
}

.academy-line.expanded {
  width: 12rem;
}

/* Loading progress */
.loading-progress {
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  opacity: 0;
  transition: opacity 0.8s ease 1s;
}

.loading-progress.visible {
  opacity: 1;
}

.progress-bar {
  width: 18rem;
  height: 6px;
  background: rgba(55, 65, 81, 0.5);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid rgba(55, 65, 81, 0.3);
  backdrop-filter: blur(4px);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, #2563eb, #06b6d4, #2563eb);
  width: 0%;
  position: relative;
  transition: width 0.8s ease;
}

.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: progressShimmer 1s ease-in-out infinite;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
}

.progress-text {
  color: #9ca3af;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
}

.progress-percentage {
  color: #3b82f6;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .radar-large {
    display: none;
  }
  
  .radar-small {
    display: none;
  }
  
  .logo-container {
    width: 288px;
    height: 288px;
  }
  
  .academy-title {
    font-size: 1.25rem;
    letter-spacing: 0.4em;
  }
  
  .progress-bar {
    width: 14rem;
    height: 4px;
  }
  
  .atmospheric-entry.active {
    top: 150px;
  }
  
  .entry-trail {
    height: 128px;
  }
  
  .entry-glow {
    height: 64px;
  }
}

@media (max-width: 480px) {
  .logo-container {
    width: 256px;
    height: 256px;
  }
  
  .academy-line.expanded {
    width: 8rem;
  }
}

/* Animations */
@keyframes radarRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes entryFade {
  0% { opacity: 0; }
  30% { opacity: 1; }
  70% { opacity: 0.8; }
  100% { opacity: 0; }
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

@keyframes glowPulseAlt {
  0%, 100% { transform: scale(1.2); opacity: 0.1; }
  50% { transform: scale(1); opacity: 0.3; }
}

@keyframes holographicSweep {
  0% { opacity: 0; }
  50% { opacity: 0.4; }
  100% { opacity: 0; }
}

@keyframes energyBurst {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(3); opacity: 0.8; }
  100% { transform: scale(0); opacity: 0; }
}

@keyframes textShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Enhanced particle animations */
@keyframes starAnimation {
  0%, 100% {
    opacity: 0.2;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.3) rotate(180deg);
  }
}

@keyframes glowAnimation {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1) translateY(0);
  }
  33% {
    opacity: 0.8;
    transform: scale(1.2) translateY(-10px);
  }
  66% {
    opacity: 0.5;
    transform: scale(0.9) translateY(5px);
  }
}

@keyframes sparkAnimation {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg) scale(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-20px) rotate(180deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px) rotate(360deg) scale(0);
  }
}

@keyframes nebulaAnimation {
  0%, 100% {
    opacity: 0.1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.1) rotate(180deg);
  }
}

@keyframes cloudDrift {
  0% {
    transform: translateX(-20%) translateY(0) rotate(0deg);
    opacity: 0.1;
  }
  25% {
    opacity: 0.3;
  }
  75% {
    opacity: 0.2;
  }
  100% {
    transform: translateX(120%) translateY(-30px) rotate(5deg);
    opacity: 0;
  }
}

