body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #4C1D95 0%, #7C3AED 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hide any default Flutter loading elements */
#flutter-loading,
[flutter-loading],
.loading {
  display: none !important;
}

/* Ensure our loading screen covers everything and is visible immediately */
.flutter-loading {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: linear-gradient(135deg, #4C1D95 0%, #7C3AED 100%) !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: stretch !important;
  opacity: 1; /* Visible by default to prevent white flash */
  transition: opacity 0.5s ease-out;
  pointer-events: auto;
}

/* Show loading screen during loading */
.flutter-loading.show {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Hide loading screen when Flutter is ready */
.flutter-loading.hide {
  opacity: 0 !important;
  pointer-events: none !important;
  display: none !important; /* Completely remove from layout active tree */
}

/* Loading animation and Brand info */
.loading-container {
  flex: 1;
  display: flex;
  flex-direction: column; /* Stack brand and spinner vertically */
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 24px;
}

.loading-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.loading-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  animation: pulse 2s infinite ease-in-out;
}

.loading-title {
  color: #ffffff;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 4px 0;
  letter-spacing: 1px;
  font-family: 'CommonFonts', 'Inter', sans-serif;
}

.loading-subtitle {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 400;
  margin: 0;
  font-family: 'CommonFonts', 'Inter', sans-serif;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

/* Footer styles - Inside loading screen */
footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(76, 29, 149, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 24px;
  z-index: 1000;
  transition: all 0.3s ease;
  opacity: 1; /* Always visible when shown */
  transform: translateY(0);
  pointer-events: auto;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
}

.footer-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #fff;
  transition: all 0.2s ease;
  transform: translateX(-50%);
}

.footer-link:hover::after {
  width: 100%;
}

/* Hide loading elements when Flutter app loads */
.flutter-loading.hide {
  opacity: 0 !important;
  pointer-events: none !important;
  display: none !important;
}

footer.hide {
  opacity: 0 !important;
  transform: translateY(20px) !important;
  pointer-events: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 12px;
  }

  .footer-link {
    font-size: 13px;
    padding: 6px 10px;
  }
}