/* Reset */
:root {
  --primary-color: #01684B;
  --primary-light: #00A389;
  --secondary-color: #E6F4F1;
  --text-dark: #1E293B;
  --text-muted: #64748B;
  --bg-color: #FFFFFF;
}
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Full-Screen Splash Wrapper */
.preloader-wrapper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: radial-gradient(circle at 50% 45%, rgba(1, 104, 75, 0.08) 0%, rgba(255, 255, 255, 0.98) 60%, #FFFFFF 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 1.5rem 2.5rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  transition: opacity 0.35s ease-out, visibility 0.35s ease-out;
  overflow: hidden;
}

.theme-dark .preloader-wrapper {
  background: radial-gradient(circle at 50% 45%, rgba(1, 104, 75, 0.18) 0%, #0A1210 60%, #060B0A 100%);
  --text-dark: #F8FAFC;
  --text-muted: #94A3B8;
}

/* Top Subtle Branding */
.splash-top-bar {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  opacity: 0.85;
}
.splash-top-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.2px;
}

/* Center Content */
.splash-center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 500px;
  margin-top: -1rem;
}

/* Symbol & Logo */
.brand-symbol-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-glow-halo {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(1, 104, 75, 0.22) 0%, rgba(0, 163, 137, 0) 70%);
  animation: haloPulse 2.4s ease-in-out infinite;
}

.brand-symbol-img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(1, 104, 75, 0.2));
  animation: symbolFloat 3s ease-in-out infinite;
}

/* Brand Title & Subtitle */
.brand-title {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--primary-color);
  margin-bottom: 0.4rem;
  line-height: 1.15;
}

.brand-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 2rem;
  letter-spacing: 0.1px;
}

/* Progress Bar */
.progress-bar-container {
  width: 260px;
  height: 8px;
  background: #E2E8F0;
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}
.theme-dark .progress-bar-container {
  background: rgba(255, 255, 255, 0.1);
}

.progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  border-radius: 99px;
  background: linear-gradient(90deg, #01684B, #00A389, #01684B);
  background-size: 200% 100%;
  animation: progressSlide 1.6s ease-in-out infinite;
}

/* Dynamic Loading Dots */
.loading-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: inline-block;
  animation: dotWave 1.4s ease-in-out infinite both;
}
.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: -0.08s; }
.loading-dots span:nth-child(4) { animation-delay: 0.08s; }
.loading-dots span:nth-child(5) { animation-delay: 0.24s; }
.loading-dots span:nth-child(6) { animation-delay: 0.4s; }

/* Footer */
.splash-footer {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.75;
}

/* Animations */
@keyframes haloPulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.18);
    opacity: 0.85;
  }
}

@keyframes symbolFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes progressSlide {
  0% {
    left: -50%;
    width: 30%;
  }
  50% {
    left: 25%;
    width: 60%;
  }
  100% {
    left: 100%;
    width: 30%;
  }
}

@keyframes dotWave {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.35;
  }
  40% {
    transform: scale(1.15);
    opacity: 1;
    background-color: #00A389;
  }
}