* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  /* AJUSTE PARA iOS: Ocultar la barra de desplazamiento para eliminar diferencias de cálculo */
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

html.no-scroll,
body.no-scroll {
  overflow: hidden !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
}

html.no-scroll *,
body.no-scroll * {
  overscroll-behavior: none !important;
  touch-action: none !important;
}

/* AJUSTE PARA iOS: Ocultar la barra de desplazamiento para Chrome/Safari */
body::-webkit-scrollbar {
  display: none;
}

/* Asegurar que el contenido no se vea durante la carga */
body > div:not(#pageLoader) {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Mostrar contenido cuando el loader termine */
body.loaded > div:not(#pageLoader) {
  opacity: 1;
}

/* === LOADER PRINCIPAL === */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#pageLoaderVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
  pointer-events: none;
}

.tap-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  color: var(--color-oscuro);
  pointer-events: none;
  user-select: none;
  font-family: sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: tapHintAppear 0.8s ease forwards;
  animation-delay: 5s;
}

@keyframes tapHintAppear {
  to { opacity: 0.95; }
}

.tap-hint-circle {
  width: 36px;
  height: 36px;
  border: 2px solid #4d1321;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tapPulse 1.6s ease-in-out infinite;
  pointer-events: none;
}

.tap-hint-text {
  pointer-events: none;
  color: #4d1321;
}

@keyframes tapPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.75;
  }

  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

.page-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

/* Overlay blanco para fundido al terminar el video */
.white-fade {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  opacity: 0;
  z-index: 10001;
  transition: opacity 0.7s cubic-bezier(0.2, 0.9, 0.2, 1);
  pointer-events: none;
  will-change: opacity;
}
