.mn-hotrod-loader,
.mn-hotrod-loader * {
  box-sizing: border-box;
}

.mn-hotrod-loader[hidden] {
  display: none !important;
}

.mn-hotrod-loader {
  --mn-loader-car-left: -120px;
  --mn-loader-trail-left: 0px;
  --mn-loader-trail-width: 0px;
  --mn-loader-car-width: clamp(84px, 7.6vw, 120px);

  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 3px);
  z-index: 2147483000;
  height: clamp(62px, 7.2vw, 88px);
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
  contain: layout paint style;
}

.mn-hotrod-loader.is-running {
  opacity: 1;
  visibility: visible;
}

.mn-hotrod-loader__track {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

.mn-hotrod-loader__trail {
  position: absolute;
  left: var(--mn-loader-trail-left);
  bottom: 6px;
  width: var(--mn-loader-trail-width);
  height: 50px;
  overflow: hidden;
  opacity: 0;
  will-change: width, left;
  transition: opacity 120ms ease;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.35) 10px, #000 28px, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.35) 10px, #000 28px, #000 100%);
}

.mn-hotrod-loader.has-trail.is-finishing .mn-hotrod-loader__trail,
.mn-hotrod-loader.has-trail.is-trail-fading .mn-hotrod-loader__trail {
  opacity: 1;
}

.mn-hotrod-loader__trail-glow {
  position: absolute;
  left: 0;
  right: -8px;
  bottom: 2px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(233, 29, 15, 0) 0%, rgba(255, 93, 16, 0.18) 24%, rgba(255, 110, 18, 0.75) 72%, rgba(255, 227, 133, 0.95) 100%);
  filter: blur(8px);
  transition: opacity 760ms ease-out 180ms, filter 950ms ease-out 180ms;
}

.mn-hotrod-loader__trail-core {
  position: absolute;
  left: 0;
  right: -2px;
  bottom: 7px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(130, 12, 4, 0.15), rgba(226, 30, 11, 0.72) 34%, rgba(255, 82, 17, 0.96) 78%, rgba(255, 230, 151, 1));
  box-shadow: 0 0 6px rgba(255, 51, 14, 0.9), 0 0 14px rgba(255, 90, 18, 0.65), 0 0 22px rgba(255, 143, 47, 0.38);
  transition: opacity 720ms ease-out 180ms, filter 900ms ease-out 180ms;
}

.mn-hotrod-loader__trail-flames {
  position: absolute;
  inset: auto 0 5px 0;
  height: 36px;
  transform-origin: right bottom;
  background:
    radial-gradient(ellipse 30px 11px at 99% 88%, rgba(255, 247, 177, 0.98) 0 12%, rgba(255, 168, 39, 0.98) 25%, rgba(242, 66, 17, 0.82) 45%, transparent 74%),
    radial-gradient(ellipse 44px 14px at 88% 83%, rgba(255, 196, 72, 0.9) 0 12%, rgba(255, 90, 20, 0.82) 35%, transparent 74%),
    radial-gradient(ellipse 62px 15px at 72% 91%, rgba(255, 114, 20, 0.68) 0 14%, rgba(222, 28, 11, 0.48) 42%, transparent 78%),
    radial-gradient(ellipse 74px 13px at 45% 95%, rgba(212, 34, 10, 0.38) 0 13%, transparent 76%);
  filter: drop-shadow(0 0 6px rgba(255, 87, 18, 0.76));
  animation: mn-hotrod-flame-pulse 160ms ease-in-out infinite alternate;
  transition: opacity 760ms ease-out 180ms, filter 920ms ease-out 180ms;
}

.mn-hotrod-loader__trail-flames::before,
.mn-hotrod-loader__trail-flames::after {
  content: "";
  position: absolute;
  right: 4%;
  bottom: 2px;
  width: min(42vw, 520px);
  height: 27px;
  background:
    radial-gradient(ellipse 24px 8px at 92% 70%, rgba(255, 229, 123, 0.92), rgba(255, 91, 18, 0.74) 45%, transparent 72%),
    radial-gradient(ellipse 38px 9px at 74% 84%, rgba(255, 102, 20, 0.74), rgba(223, 29, 13, 0.46) 50%, transparent 76%),
    radial-gradient(ellipse 50px 8px at 46% 92%, rgba(234, 48, 14, 0.48), transparent 74%);
  opacity: 0.84;
  animation: mn-hotrod-flame-drift 420ms linear infinite;
}

