:root {
  --mofa-brand-gradient: linear-gradient(135deg, #08362e 0%, #0d614f 40%, #2e7e6d 100%);
}

body {
  margin: 0;
}

.loader-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--mofa-brand-gradient);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  transition: opacity 0.5s ease-out;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

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

.favicon-container {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 28px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: breathe 2.4s ease-in-out infinite;
}

.favicon-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
  animation: logoZoom 2.4s ease-in-out infinite;
}

.loading-spinner {
  width: 120px;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.loading-spinner::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  border-radius: 4px;
  animation: progressSlide 1.4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.12),
      0 0 0 1px rgba(255, 255, 255, 0.05);
  }
  50% {
    transform: scale(1.06);
    box-shadow:
      0 12px 48px rgba(0, 0, 0, 0.18),
      0 0 40px rgba(255, 191, 0, 0.12),
      0 0 0 1px rgba(255, 255, 255, 0.1);
  }
}

@keyframes logoZoom {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes progressSlide {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .favicon-container,
  .favicon-logo,
  .loading-spinner::after {
    animation: none;
  }
}

@media (max-width: 640px) {
  .favicon-container {
    width: 90px;
    height: 90px;
    border-radius: 22px;
  }

  .favicon-logo {
    width: 62px;
    height: 62px;
  }

  .loading-spinner {
    width: 90px;
  }
}
