/* Critical CSS to prevent FOUC */

/* Hide everything until fully loaded */
body {
  visibility: hidden;
}

/* Loading screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f8f9fa;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  visibility: visible;
}

#loading-screen .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e3e3e3;
  border-top: 4px solid #1e3a5f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Show content when loaded */
body.loaded {
  visibility: visible;
}

body.loaded #loading-screen {
  display: none;
}