/* ArmorFire signature logo loader */
.ctn-preloader {
  --loader-progress: 0deg;
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  cursor: default;
  background:
    radial-gradient(circle at 50% 43%, rgba(255, 188, 77, 0.16), transparent 24%),
    radial-gradient(circle at 50% 54%, rgba(211, 0, 16, 0.28), transparent 40%),
    linear-gradient(145deg, #040406 0%, #111319 52%, #060608 100%);
  font-family: "Poppins", "Montserrat", sans-serif;
}

.ctn-preloader::before,
.ctn-preloader::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ctn-preloader::before {
  z-index: 11;
  background:
    linear-gradient(120deg, transparent 0 43%, rgba(255, 255, 255, 0.08) 50%, transparent 57% 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.032) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 84px);
  mask-image: radial-gradient(circle at center, #000 0%, transparent 74%);
  animation: loaderScreenGlide 3s ease-in-out infinite;
  opacity: 0.55;
}

.ctn-preloader::after {
  z-index: 12;
  background: conic-gradient(from 0deg, transparent, rgba(211, 0, 16, 0.18), transparent, rgba(255, 188, 77, 0.12), transparent);
  animation: loaderBackdropSpin 12s linear infinite;
  opacity: 0.58;
}

#preloader-canvas {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.38;
}

.fire-energy-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 13;
  width: min(78vw, 660px);
  height: min(78vw, 660px);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 188, 77, 0.18), rgba(231, 48, 34, 0.22) 34%, transparent 70%);
  filter: blur(5px);
  transform: translate(-50%, -50%);
  animation: loaderCorePulse 2.2s ease-in-out infinite alternate;
}

.fire-radial-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 13;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.ring-1 {
  width: 270px;
  height: 270px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ring-2 {
  width: 405px;
  height: 405px;
  border: 1px dashed rgba(255, 188, 77, 0.24);
  animation: loaderLargeRing 22s linear infinite;
}

.ring-3 {
  width: 560px;
  height: 560px;
  border: 1px solid rgba(231, 48, 34, 0.18);
  box-shadow: inset 0 0 64px rgba(231, 48, 34, 0.08);
}

.cinematic-reveal-wrapper {
  position: relative;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(90vw, 440px);
  text-align: center;
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.77, 0, 0.175, 1), filter 0.5s ease;
}

.fire-hud-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 310px;
  height: 310px;
  margin-bottom: 34px;
}

.fire-hud-container::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 48px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 30px 95px rgba(0, 0, 0, 0.36);
  transform: rotate(45deg);
}

.logo-progress-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(#ffbc4d 0 var(--loader-progress), rgba(255, 255, 255, 0.1) var(--loader-progress) 360deg);
  filter: drop-shadow(0 0 24px rgba(255, 188, 77, 0.5));
  mask: radial-gradient(circle, transparent 0 128px, #000 129px 138px, transparent 139px);
  -webkit-mask: radial-gradient(circle, transparent 0 128px, #000 129px 138px, transparent 139px);
}

.logo-progress-ring::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.logo-corner {
  position: absolute;
  z-index: 7;
  width: 38px;
  height: 38px;
  border-color: rgba(255, 255, 255, 0.78);
  filter: drop-shadow(0 0 16px rgba(231, 48, 34, 0.5));
}

.corner-tl {
  top: 42px;
  left: 42px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.corner-tr {
  top: 42px;
  right: 42px;
  border-top: 2px solid;
  border-right: 2px solid;
}

.corner-br {
  right: 42px;
  bottom: 42px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.corner-bl {
  left: 42px;
  bottom: 42px;
  border-left: 2px solid;
  border-bottom: 2px solid;
}

.vortex-ring-outer {
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  animation: loaderPetalOrbit 4.8s linear infinite;
}

.vortex-ring-outer span {
  position: absolute;
  left: 50%;
  top: -6px;
  width: 16px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffbc4d, #e73022 62%, transparent);
  box-shadow: 0 0 20px rgba(231, 48, 34, 0.7);
  transform-origin: 50% 161px;
}

.vortex-ring-outer span:nth-child(1) {
  transform: translateX(-50%) rotate(0deg);
}

.vortex-ring-outer span:nth-child(2) {
  transform: translateX(-50%) rotate(120deg);
}

.vortex-ring-outer span:nth-child(3) {
  transform: translateX(-50%) rotate(240deg);
}

.vortex-ring-inner {
  position: absolute;
  inset: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 0 34px rgba(231, 48, 34, 0.18),
    0 0 34px rgba(255, 188, 77, 0.12);
}

.vortex-ring-inner::before,
.vortex-ring-inner::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.14);
}

.vortex-ring-inner::before {
  left: 50%;
  top: 12px;
  bottom: 12px;
  width: 1px;
}

.vortex-ring-inner::after {
  top: 50%;
  left: 12px;
  right: 12px;
  height: 1px;
}

.fire-shield-emblem {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 188px;
  height: 188px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 245, 247, 0.95));
  box-shadow:
    0 0 0 9px rgba(255, 255, 255, 0.05),
    0 0 0 18px rgba(231, 48, 34, 0.08),
    0 30px 80px rgba(0, 0, 0, 0.52),
    0 0 55px rgba(231, 48, 34, 0.5);
  animation: loaderLogoFloat 1.7s ease-in-out infinite alternate;
}

