* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #22AC86;
  --primary-dark: #188569;
  --primary-light: #51DDBA;
  --primary-50: #F7FFFD;
  --primary-100: #E9F7F4;
  --primary-200: #CEF0E7;
}

html, body {
  width: 100%;
  height: 100%;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#flutter-loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#flutter-loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Animated background blobs */
.blob-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: blobFloat 8s ease-in-out infinite;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--primary-light);
  top: -120px;
  right: -100px;
  animation-delay: 0s;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  bottom: -80px;
  left: -80px;
  animation-delay: -3s;
}

.blob-3 {
  width: 250px;
  height: 250px;
  background: var(--primary-light);
  bottom: 20%;
  right: 10%;
  animation-delay: -6s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -30px) scale(1.05); }
  66%       { transform: translate(-15px, 20px) scale(0.97); }
}

/* Content wrapper */
.loading-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* Logo area */
.logo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: fadeSlideDown 0.7s ease both;
}

.logo-svg {
  width: 180px;
  height: auto;
  animation: logoPulse 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 16px rgba(24, 133, 105, 0.18));
}

.app-tagline {
  font-size: 13px;
  color: #9ca3af;
  letter-spacing: 0.3px;
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 4px 16px rgba(24, 133, 105, 0.18)); transform: scale(1); }
  50%       { filter: drop-shadow(0 8px 28px rgba(24, 133, 105, 0.38)); transform: scale(1.03); }
}

/* Progress bar area */
.progress-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 240px;
  animation: fadeSlideUp 0.7s ease 0.2s both;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: var(--primary-100);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary-dark));
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-dark);
  box-shadow: 0 0 10px rgba(24, 133, 105, 0.7);
}

/* Shimmer on the track */
.progress-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.progress-label {
  font-size: 12px;
  color: #6b7280;
  letter-spacing: 0.4px;
  min-height: 16px;
}

/* Dots loader */
.dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: dotBounce 1.2s ease-in-out infinite;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.18s; }
.dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1; }
}

/* Fade animations */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Footer */
.loading-footer {
  position: absolute;
  bottom: 32px;
  font-size: 11px;
  color: #d1d5db;
  letter-spacing: 0.5px;
  animation: fadeSlideUp 1s ease 0.5s both;
}
