body { padding: 0; margin: 0 }
#unity-container { position: fixed; width: 100%; height: 100%; }
#unity-canvas { width: 100%; height: 100%; background: #76b5ed }
#unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 2001; /* Make sure it's above the splash (1000) */
    pointer-events: none; /* Optional: allows clicks to go through if needed */
  }
  
#unity-loading-bar.fade-out { animation: splashFadeOut 1s forwards; }

#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
#unity-progress-bar-empty {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  
  position: relative;           /* Ensure it's positioned correctly */
  margin-left: auto;
  margin-right: auto;
  width: 141px;
  height: 27px;
  margin-top: 10px;
  background: url('progress-bar-empty-dark.png') no-repeat center;
  background-size: 100% 100%;     /* Or '100% 100%' if needed */
  /*background-color: #222;       /* Fallback color */
  z-index: 2000;                /* Ensure above splash */
  padding: 0 8px;
}

#unity-progress-bar-full {  
  height: 50%;
  width: 0%;
  background: url('progress-bar-full-dark.png') no-repeat left center;
  background-size: 100% 100%;
  transition: width 0.3s ease;
}

#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }

#custom-splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1000;
}

#custom-splash img:first-child {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Logo styling */
#splash-logo {
  position: absolute;
  top: 35%; /* halfway between top and mid */
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 40%; /* scale logo relative to screen */
  height: auto;
  z-index: 1;
}

/* Mobile-specific overrides */
@media (max-width: 768px) {
  #splash-logo {
    max-width: 70%; /* increase size on smaller screens */
  }
}

  
  /* Fade-out animation */
  #custom-splash.fade-out {
    animation: splashFadeOut 1s forwards;
  }
  
  @keyframes splashFadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
  }
  
