body,
html {
  padding: 0;
  margin: 0;
}

#unity-container {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

#unity-canvas {
  width: 100%;
  height: 100%;
  background: #231f20;
  position: relative;
  z-index: 0;
}

/* Logo Image */
#unity-logo-img {
  display: block;
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 300px;
  width: 100%;
  height: auto;
  z-index: 1001;
  object-fit: contain;
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* Loading Bar */
#unity-loading-bar {
  position: fixed;
  left: 50%;
  bottom: 26%;
  transform: translateX(-50%);
  background-color: transparent;
  padding: 30px 40px;
  z-index: 1002;
  text-align: center;
  border-radius: 12px;
  box-shadow: none;
  display: block;
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* Progress Bar */
#unity-progress-bar-empty {
  width: 250px;
  height: 25px;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
  border-radius: 5px;
}

#unity-progress-bar-full {
  height: 100%;
  background: linear-gradient(90deg, #f4ce05, #faf109);
  transition: width 0.4s ease-out;
  border-radius: 5px;
  width: 0%;
}

/* Loading Text */
#unity-logo {
  font-family: "Lalezar", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 35px;
  letter-spacing: 2px;
  -webkit-text-stroke: 1.5px black;
  width: 100%;
  text-align: center;
  margin: 0 auto 1px;
  animation: fadeIn 1s ease-in-out;
}

/* Warning */
#unity-warning {
  position: fixed;
  left: 50%;
  top: 10%;
  transform: translateX(-50%);
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border: 1px solid #f5c6cb;
  border-radius: 10px;
  z-index: 1003;
  display: none;
}

/* Fade-in Animation */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Dark Theme Adjustments */
@media (prefers-color-scheme: dark) {
  #unity-canvas {
    background: #231f20;
  }

  #unity-progress-bar-empty {
    background: white;
  }

  #unity-loading-bar {
    color: #f0f0f0;
  }

  #unity-logo {
    color: white;
  }
}

/* Light Theme Adjustments */
@media (prefers-color-scheme: light) {
  #unity-canvas {
    background: white;
  }

  #unity-progress-bar-empty {
    background: #cacaca;
  }

  #unity-loading-bar {
    color: #2c2c2c;
  }

  #unity-logo {
    color: black;
  }
}

/* Accessibility: Focus outline */
:focus {
  outline: 3px solid #8c68c9;
}

@media (prefers-reduced-motion: reduce) {
  #unity-logo {
    animation: none; /* Disabling animation for users with reduced motion preference */
  }
}

/* Font */
@font-face {
  font-family: "Lalezar";
  src: url("assets/fonts/Lalezar-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* Logo and Loading Bar Disappearance */
.hide-loading {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