.mn-hotrod-loader__trail-flames::after {
  right: 9%;
  bottom: -1px;
  opacity: 0.58;
  transform: scaleX(0.82) scaleY(0.76);
  animation-duration: 620ms;
  animation-direction: reverse;
}

.mn-hotrod-loader__trail-sparks,
.mn-hotrod-loader__trail-embers {
  position: absolute;
  inset: auto 0 6px 0;
  height: 34px;
  background-image:
    radial-gradient(circle, rgba(255, 228, 135, 0.95) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 143, 34, 0.88) 0 1.1px, transparent 2px),
    radial-gradient(circle, rgba(255, 63, 18, 0.9) 0 0.9px, transparent 1.7px);
  background-position: 8% 78%, 41% 90%, 76% 66%;
  background-size: 28px 28px, 42px 42px, 56px 56px;
  animation: mn-hotrod-sparks 520ms linear infinite;
  transition: opacity 820ms ease-out 160ms, filter 1000ms ease-out 160ms;
}

.mn-hotrod-loader__trail-embers {
  opacity: 0.46;
  filter: blur(0.4px);
  background-size: 44px 44px, 58px 58px, 72px 72px;
  animation-duration: 860ms;
  transition: opacity 1050ms ease-out 100ms, filter 1150ms ease-out 100ms;
}

.mn-hotrod-loader__trail-smoke {
  position: absolute;
  right: 2%;
  bottom: 8px;
  width: min(54vw, 580px);
  height: 36px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform-origin: right bottom;
  background:
    radial-gradient(ellipse 54px 15px at 92% 70%, rgba(240,240,240,0.48) 0 16%, rgba(188,188,188,0.26) 38%, transparent 72%),
    radial-gradient(ellipse 74px 17px at 72% 80%, rgba(225,225,225,0.34) 0 14%, rgba(165,165,165,0.18) 40%, transparent 74%),
    radial-gradient(ellipse 96px 15px at 42% 88%, rgba(205,205,205,0.24) 0 12%, transparent 72%);
  filter: blur(7px);
}

.mn-hotrod-loader__trail-smoke--b {
  right: 10%;
  bottom: 13px;
  transform: scaleX(0.82) scaleY(1.12);
  filter: blur(10px);
}

.mn-hotrod-loader.is-finishing .mn-hotrod-loader__trail-smoke--a {
  opacity: 0.34;
  animation: mn-hotrod-trail-smoke-live 720ms ease-in-out infinite alternate;
}

.mn-hotrod-loader.is-finishing .mn-hotrod-loader__trail-smoke--b {
  opacity: 0.22;
  animation: mn-hotrod-trail-smoke-live-b 920ms ease-in-out infinite alternate;
}

.mn-hotrod-loader.is-trail-fading .mn-hotrod-loader__trail-smoke--a {
  animation: mn-hotrod-trail-smoke-fade 1250ms ease-out forwards;
}

.mn-hotrod-loader.is-trail-fading .mn-hotrod-loader__trail-smoke--b {
  animation: mn-hotrod-trail-smoke-fade-b 1250ms ease-out forwards;
}

.mn-hotrod-loader.is-trail-fading .mn-hotrod-loader__trail-glow,
.mn-hotrod-loader.is-trail-fading .mn-hotrod-loader__trail-core,
.mn-hotrod-loader.is-trail-fading .mn-hotrod-loader__trail-flames,
.mn-hotrod-loader.is-trail-fading .mn-hotrod-loader__trail-sparks {
  opacity: 0;
  filter: blur(11px);
  animation: none;
}

.mn-hotrod-loader.is-trail-fading .mn-hotrod-loader__trail-embers {
  opacity: 0;
  filter: blur(3px);
}

