body {
  margin: 0;
}

/* Preloader Container */
.loader-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--preloader-bg, linear-gradient(135deg, #163933 0%, #1a4a41 40%, #3F8782 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 {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

/* 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(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;
}

/* 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, rgba(255, 255, 255, 0.8), 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(63, 135, 130, 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;
  }
}
