.loading-container {
  visibility: hidden; /* Not visible initially */
  opacity: 0; /* Fully transparent initially */
  height: 0; /* Start with zero height to avoid impacting layout */
  animation: showbar 5s linear forwards; /* Delayed visibility and fade-in */

  width: 30%;
  height: 10px;
  background-color: white;
  border: 1px solid #333;
  margin-top: 40px;
}

.loading-bar {
  height: 100%;
  background-color: #333;
  animation: loading 60s linear infinite;
}

@keyframes loading {
  from {
    width: 0;
  }
  to {
    width: 110%; /* Extends beyond container */
  }
}

@keyframes showbar {
  0% {
    opacity: 0;
    height: 0; /* No height initially */
    visibility: hidden; /* Keep hidden initially */
  }
  99% {
    opacity: 0;
    height: 0; /* No height initially */
    visibility: hidden; /* Ensure it's hidden during the delay */
  }
  100% {
    opacity: 1;
    height: 8px;
    visibility: visible; /* Fully visible after delay */
    .loading-bar {
      height: 100%;
      background-color: #333;
      animation: loading 60s linear infinite;
    }
  }
}

.lsloading span {
  animation: blink 1.4s infinite both;
}

.lsloading span:nth-child(2) {
  animation-delay: 0.2s;
}

.lsloading span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.lsmessage {
  visibility: hidden; /* Not visible initially */
  opacity: 0; /* Fully transparent initially */
  height: 0; /* Start with zero height to avoid impacting layout */
  animation: showLoading 5s linear forwards; /* Delayed visibility and fade-in */
  margin: 0;
  font-size: 1rem;
  text-align: center;
  margin: 20px;
}

@keyframes showLoading {
  0% {
    opacity: 0;
    height: 0; /* No height initially */
    visibility: hidden; /* Keep hidden initially */
  }
  99% {
    opacity: 0;
    height: 0; /* No height initially */
    visibility: hidden; /* Ensure it's hidden during the delay */
  }
  100% {
    opacity: 1;
    height: 100%; /* Full height after animation */
    visibility: visible; /* Fully visible after delay */
  }
}

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
}

#loading-screen {
  border: 1px solid rgb(30, 30, 40);
  position: absolute;
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
  margin: unset;
  max-width: 700px;
  max-height: 98%;
  width: 95%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
}

.lslogo {
  width: 75%; /* Ensures the image takes full width */
  max-width: 75%; /* Prevents the image from exceeding the screen size */
  height: auto; /* Maintains aspect ratio */
}

.lsgif {
  height: 80px;
  animation: hidegif 5s linear forwards; /* Delayed visibility and fade-in */
}

@keyframes hidegif {
  100% {
    display: none;
  }
}