.mn-hotrod-loader__car {
  position: absolute;
  left: var(--mn-loader-car-left);
  bottom: 6px;
  z-index: 5;
  width: var(--mn-loader-car-width);
  aspect-ratio: 256 / 110;
  opacity: 0;
  will-change: left, transform;
  filter: drop-shadow(0 5px 6px rgba(0,0,0,0.46)) drop-shadow(0 0 4px rgba(255, 80, 22, 0.18));
}

.mn-hotrod-loader.is-running .mn-hotrod-loader__car {
  opacity: 1;
  animation: mn-hotrod-body-shake 145ms ease-in-out infinite alternate;
}

.mn-hotrod-loader.is-burnout .mn-hotrod-loader__car {
  animation-duration: 95ms;
}

.mn-hotrod-loader.is-finishing .mn-hotrod-loader__car {
  animation-duration: 78ms;
}

.mn-hotrod-loader.is-trail-fading .mn-hotrod-loader__car {
  opacity: 0;
  animation: none;
  transition: opacity 100ms linear;
}

.mn-hotrod-loader__car img,
.mn-hotrod-loader__car svg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.mn-hotrod-loader__exhaust-fire {
  position: absolute;
  right: 93%;
  bottom: 18%;
  z-index: -1;
  width: clamp(24px, 3vw, 44px);
  height: clamp(9px, 1.2vw, 14px);
  border-radius: 100% 0 0 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(220, 37, 15, 0.55) 24%, rgba(255, 91, 18, 0.94) 66%, rgba(255, 233, 145, 1) 100%);
  filter: blur(1.25px) drop-shadow(0 0 5px rgba(255, 88, 18, 0.82));
  transform-origin: right center;
  opacity: 0;
}

.mn-hotrod-loader.is-finishing .mn-hotrod-loader__exhaust-fire {
  opacity: 1;
  animation: mn-hotrod-exhaust 110ms ease-in-out infinite alternate;
}

.mn-hotrod-loader__burnout-smoke,
.mn-hotrod-loader__burnout-dust {
  position: absolute;
  z-index: -2;
  opacity: 0;
  pointer-events: none;
}

.mn-hotrod-loader__burnout-smoke {
  right: 76%;
  bottom: 16%;
  width: 84px;
  height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 60% 50%, rgba(255,255,255,0.88) 0 22%, rgba(214,214,214,0.68) 35%, rgba(160,160,160,0.35) 56%, rgba(130,130,130,0.0) 76%),
    radial-gradient(ellipse at 34% 66%, rgba(248,248,248,0.74) 0 18%, rgba(195,195,195,0.5) 44%, rgba(160,160,160,0) 74%);
  filter: blur(7px);
  transform-origin: right center;
}

.mn-hotrod-loader__burnout-smoke--a { width: 74px; bottom: 14%; }
.mn-hotrod-loader__burnout-smoke--b { width: 98px; bottom: 26%; right: 82%; }
.mn-hotrod-loader__burnout-smoke--c { width: 62px; bottom: 6%; right: 70%; }

.mn-hotrod-loader__burnout-dust {
  right: 68%;
  bottom: 8%;
  width: 82px;
  height: 18px;
  background: radial-gradient(ellipse at 50% 50%, rgba(255,244,215,0.55) 0 25%, rgba(200,200,200,0.2) 52%, transparent 76%);
  filter: blur(4px);
}

.mn-hotrod-loader.is-burnout .mn-hotrod-loader__burnout-smoke,
.mn-hotrod-loader.is-burnout .mn-hotrod-loader__burnout-dust {
  opacity: 1;
}

.mn-hotrod-loader.is-burnout .mn-hotrod-loader__burnout-smoke--a {
  animation: mn-hotrod-smoke-a 920ms ease-out infinite;
}

.mn-hotrod-loader.is-burnout .mn-hotrod-loader__burnout-smoke--b {
  animation: mn-hotrod-smoke-b 1100ms ease-out infinite 100ms;
}

.mn-hotrod-loader.is-burnout .mn-hotrod-loader__burnout-smoke--c {
  animation: mn-hotrod-smoke-c 760ms ease-out infinite 150ms;
}

.mn-hotrod-loader.is-burnout .mn-hotrod-loader__burnout-dust {
  animation: mn-hotrod-dust 420ms ease-in-out infinite alternate;
}

