/* BUILTIFY — Premium Preloader */
html.btf-loading,
html.btf-loading body {
  overflow: hidden !important;
}

#btf-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0a0000 0%, #1a0505 50%, #0d0101 100%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.btf-preloader-logo {
  width: clamp(110px, 32vw, 190px);
  height: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 48px;
  animation: btf-breathe 2.4s ease-in-out infinite;
}

@keyframes btf-breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.03); opacity: 1; }
}

.btf-preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 280px;
  gap: 14px;
}

.btf-preloader-bar {
  width: 100%;
  height: 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}

.btf-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, #8B0000 0%, #cc2222 50%, #8B0000 100%);
  background-size: 200% 100%;
  animation: btf-shimmer 1.8s linear infinite;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
}

@keyframes btf-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.btf-count {
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

#btf-preloader.btf-done {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .btf-preloader-logo { animation: none; opacity: 1; }
  .btf-fill { animation: none; transition: width 0.2s ease; }
  #btf-preloader.btf-done { transition: none; }
}

@media (max-width: 480px) {
  .btf-preloader-logo { width: clamp(80px, 40vw, 140px); margin-bottom: 36px; }
  .btf-preloader-bar { height: 2px; }
  .btf-count { font-size: 0.65rem; }
}
