/* Landing Page Styles */
body, html {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Roboto', 'Arial', sans-serif;
  background: linear-gradient(135deg, #017bff 0%, #003d82 50%, #001a3d 100%);
  overflow: hidden;
}

#landing-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #017bff 0%, #003d82 50%, #001a3d 100%);
  color: white;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.landing-content {
  text-align: center;
  max-width: 400px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.app-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: logoFloat 3s ease-in-out infinite;
}

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

.app-title {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.5s forwards;
}

.app-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 40px;
  opacity: 0.9;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.7s forwards;
}

#loading-status {
  font-size: 1rem;
  margin-bottom: 20px;
  opacity: 0.8;
  min-height: 24px;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.9s forwards;
}

.loader-container {
  position: relative;
  margin: 20px auto;
  display: none; /* Hide circular loader */
}

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

.progress-bar {
  width: 200px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  margin: 20px auto;
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 1s ease-out 1.3s forwards;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.8));
  border-radius: 2px;
  animation: progressFill 4s ease-in-out infinite;
}

@keyframes progressFill {
  0% { width: 0%; }
  25% { width: 30%; }
  50% { width: 60%; }
  75% { width: 85%; }
  100% { width: 100%; }
}

.loading-dots {
  display: inline;
  margin-left: 0;
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Responsive design */
@media (max-width: 768px) {
  .app-title {
    font-size: 2rem;
  }
  
  .app-subtitle {
    font-size: 1rem;
  }
  
  .app-logo {
    width: 100px;
    height: 100px;
  }
  
  .landing-content {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .app-title {
    font-size: 1.8rem;
  }
  
  .progress-bar {
    width: 150px;
  }
}

/* Hide Flutter loading indicator */
.loading,
flutter-view .loading {
  display: none !important;
}

/* Ensure Flutter app is hidden initially until fully ready */
flt-glass-pane,
flutter-view,
[flt-renderer],
flt-scene-host,
canvas[flt-renderer] {
  opacity: 0 !important;
  transition: opacity 0.8s ease-in;
}

flt-glass-pane.flutter-ready,
flutter-view.flutter-ready,
[flt-renderer].flutter-ready,
flt-scene-host.flutter-ready,
canvas[flt-renderer].flutter-ready {
  opacity: 1 !important;
}

/* Hide any Flutter debug overlays during loading */
flt-semantics-host {
  opacity: 0;
  transition: opacity 0.8s ease-in;
}

flt-semantics-host.flutter-ready {
  opacity: 1;
}

/* Ensure smooth transition */
body.flutter-loading {
  overflow: hidden;
}

body.flutter-ready {
  overflow: auto;
}
