#loading_overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  inset: 0;
  z-index: 20000;
}

#loading_overlay img {
  width: 80vw;
  max-width: 192px;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  border: none;
}

#loading_label {
  margin-top: 24px;
  color: #6c24ea;
  font-size: 1.4rem;
  font-weight: bold;
  font-family: "Poppins", sans-serif;
  text-align: center;
  animation: pulse 1.5s infinite ease-in-out;
  pointer-events: none;
  white-space: nowrap;
}

#loading_bar_bg {
  width: 60%;
  max-width: 400px;
  height: 12px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 12px;
}

#loading_bar {
  width: 0%;
  height: 100%;
  background: #6d5ef6;
  transition: width 0.2s ease;
}

#loading_label {
  margin-top: 8px;
  font-size: 14px;
}

.loading_overlay.hidden {
  display: none !important;
}

/* --- Animated cover video (desktop hover only) --- */
.cover video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: 0;
  pointer-events: none;

  transition: opacity 220ms ease;
}

/* visible state */
.cover.has-video video {
  opacity: 1;
}

/* safety: only allow hover on devices that support it */
@media (hover: hover) and (pointer: fine) {
  .cover.has-video {
    cursor: pointer;
  }
}

.loading_spinner {
  width: 64px;
  height: 64px;
  border: 5px solid #e6ebf1;
  border-top-color: #5750f1;
  border-radius: 50%;
  animation: loading-spin 0.9s linear infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

.loading_text {
  margin-top: 18px;
  color: #5750f1;
  font-size: 16px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  letter-spacing: 0.2px;
}

@media (prefers-reduced-motion: reduce) {
  .loading_spinner { animation-duration: 2.5s; }
}