.mn-hotrod-loader.is-finishing .mn-hotrod-loader__burnout-smoke,
.mn-hotrod-loader.is-finishing .mn-hotrod-loader__burnout-dust {
  opacity: 0.28;
}

.mn-hotrod-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

@keyframes mn-hotrod-flame-pulse {
  from { transform: scaleY(0.82) translateY(2px); opacity: 0.76; }
  to { transform: scaleY(1.14) translateY(-1px); opacity: 1; }
}

@keyframes mn-hotrod-flame-drift {
  from { transform: translateX(0) scaleY(0.92); }
  to { transform: translateX(-34px) scaleY(1.06); }
}

@keyframes mn-hotrod-sparks {
  from { transform: translateX(0) translateY(0); }
  to { transform: translateX(-34px) translateY(-2px); }
}

@keyframes mn-hotrod-body-shake {
  from { transform: translateY(0) rotate(-0.22deg); }
  to { transform: translateY(-1.1px) rotate(0.2deg); }
}

@keyframes mn-hotrod-exhaust {
  from { transform: scaleX(0.66) scaleY(0.82); opacity: 0.66; }
  to { transform: scaleX(1.22) scaleY(1.08); opacity: 1; }
}

@keyframes mn-hotrod-smoke-a {
  from { transform: translateX(0) translateY(0) scale(0.72); opacity: 0.72; }
  to { transform: translateX(-30px) translateY(-10px) scale(1.24); opacity: 0; }
}

@keyframes mn-hotrod-smoke-b {
  from { transform: translateX(0) translateY(0) scale(0.65); opacity: 0.64; }
  to { transform: translateX(-44px) translateY(-18px) scale(1.34); opacity: 0; }
}

@keyframes mn-hotrod-smoke-c {
  from { transform: translateX(0) translateY(0) scale(0.82); opacity: 0.58; }
  to { transform: translateX(-22px) translateY(-4px) scale(1.12); opacity: 0; }
}

@keyframes mn-hotrod-dust {
  from { transform: translateX(0) scaleX(0.92); opacity: 0.28; }
  to { transform: translateX(-8px) scaleX(1.08); opacity: 0.48; }
}

@keyframes mn-hotrod-trail-smoke-live {
  from { transform: translateX(0) translateY(0) scaleY(0.92); }
  to { transform: translateX(-12px) translateY(-3px) scaleY(1.08); }
}

@keyframes mn-hotrod-trail-smoke-live-b {
  from { transform: translateX(0) translateY(0) scaleX(0.82) scaleY(1.02); }
  to { transform: translateX(-16px) translateY(-5px) scaleX(0.9) scaleY(1.18); }
}

@keyframes mn-hotrod-trail-smoke-fade {
  from { opacity: 0.34; transform: translateX(0) translateY(0) scale(1); }
  to { opacity: 0; transform: translateX(-54px) translateY(-14px) scale(1.22); }
}

@keyframes mn-hotrod-trail-smoke-fade-b {
  from { opacity: 0.22; transform: translateX(0) translateY(0) scaleX(0.82) scaleY(1.12); }
  to { opacity: 0; transform: translateX(-72px) translateY(-20px) scaleX(1.08) scaleY(1.36); }
}

@media (max-width: 620px) {
  .mn-hotrod-loader {
    --mn-loader-car-width: clamp(72px, 21vw, 94px);
    height: 66px;
  }

  .mn-hotrod-loader__trail {
    height: 42px;
  }

  .mn-hotrod-loader__trail-flames {
    height: 29px;
  }

  .mn-hotrod-loader__burnout-smoke--b {
    right: 84%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mn-hotrod-loader__trail-flames,
  .mn-hotrod-loader__trail-flames::before,
  .mn-hotrod-loader__trail-flames::after,
  .mn-hotrod-loader__trail-sparks,
  .mn-hotrod-loader__trail-embers,
  .mn-hotrod-loader__trail-smoke,
  .mn-hotrod-loader__car,
  .mn-hotrod-loader__exhaust-fire,
  .mn-hotrod-loader__burnout-smoke,
  .mn-hotrod-loader__burnout-dust {
    animation: none !important;
  }
}
