/* Reset and base styles */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Preloader styles with mobile optimization */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.preloader-container {
  text-align: center;
  padding: 20px;
}

.preloader-img {
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

.loading-text {
  color: #666;
  font-size: 16px;
  margin: 0;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Header styles with mobile responsiveness */
.header {
  background: #fff;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  height: 40px;
  width: auto;
}

/* Utility classes */
.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.justify-content-between {
  justify-content: space-between;
}

.gap-5 {
  gap: 20px;
}

/* Placeholder styles */
.placeholder {
  width: 60px;
  height: 20px;
  background: #e0e0e0;
  border-radius: 4px;
  animation: pulse 2s infinite;
}

.placeholder-wide {
  width: 100px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .header {
    padding: 10px 0;
  }
  
  .header-container {
    padding: 0 15px;
  }
  
  .logo {
    height: 35px;
  }
  
  .gap-5 {
    gap: 10px;
  }
  
  .placeholder {
    width: 40px;
    height: 15px;
  }
  
  .placeholder-wide {
    width: 70px;
  }
  
  .preloader-img {
    width: 50px;
    height: 50px;
  }
  
  .loader {
    width: 35px;
    height: 35px;
  }
  
  .loading-text {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .header-start .placeholder:nth-child(n+3) {
    display: none; /* Hide some placeholders on very small screens */
  }
  
  .header-end .placeholder:nth-child(2) {
    display: none;
  }
}

/* Dark theme support */
.theme-dark {
  background-color: #1a1a1a;
  color: #ffffff;
}

.theme-dark .header {
  background: #2d2d2d;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.theme-dark .placeholder {
  background: #404040;
}

/* Ensure Flutter app takes full viewport */
#flutter-view {
  width: 100%;
  height: 100%;
}

/* Hide preloader when Flutter app loads */
.flutter-loaded .preloader {
  display: none;
}