/* ========= PRELOADER VISUAL FINAL (SEM SCROLL VISÍVEL) ========= */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

html {
  overflow-y: hidden; /* bloqueia o scroll antes do JS agir */
}

/* ====== Preloader ====== */
#preloader {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999;
  width: 100vw;
  height: 100vh;
  transition: opacity 1s ease, visibility 1s ease;
}

/* Esconde suavemente ao finalizar */
#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

/* Centraliza a logo, sem borda */
.logo-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#loader-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(1.1);
  transition: filter 0.3s ease;
}

#color-fill {
  display: none;
}

/* Texto da porcentagem */
#progress-text {
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 1.2rem;
  margin-top: 10px;
  font-weight: 600;
}

/* Barra de progresso */
#progress-bar {
  width: 180px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  margin: 15px auto 0;
  border-radius: 3px;
  overflow: hidden;
}

#progress-bar-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #00AEEF, #00f0ff);
  transition: width 0.3s ease;
  border-radius: 3px;
}

/* Impede o scroll durante o preload */
body.preloader-active {
  overflow: hidden !important;
  height: 100vh !important;
  width: 100vw !important;
  position: fixed !important;
}

/* Restaura o comportamento normal após o carregamento */
body.loaded {
  overflow-x: visible !important;
  overflow-y: auto !important;
  height: auto !important;
  width: auto !important;
  position: initial !important;
}

