body, html {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* --- LIGHT MODE (Updated to match your Flutter Gradient) --- */
body {
  background: linear-gradient(
    225deg,
    #C0F7FF 11.8%,
    #E1E5EA 88.26%
  );
  background-repeat: no-repeat;
  background-attachment: fixed;
}

#app-loader {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
}

#app-loader img {
  width: 120px;
  height: 120px;
  animation: pulse 2.5s infinite ease-in-out;
}

.loading-text {
  margin-top: 25px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.1em;
  color: #0F172A; /* onSurface */
  font-weight: 500;
}

/* --- PROGRESS BAR --- */
#progress-bar-container {
  width: 200px;
  height: 4px;
  background-color: rgba(0, 119, 135, 0.1);
  border-radius: 10px;
  margin-top: 20px;
  overflow: hidden;
  position: relative;
}

#progress-bar {
  width: 50%;
  height: 100%;
  background-color: #007787; /* Nasni Primary Teal */
  border-radius: 10px;
  position: absolute;
  top: 0;
  animation: indeterminate-progress 2s linear infinite;
}

/* --- DARK MODE OVERRIDES --- */
body.dark-mode {
  background: linear-gradient(181.23deg, #020617 20.64%, #007787 98.95%);
}

body.dark-mode .loading-text {
  color: #F1F5F9;
}

/* --- ANIMATIONS --- */
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

@keyframes indeterminate-progress {
  0% { left: -50%; }
  100% { left: 100%; }
}