/* ==========================================================================
   EliteForceVN - 3D Monochrome Silver-White Neon Loading Intro
   Strictly Black / Charcoal / Metallic Gray / Silver-White Neon (no colors)
   ========================================================================== */

html.ef-loading,
body.ef-loading {
  overflow: hidden;
  height: 100%;
}

.ef-loader {
  --ef-bg-deep: #060709;
  --ef-bg-mid: #101216;
  --ef-silver-bright: #ffffff;
  --ef-silver-main: #e6eaf0;
  --ef-silver-muted: #9ea6b4;
  --ef-track: rgba(255, 255, 255, 0.08);

  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 42%, #191c22 0%, #0b0d10 52%, #050608 100%);
  color: var(--ef-silver-main);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  overflow: hidden;
  perspective: 1100px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.68s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.68s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.68s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.ef-loader.is-exiting {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  pointer-events: none;
}

.ef-loader.is-hidden {
  display: none;
}

/* --------------------------------------------------------------------------
   Floating White Micro-Particles Canvas
   -------------------------------------------------------------------------- */
.ef-loader__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Metallic Architectural Background Plates (Slow 3D Drift + Specular Rim)
   -------------------------------------------------------------------------- */
.ef-loader__backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* Center ambient white neon aura */
.ef-loader__backdrop::before {
  content: "";
  position: absolute;
  top: 40%;
  left: 50%;
  width: min(760px, 96vw);
  height: min(460px, 64vh);
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.085) 0%,
    rgba(210, 218, 230, 0.03) 38%,
    rgba(255, 255, 255, 0) 70%
  );
  filter: blur(22px);
}

.ef-loader__facet {
  position: absolute;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(190, 198, 210, 0.018) 45%,
    transparent 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.04);
  transform: skewX(-34deg);
  will-change: transform, opacity;
}

.ef-loader__facet--tl {
  top: -14%;
  left: -9%;
  width: 28vw;
  min-width: 210px;
  height: 74vh;
  opacity: 0.78;
  animation: efFacetDriftA 18s ease-in-out infinite alternate;
}

.ef-loader__facet--tl-inner {
  top: 10%;
  left: -3%;
  width: 15vw;
  min-width: 115px;
  height: 46vh;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0%, transparent 78%);
  opacity: 0.85;
  animation: efFacetDriftB 15s ease-in-out infinite alternate;
}

.ef-loader__facet--mid-l {
  top: 30%;
  left: 6%;
  width: 9vw;
  min-width: 72px;
  height: 28vh;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.032) 0%, transparent 82%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0.65;
  animation: efFacetDriftB 21s ease-in-out infinite alternate-reverse;
}

.ef-loader__facet--br {
  bottom: -16%;
  right: -9%;
  width: 32vw;
  min-width: 230px;
  height: 74vh;
  background: linear-gradient(
    315deg,
    rgba(255, 255, 255, 0.065) 0%,
    rgba(200, 208, 220, 0.015) 55%,
    transparent 100%
  );
  border-top: none;
  border-left: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  animation: efFacetDriftB 19s ease-in-out infinite alternate;
}

.ef-loader__facet--br-inner {
  bottom: 8%;
  right: 4%;
  width: 14vw;
  min-width: 105px;
  height: 44vh;
  background: linear-gradient(315deg, rgba(255, 255, 255, 0.04) 0%, transparent 76%);
  border-top: none;
  border-left: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  animation: efFacetDriftA 16s ease-in-out infinite alternate-reverse;
}

.ef-loader__facet--mid-r {
  top: 22%;
  right: 9%;
  width: 10vw;
  min-width: 80px;
  height: 26vh;
  background: linear-gradient(210deg, rgba(255, 255, 255, 0.03) 0%, transparent 80%);
  opacity: 0.6;
  animation: efFacetDriftA 22s ease-in-out infinite alternate;
}

/* Subtle metallic floor light reflection */
.ef-loader__floor-reflection {
  position: absolute;
  bottom: -8%;
  left: 50%;
  width: min(720px, 95vw);
  height: 26vh;
  transform: translateX(-50%) perspective(500px) rotateX(68deg);
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.025) 45%,
    transparent 74%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  filter: blur(8px);
}

.ef-loader__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 42%, rgba(0, 0, 0, 0.74) 100%);
}

/* --------------------------------------------------------------------------
   Center Content Stack
   -------------------------------------------------------------------------- */
.ef-loader__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 650px;
}

/* --- Wordmark Brand Centerpiece + Horizontal Neon Beam + Reflection --- */
.ef-loader__wordmark-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 10px 18px;
  perspective: 900px;
}

