.aeromail-loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #02040a;
  font-family: Inter, system-ui, sans-serif;
}

.aeromail-loading .space-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 40%, #0a1628 0%, #060d1a 30%, #02040a 60%, #000 100%);
  transition: opacity 2s ease;
}

.aeromail-loading .space-bg.is-visible {
  opacity: 1;
}

.aeromail-loading .stars-container {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity 1.8s ease 0.2s;
}

.aeromail-loading .stars-container.is-visible {
  opacity: 1;
}

.aeromail-loading .star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: aeromail-twinkle var(--dur) ease-in-out infinite;
  animation-delay: var(--del);
}

@keyframes aeromail-twinkle {
  0%,
  100% {
    opacity: var(--mo);
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

.aeromail-loading .shooting-star {
  position: absolute;
  width: 100px;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  transform: rotate(-45deg);
  animation: aeromail-shoot linear infinite;
}

@keyframes aeromail-shoot {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(-45deg);
  }
  10% {
    opacity: 1;
  }
  20% {
    opacity: 0;
    transform: translate(-200px, 200px) rotate(-45deg);
  }
  100% {
    opacity: 0;
  }
}

.aeromail-loading .nebula {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  animation: aeromail-nebula-pulse 6s ease-in-out infinite;
  transition: opacity 2s ease 0.4s;
}

.aeromail-loading .nebula.is-visible {
  opacity: 1;
}

@keyframes aeromail-nebula-pulse {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.25;
    transform: scale(1.1);
  }
}

.aeromail-loading .nebula-1 {
  width: 400px;
  height: 400px;
  top: 10%;
  left: 20%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.2), transparent 70%);
}

.aeromail-loading .nebula-2 {
  width: 300px;
  height: 300px;
  bottom: 20%;
  right: 15%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
}

.aeromail-loading .content-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 0.9s ease 0.8s,
    transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s;
}

.aeromail-loading .content-container.is-visible {
  opacity: 1;
  transform: scale(1);
}

.aeromail-loading .logo-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 40px;
}

.aeromail-loading .logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(14, 165, 233, 0.4));
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.8s ease 1.1s,
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s;
}

.aeromail-loading .logo-img.is-visible {
  opacity: 1;
  transform: scale(1);
}

.aeromail-loading .logo-img.float-animation {
  animation: aeromail-float 3s ease-in-out infinite;
}

@keyframes aeromail-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.aeromail-loading .glow-ring {
  position: absolute;
  inset: -25px;
  border-radius: 50%;
  border: 1px solid rgba(14, 165, 233, 0.15);
  animation: aeromail-glow-pulse 3s ease-in-out infinite;
}

@keyframes aeromail-glow-pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.08);
  }
}

.aeromail-loading .rotating-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px dashed rgba(14, 165, 233, 0.12);
  animation: aeromail-ring-rotate 20s linear infinite;
}

.aeromail-loading .rotating-ring-reverse {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  border: 1px dashed rgba(14, 165, 233, 0.06);
  animation: aeromail-ring-rotate 25s linear infinite reverse;
}

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

.aeromail-loading .orbital-container {
  position: absolute;
  inset: -50px;
  pointer-events: none;
}

.aeromail-loading .brand-text {
  display: flex;
  gap: 2px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #e0f2fe;
}

.aeromail-loading .brand-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.aeromail-loading .brand-letter.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.aeromail-loading .sub-brand {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(14, 165, 233, 0.7);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.aeromail-loading .sub-brand.is-visible {
  opacity: 1;
}

.aeromail-loading .progress-container {
  width: 200px;
  height: 2px;
  margin-top: 32px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.aeromail-loading .progress-container.is-visible {
  opacity: 1;
}

.aeromail-loading .progress-bar {
  height: 100%;
  background: #0ea5e9;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.5);
  width: 0%;
  transition: width 0.25s ease;
}

.aeromail-loading .progress-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  animation: aeromail-shimmer 2s ease-in-out infinite;
}

@keyframes aeromail-shimmer {
  0% {
    left: -50%;
  }
  100% {
    left: 150%;
  }
}

.aeromail-loading .loading-status {
  margin-top: 20px;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  opacity: 0;
  transition: opacity 0.5s ease;
  min-height: 1.2em;
}

.aeromail-loading .loading-status.is-visible {
  opacity: 1;
}

.aeromail-loading .footer-brand {
  position: absolute;
  bottom: 32px;
  left: 32px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.1);
  z-index: 20;
}

.aeromail-loading .footer-version {
  position: absolute;
  bottom: 32px;
  right: 32px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.1);
  z-index: 20;
}
