.loader-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background-color: rgb(1 45 98 / 95%); /* blue with opacity */
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
  }
  
  /* Logo */
  .loader-img {
    max-width: 120px;
    width: 30vw;
    height: auto;
    object-fit: contain;
  }
  
  /* Spinner animation */
  .loader-spinner {
    width: 48px;
    height: 48px;
    border: 6px solid #e5e7eb; /* light gray */
    border-top: 6px solid #2563eb; /* blue */
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  /* Spin animation */
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  /* Hide main content while loading */
  body.loading .main-wrapper {
    opacity: 0;
    visibility: hidden;
  }

  /* Show main content after loading */
  body.loaded .main-wrapper {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in;
  }

  /* Ensure loader is always on top */
  .loader-bg {
    position: fixed !important;
    z-index: 99999 !important;
  }