/* Crisp Horizontal White Neon Beam behind Wordmark */
.ef-loader__logo-beam {
  position: absolute;
  top: 52%;
  left: 50%;
  width: clamp(310px, 68vw, 620px);
  height: 1.5px;
  transform: translate(-50%, -50%) scaleX(0);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.14) 18%,
    rgba(255, 255, 255, 0.78) 50%,
    rgba(255, 255, 255, 0.14) 82%,
    transparent 100%
  );
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.4),
              0 0 28px rgba(255, 255, 255, 0.18);
  animation: efBeamExpand 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.16s forwards;
}

/* Soft light reflection beneath the 3D Chrome Wordmark */
.ef-loader__logo-reflection {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 78%;
  height: 14px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.08) 48%,
    transparent 78%
  );
  filter: blur(6px);
  opacity: 0.78;
  pointer-events: none;
}

/* --- 3D Chrome Extruded Wordmark: ELITEFORCEVN --- */
.ef-loader__brand {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: "Chakra Petch", "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(2.1rem, 5.8vw, 3.85rem);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.075em;
  line-height: 1.05;
  color: #eef2f7;
  -webkit-text-stroke: 0.85px rgba(255, 255, 255, 0.76);
  /* Multi-layer 3D Extrude + Subtle Outer Neon Glow */
  text-shadow:
    1px 1px 0 #9aa1ae,
    2px 2px 0 #6e7684,
    3px 3px 0 #484e5a,
    4px 4px 0 #262a32,
    6px 8px 16px rgba(0, 0, 0, 0.92),
    0 0 12px rgba(255, 255, 255, 0.4),
    0 0 30px rgba(255, 255, 255, 0.18);
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  animation:
    efBrandReveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.14s forwards,
    efLoaderNeonBreath 6s ease-in-out 1.1s infinite;
}

/* Metallic Chrome silver face + subtle inner reflection */
.ef-loader__brand::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-text-stroke: 0 transparent;
  text-shadow: none;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #eef2f7 32%,
    #98a1b0 50%,
    #f5f7fb 68%,
    #adb5c3 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}

/* Continuous Light Sweep across ELITEFORCEVN */
.ef-loader__brand::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: transparent;
  -webkit-text-stroke: 0 transparent;
  text-shadow: none;
  background: linear-gradient(
    112deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 36%,
    rgba(255, 255, 255, 0.96) 50%,
    rgba(255, 255, 255, 0) 64%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 240% 100%;
  background-position: 140% 0;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.45));
  animation: efBrandLightSweep 2.6s cubic-bezier(0.4, 0, 0.2, 1) 0.35s infinite;
}

/* --- Owner Line: OWNER LEVIS --- */
.ef-loader__owner-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.5vw, 20px);
  width: min(460px, 88vw);
  margin-top: clamp(6px, 1.2vh, 10px);
  opacity: 0;
  animation: efFadeUpSoft 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.ef-loader__owner-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 100%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.18);
}

.ef-loader__owner-line--right {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.5) 0%, transparent 100%);
}

.ef-loader__owner {
  position: relative;
  margin: 0;
  font-family: "Chakra Petch", "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(0.8rem, 1.5vw, 0.96rem);
  font-weight: 600;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  text-transform: uppercase;
  color: #cfd5df;
  text-shadow:
    0 1px 0 #484e5a,
    0 2px 6px rgba(0, 0, 0, 0.8),
    0 0 10px rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  animation: efOwnerSubtleFloat 3.8s ease-in-out 1.1s infinite;
}

.ef-loader__owner::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-text-stroke: 0 transparent;
  text-shadow: none;
  background: linear-gradient(
    112deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 38%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0) 62%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 250% 100%;
  background-position: 145% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: efBrandLightSweep 4.2s cubic-bezier(0.4, 0, 0.2, 1) 0.9s infinite;
}

/* --- Slogan --- */
.ef-loader__slogan {
  margin: clamp(14px, 2.2vh, 20px) 0 0;
  font-size: clamp(0.85rem, 1.65vw, 1.03rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.015em;
  color: #b4bcc8;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
  max-width: 92vw;
  opacity: 0;
  transform: translateY(8px);
  animation: efFadeUpSoft 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.54s forwards;
}

/* --- Neon Progress Bar + Surface Reflection --- */
.ef-loader__progress-wrap {
  position: relative;
  width: min(460px, 88vw);
  margin-top: clamp(28px, 4.4vh, 40px);
  opacity: 0;
  transform: translateY(8px);
  animation: efFadeUpSoft 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.66s forwards;
}

.ef-loader__progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ef-loader__track {
  position: relative;
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(18, 20, 24, 0.95), rgba(34, 38, 45, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.85),
    0 0 14px rgba(255, 255, 255, 0.06),
    0 6px 18px rgba(255, 255, 255, 0.06);
  overflow: visible;
}

.ef-loader__bar {
  position: relative;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8e96a4 0%, #dce1ea 45%, #ffffff 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.85),
    0 0 10px rgba(255, 255, 255, 0.55),
    0 0 24px rgba(255, 255, 255, 0.25);
  overflow: hidden;
  will-change: width;
}

/* Leading-edge bright white neon spark following progress */
.ef-loader__bar::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 14px;
  height: 14px;
  transform: translate(35%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, rgba(255, 255, 255, 0.75) 35%, transparent 72%);
  pointer-events: none;
}

