:root {
  --entry-void: #03070c;
  --entry-panel: #08111c;
  --entry-line: #243a58;
  --entry-blue: #557dff;
  --entry-signal: #b8ff3d;
  --entry-text: #f5f8fc;
  --entry-muted: #74869e;
}

html:has(.entryLoading),
body:has(.entryLoading) {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--entry-void);
}

.entryLoading {
  --entry-progress: 4%;
  position: fixed;
  z-index: 99999;
  inset: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  color: var(--entry-text);
  background:
    radial-gradient(circle at 72% 12%, rgba(48, 80, 190, .28), transparent 32rem),
    radial-gradient(circle at 22% 88%, rgba(184, 255, 61, .055), transparent 24rem),
    var(--entry-void);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-sizing: border-box;
  opacity: 1;
  transition: opacity .46s ease, visibility .46s ease;
}

.entryLoading,
.entryLoading * { box-sizing: border-box; }

.entryLoading::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .28;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(91, 125, 176, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 125, 176, .13) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at center, #000, transparent 78%);
}

.entryLoading::after {
  content: "";
  position: absolute;
  inset: -50% 0 auto;
  height: 32%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(96, 131, 255, .065), transparent);
  animation: entryScan 4.8s linear infinite;
}

.entryBootCard {
  position: relative;
  width: min(540px, 100%);
  min-height: 410px;
  display: flex;
  flex-direction: column;
  padding: 18px 22px 20px;
  border: 1px solid var(--entry-line);
  background: linear-gradient(145deg, rgba(9, 18, 30, .98), rgba(4, 10, 17, .98));
  box-shadow: 0 42px 120px rgba(0, 0, 0, .58), 0 0 60px rgba(55, 91, 210, .1);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  transform: translateY(0) scale(1);
  transition: transform .46s ease, filter .46s ease;
}

.entryLoading.entryReady .entryBootCard { filter: brightness(1.12); }
.entryLoading.entryLeaving { opacity: 0; visibility: hidden; }
.entryLoading.entryLeaving .entryBootCard { transform: translateY(-10px) scale(.985); }

.entryBootCard::before,
.entryBootCard::after {
  content: "";
  position: absolute;
  width: 52px;
  height: 52px;
  pointer-events: none;
}

.entryBootCard::before { top: 9px; left: 9px; border-top: 1px solid rgba(184, 255, 61, .5); border-left: 1px solid rgba(184, 255, 61, .5); }
.entryBootCard::after { right: 9px; bottom: 9px; border-right: 1px solid rgba(85, 125, 255, .58); border-bottom: 1px solid rgba(85, 125, 255, .58); }

.entryBootTop,
.entryBootBottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--entry-muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.entryBootStatus { display: inline-flex; align-items: center; gap: 7px; color: #a8b6c8; }
.entryBootStatus i { width: 6px; height: 6px; border-radius: 50%; background: var(--entry-signal); box-shadow: 0 0 13px var(--entry-signal); animation: entryPulse 1.35s ease-in-out infinite; }

.entryBootCore {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 24px 0 27px;
  text-align: center;
}

.entryLogoOrbit {
  position: relative;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.entryLogoOrbit::before,
.entryLogoOrbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.entryLogoOrbit::before {
  inset: 0;
  border: 1px solid rgba(85, 125, 255, .48);
  border-top-color: var(--entry-signal);
  border-right-color: transparent;
  animation: entryRotate 2.8s linear infinite;
}

.entryLogoOrbit::after {
  inset: 11px;
  border: 1px dashed rgba(118, 148, 201, .35);
  animation: entryRotate 5s linear infinite reverse;
}

.entryLogoOrbit img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border: 1px solid #4a6390;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(5, 12, 20, .92), 0 0 42px rgba(66, 104, 230, .28);
}

.entryBootKicker {
  margin: 0 0 8px;
  color: var(--entry-signal);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}

.entryBootCore h1 {
  margin: 0;
  color: var(--entry-text);
  font-family: "Arial Black", "Segoe UI", sans-serif;
  font-size: clamp(28px, 6vw, 42px);
  line-height: .98;
  letter-spacing: -.045em;
  text-transform: uppercase;
}

.entryBootCore h1 em { color: var(--entry-blue); font-style: normal; }

.entryProgress {
  position: relative;
  width: min(310px, 82%);
  height: 5px;
  overflow: hidden;
  margin: 24px 0 11px;
  border: 1px solid #263b58;
  background: #040a11;
}

.entryProgress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--entry-progress);
  background: linear-gradient(90deg, transparent, var(--entry-blue) 36%, var(--entry-signal));
  box-shadow: 0 0 18px rgba(184, 255, 61, .38);
  transition: width .32s ease;
}

.entryProgress i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.58), transparent);
  transform: translateX(-100%);
  animation: entryProgressShine 1.35s ease-in-out infinite;
}

.entryBootLoadingLine {
  width: min(310px, 82%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.entryBootMessage {
  margin: 0;
  color: #899bb3;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: left;
}

.entryBootPercent {
  color: var(--entry-signal);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.entryBootDots::after { content: ""; display: inline-block; width: 2.2em; text-align: left; animation: entryDots 1.4s steps(4, end) infinite; }
.entryBootBottom { padding-top: 14px; border-top: 1px solid rgba(87, 116, 158, .18); font-size: 8px; }
.entryBootBottom span:last-child { color: #61738c; }

@keyframes entryRotate { to { transform: rotate(360deg); } }
@keyframes entryPulse { 50% { opacity: .35; box-shadow: 0 0 4px var(--entry-signal); } }
@keyframes entryProgressShine { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }
@keyframes entryScan { to { transform: translateY(470%); } }
@keyframes entryDots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75%, 100% { content: "..."; } }

@media (max-width: 560px) {
  .entryLoading { padding: 13px; }
  .entryBootCard { min-height: 390px; padding: 16px 15px 17px; }
  .entryBootTop { font-size: 7px; }
  .entryBootCore { padding-inline: 4px; }
  .entryLogoOrbit { width: 104px; height: 104px; }
  .entryLogoOrbit img { width: 69px; height: 69px; }
  .entryBootBottom { font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .entryLoading::after,
  .entryLogoOrbit::before,
  .entryLogoOrbit::after,
  .entryBootStatus i,
  .entryProgress i,
  .entryBootDots::after,
  .entryProgress i::after { animation-duration: 8s; }
}