.fire-shield-emblem::before {
  content: "";
  position: absolute;
  top: -35%;
  left: -65%;
  z-index: 3;
  width: 42%;
  height: 170%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  transform: rotate(18deg);
  animation: loaderLogoShine 1.9s ease-in-out infinite;
}

.fire-shield-emblem::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(211, 0, 16, 0.16);
  border-radius: 26px;
  pointer-events: none;
}

.fire-hud-logo {
  position: relative;
  z-index: 2;
  width: 150px;
  max-width: 150px;
  max-height: 126px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.16));
}

.cyber-progress-hud {
  width: min(100%, 330px);
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 44px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hud-bar-wrapper {
  position: relative;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.hud-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d30010 0%, #e73022 48%, #ffbc4d 100%);
  box-shadow: 0 0 18px rgba(255, 188, 77, 0.62);
  transition: width 0.1s linear;
}

.hud-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 9px;
}

.hud-status-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hud-status-text i {
  color: #ffbc4d;
}

.hud-percent-num {
  color: #ffffff;
  font: 900 1.12rem/1 "Montserrat", sans-serif;
}

.hud-percent-num small {
  margin-left: 1px;
  color: #ffbc4d;
  font-size: 0.74rem;
}

.ctn-preloader .loader {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.ctn-preloader .loader .loader-panel {
  position: absolute;
  top: 0;
  z-index: 2;
  width: 51vw;
  height: 100vh;
  background: #050608;
  transition: transform 0.86s cubic-bezier(0.77, 0, 0.175, 1);
}

.ctn-preloader .loader .panel-left {
  left: 0;
}

.ctn-preloader .loader .panel-right {
  right: 0;
}

.ctn-preloader.loaded .cinematic-reveal-wrapper {
  opacity: 0;
  filter: blur(8px);
  transform: scale(1.08);
}

.ctn-preloader.loaded #preloader-canvas,
.ctn-preloader.loaded .fire-energy-core,
.ctn-preloader.loaded .fire-radial-ring {
  opacity: 0;
  transition: opacity 0.42s ease;
}

.ctn-preloader.loaded .loader .panel-left {
  transform: translateX(-100%);
}

.ctn-preloader.loaded .loader .panel-right {
  transform: translateX(100%);
}

@keyframes loaderScreenGlide {
  0%, 35% {
    transform: translateX(-16%);
  }
  100% {
    transform: translateX(16%);
  }
}

@keyframes loaderBackdropSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loaderCorePulse {
  0% {
    opacity: 0.62;
    transform: translate(-50%, -50%) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes loaderLargeRing {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes loaderPetalOrbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loaderLogoFloat {
  0% {
    transform: translateY(0) scale(0.985);
  }
  100% {
    transform: translateY(-8px) scale(1.03);
  }
}

@keyframes loaderLogoShine {
  0%, 35% {
    left: -65%;
  }
  100% {
    left: 130%;
  }
}

@media screen and (max-width: 767px) {
  .fire-hud-container {
    width: 236px;
    height: 236px;
    margin-bottom: 26px;
  }

  .fire-hud-container::before {
    inset: 18px;
    border-radius: 36px;
  }

  .logo-progress-ring {
    mask: radial-gradient(circle, transparent 0 94px, #000 95px 102px, transparent 103px);
    -webkit-mask: radial-gradient(circle, transparent 0 94px, #000 95px 102px, transparent 103px);
  }

  .logo-corner {
    width: 30px;
    height: 30px;
  }

  .corner-tl,
  .corner-tr {
    top: 32px;
  }

  .corner-br,
  .corner-bl {
    bottom: 32px;
  }

  .corner-tl,
  .corner-bl {
    left: 32px;
  }

  .corner-tr,
  .corner-br {
    right: 32px;
  }

  .vortex-ring-outer {
    inset: 20px;
  }

  .vortex-ring-outer span {
    height: 34px;
    transform-origin: 50% 122px;
  }

  .vortex-ring-inner {
    inset: 34px;
  }

  .fire-shield-emblem {
    width: 146px;
    height: 146px;
    border-radius: 24px;
  }

  .fire-shield-emblem::after {
    border-radius: 18px;
  }

  .fire-hud-logo {
    width: 116px;
    max-width: 116px;
    max-height: 98px;
  }

  .cyber-progress-hud {
    width: min(88vw, 310px);
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ctn-preloader::before,
  .ctn-preloader::after,
  .fire-energy-core,
  .ring-2,
  .vortex-ring-outer,
  .fire-shield-emblem,
  .fire-shield-emblem::before {
    animation: none;
  }
}
