body {
  margin: 0;
}

/* Preloader Container */
.loader-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--preloader-bg, linear-gradient(135deg, #0e4978 0%, #006670 48%, #0095a3 100%));
  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-container::before,
.loader-container::after {
  content: '';
  position: absolute;
  width: min(42rem, 72vw);
  aspect-ratio: 1;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.loader-container::before {
  inset-inline-end: -18rem;
  inset-block-start: -20rem;
  box-shadow: 0 0 0 5rem rgba(255,255,255,.018), 0 0 0 10rem rgba(255,255,255,.012);
}

.loader-container::after {
  inset-inline-start: -24rem;
  inset-block-end: -25rem;
  border-color: rgba(105, 196, 174, .22);
  box-shadow: 0 0 0 6rem rgba(63, 127, 188, .06);
}

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

/* Favicon Container — clean glass card with smooth breathe */
.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(105, 196, 174, 0.42);
  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;
}

/* Logo — smooth zoom in/out, no rotation */
.favicon-logo {
  width: 56px;
  height: 56px;
  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 — replaced with elegant progress bar */
.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, var(--preloader-accent, #69c4ae), #ffffff, transparent);
  border-radius: 4px;
  animation: progressSlide 1.4s ease-in-out infinite;
}

/* Loading Text */
.loading-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: textFade 2.4s ease-in-out infinite;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* ── Animations ── */

/* Smooth breathe — scale + glow */
@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(105, 196, 174, 0.15),
      0 0 0 1px rgba(255, 255, 255, 0.1);
  }
}

/* Logo zoom in/out — synced with breathe */
@keyframes logoZoom {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

/* Progress bar slide */
@keyframes progressSlide {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}

/* Text subtle fade */
@keyframes textFade {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

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

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

  .loading-spinner {
    width: 90px;
  }

  .loading-text {
    font-size: 11px;
    letter-spacing: 2px;
  }
}