/* Continuous traveling specular pulse along the bar */
.ef-loader__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.85) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: efBarSheen 1.65s ease-in-out infinite;
}

.ef-loader__percent {
  min-width: 46px;
  text-align: right;
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  color: #eef1f6;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.28);
}

/* --- Dynamic Status Text --- */
.ef-loader__status {
  margin: 15px 0 0;
  min-height: 1.4em;
  font-size: clamp(0.72rem, 1.3vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ef-silver-muted);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.12);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.ef-loader__status.is-switching {
  opacity: 0.25;
  transform: translateY(2px);
}

/* --------------------------------------------------------------------------
   Keyframes (GPU-accelerated transforms & opacities)
   -------------------------------------------------------------------------- */
@keyframes efFacetDriftA {
  0% {
    transform: skewX(-34deg) translate3d(0, 0, 0);
  }
  100% {
    transform: skewX(-34deg) translate3d(18px, -14px, 0);
  }
}

@keyframes efFacetDriftB {
  0% {
    transform: skewX(-34deg) translate3d(0, 0, 0);
  }
  100% {
    transform: skewX(-34deg) translate3d(-16px, 14px, 0);
  }
}

@keyframes efBeamExpand {
  to {
    transform: translate(-50%, -50%) scaleX(1);
  }
}

@keyframes efBrandReveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes efLoaderNeonBreath {
  0%,
  100% {
    text-shadow:
      1px 1px 0 #9aa1ae,
      2px 2px 0 #6e7684,
      3px 3px 0 #484e5a,
      4px 4px 0 #262a32,
      6px 8px 16px rgba(0, 0, 0, 0.92),
      0 0 11px rgba(255, 255, 255, 0.34),
      0 0 26px rgba(255, 255, 255, 0.14);
  }
  50% {
    text-shadow:
      1px 1px 0 #9aa1ae,
      2px 2px 0 #6e7684,
      3px 3px 0 #484e5a,
      4px 4px 0 #262a32,
      6px 8px 16px rgba(0, 0, 0, 0.92),
      0 0 16px rgba(255, 255, 255, 0.5),
      0 0 36px rgba(255, 255, 255, 0.22);
  }
}

@keyframes efBrandLightSweep {
  0% {
    background-position: 145% 0;
  }
  58%,
  100% {
    background-position: -65% 0;
  }
}

@keyframes efFadeUpSoft {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes efOwnerSubtleFloat {
  0%,
  100% {
    transform: translateY(0);
    letter-spacing: 0.38em;
    color: #cfd5df;
  }
  50% {
    transform: translateY(-1.5px);
    letter-spacing: 0.41em;
    color: #f0f4f9;
  }
}

@keyframes efBarSheen {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(220%);
  }
}

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .ef-loader {
    padding: 20px 18px;
  }

  .ef-loader__facet--tl,
  .ef-loader__facet--br {
    opacity: 0.45;
  }

  .ef-loader__facet--mid-l,
  .ef-loader__facet--mid-r {
    display: none;
  }

  .ef-loader__brand {
    font-size: clamp(1.36rem, 6.2vw, 2.1rem);
    letter-spacing: 0.04em;
    text-shadow:
      1px 1px 0 #8d94a0,
      2px 2px 0 #555c67,
      3px 3px 0 #262a31,
      4px 5px 12px rgba(0, 0, 0, 0.9),
      0 0 10px rgba(255, 255, 255, 0.35);
  }

  .ef-loader__owner {
    letter-spacing: 0.26em;
    text-indent: 0.26em;
  }

  .ef-loader__progress-row {
    gap: 10px;
  }

  .ef-loader__percent {
    min-width: 42px;
    font-size: 0.82rem;
  }

  .ef-loader__status {
    letter-spacing: 0.1em;
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ef-loader__facet {
    animation: none;
  }

  .ef-loader__brand,
  .ef-loader__owner-row,
  .ef-loader__slogan,
  .ef-loader__progress-wrap {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .ef-loader__logo-beam {
    animation: none;
    transform: translate(-50%, -50%) scaleX(1);
  }

  .ef-loader__brand::after,
  .ef-loader__owner,
  .ef-loader__owner::after,
  .ef-loader__bar::after {
    animation: none;
  }
}
