/* ===== PRELOADER ===== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1a0a0a 0%, #3a0c0e 35%, #221F1F 65%, #0d0d0d 100%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.pl-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.loading {
  overflow: hidden;
}

/* Inner container */
.pl-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 640px;
}

/* Logo */
.pl-logo img {
  height: 72px;
  width: auto;
  filter: drop-shadow(0 4px 18px rgba(254, 204, 3, 0.5));
  animation: pl-logo-pulse 2s ease-in-out infinite;
}

@keyframes pl-logo-pulse {
  0%, 100% { filter: drop-shadow(0 4px 18px rgba(254, 204, 3, 0.5)); }
  50%       { filter: drop-shadow(0 4px 32px rgba(218, 36, 44, 0.6)); }
}

/* Tagline */
.pl-tagline {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: rgba(254, 204, 3, 0.8);
  text-transform: uppercase;
  margin: 0;
}

/* Steps row */
.pl-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  margin-top: 0.5rem;
}

/* Single step */
.pl-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.pl-step span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(254, 204, 3, 0.3);
  transition: color 0.4s ease;
  white-space: nowrap;
}

.pl-step.active span {
  color: rgba(254, 204, 3, 1);
}

/* Icon wrapper */
.pl-icon-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(218, 36, 44, 0.08);
  border: 2px solid rgba(218, 36, 44, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
  position: relative;
}

.pl-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  opacity: 0.25;
  transition: opacity 0.4s ease, transform 0.4s ease;
  filter: grayscale(1);
}

/* Active state */
.pl-step.active .pl-icon-wrap {
  background: rgba(218, 36, 44, 0.15);
  border-color: rgba(254, 204, 3, 0.8);
  box-shadow:
    0 0 14px rgba(254, 204, 3, 0.5),
    0 0 32px rgba(218, 36, 44, 0.25),
    inset 0 0 10px rgba(254, 204, 3, 0.08);
  animation: pl-glow-ring 1.6s ease-in-out infinite;
}

.pl-step.active .pl-icon {
  opacity: 1;
  filter: grayscale(0) drop-shadow(0 0 6px rgba(254, 204, 3, 0.7));
  animation: pl-icon-scale 1.6s ease-in-out infinite;
}

@keyframes pl-glow-ring {
  0%, 100% {
    box-shadow:
      0 0 14px rgba(254, 204, 3, 0.5),
      0 0 32px rgba(218, 36, 44, 0.25),
      inset 0 0 10px rgba(254, 204, 3, 0.08);
  }
  50% {
    box-shadow:
      0 0 24px rgba(254, 204, 3, 0.8),
      0 0 52px rgba(218, 36, 44, 0.45),
      inset 0 0 16px rgba(254, 204, 3, 0.15);
  }
}

@keyframes pl-icon-scale {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.1); }
}

/* Connector line */
.pl-connector {
  flex: 1;
  height: 2px;
  background: rgba(218, 36, 44, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1.6rem;
  min-width: 24px;
  position: relative;
}

.pl-connector-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #DA242C, #FECC03);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(254, 204, 3, 0.6);
  transition: width 0.05s linear;
}

/* Progress bar */
.pl-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.pl-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7ab648, #d4a017, #f5c842);
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(212, 160, 23, 0.5);
  transition: width 0.05s linear;
}

/* Percent counter */
.pl-percent {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: rgba(254, 204, 3, 0.55);
  font-variant-numeric: tabular-nums;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .pl-icon-wrap { width: 72px; height: 72px; }
  .pl-icon      { width: 46px; height: 46px; }
  .pl-logo img  { height: 56px; }
  .pl-tagline   { font-size: 0.78rem; letter-spacing: 0.12em; }
  .pl-step span { font-size: 0.6rem; }
  .pl-connector { min-width: 12px; }
}
