#preloader {
  position: fixed;
  inset: 0;
  background: #1a202c;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Centrato verticalmente */
  transition: opacity 0.5s ease;
}
#preloader h1 {
  margin-bottom: 1rem;
}
#loadBtn {
  margin-bottom: -5rem;
}
#preloader.hidden {
  opacity: 0;
  pointer-events: none;
}
.spinner {
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top: 4px solid #4299e1;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-top: 1rem;
  display: none;
}
.spinner.show {
  display: block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


#loadBtn {
  padding: 10px 20px;
  border: none;
  outline: none;
  color: #ffffff;
  cursor: pointer;
  position: absolute;
  z-index: 0;
  border-radius:10px;
  margin-top: 10px;
}

#loadBtn::after{
  content: '';
  position: absolute;
  z-index: -1;
  width: 100%;
  height: 100%;
  background-color: #333;
  left: 0;
  top: 0;
  border-radius: 10px;
}

#loadBtn::before{
  content: "";
  background: linear-gradient(
    45deg,
    #FF0000, #FF7300, #FFFB00, #48FF00,
    #00FFD5, #002BFF, #FF00C8, #FF0000
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 600%;
  z-index: -1;
  width: calc(100% + 4px);
  height:  calc(100% + 4px);
  filter: blur(8px);
  animation: glowing 20s linear infinite;
  transition: opacity .3s ease-in-out;
  border-radius: 10px;
  opacity: 0;
}

@keyframes glowing {
  0% {background-position: 0 0;}
  50% {background-position: 400% 0;}
  100% {background-position: 0 0;}
}

/* hover */
#loadBtn:hover::before {
  opacity: 1;
}

#loadBtn:active:after {
  background: transparent;
}

#loadBtn:active {
  color: #000;
  font-weight: bold;
}