.entry-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  gap: 16px;
  align-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 43%, rgba(124, 58, 237, 0.08), transparent 24%),
    #ffffff;
  color: #0f172a;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0s linear 0.24s;
  animation: entryLoaderFailsafe 0.28s ease 2.8s forwards;
}

.entry-loader.is-exiting {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.entry-loader__mark {
  position: relative;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(145deg, #8b5cf6, #6d28d9);
  box-shadow: 0 20px 55px rgba(109, 40, 217, 0.24);
  will-change: transform, box-shadow;
  animation:
    entryLogoArrive 0.46s cubic-bezier(0.2, 0.8, 0.2, 1) both,
    entryLogoPulse 1.15s ease-in-out 0.48s infinite;
}

.entry-loader__mark::before {
  content: "";
  position: absolute;
  inset: -4px;
  z-index: -1;
  border-radius: 24px;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(124, 58, 237, 0.16) 95deg, transparent 170deg, transparent 360deg);
  animation: entryLogoSweep 1.05s linear infinite;
}

.entry-loader__mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 16px;
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.18) 38%, transparent 56%);
  transform: translateX(-130%);
  animation: entryLogoGlint 1.25s ease-in-out infinite;
  pointer-events: none;
}

.entry-loader__mark img {
  position: relative;
  z-index: 1;
  width: 50px;
  height: 50px;
  display: block;
  object-fit: contain;
}

.entry-loader__copy {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  animation: entryCopyIn 0.36s ease 0.08s both;
}

.entry-loader__copy strong {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: 0;
}

.entry-loader__copy span {
  position: relative;
  width: 48px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: #ede9fe;
}

.entry-loader__copy span::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 42%;
  border-radius: inherit;
  background: #7c3aed;
  animation: entryLoaderLine 0.9s ease-in-out infinite;
}

@keyframes entryLogoArrive {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes entryLogoPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 20px 55px rgba(109, 40, 217, 0.24);
  }
  50% {
    transform: translateY(-2px) scale(1.035);
    box-shadow: 0 24px 68px rgba(109, 40, 217, 0.3);
  }
}

@keyframes entryLogoSweep {
  to {
    transform: rotate(360deg);
  }
}

@keyframes entryLogoGlint {
  0%,
  40% {
    transform: translateX(-130%);
    opacity: 0;
  }
  64% {
    opacity: 1;
  }
  100% {
    transform: translateX(130%);
    opacity: 0;
  }
}

@keyframes entryCopyIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes entryLoaderLine {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(260%);
  }
}

@keyframes entryLoaderFailsafe {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry-loader {
    animation: entryLoaderFailsafe 0.12s ease 2.8s forwards !important;
    transition: opacity 0.12s ease, visibility 0s linear 0.12s;
  }

  .entry-loader__mark {
    animation-duration: 0.46s, 1.8s;
  }

  .entry-loader__mark::before {
    animation-duration: 1.8s;
  }
}
