.ghost-boot-loader {
  --loader-bg-deep: #050505;
  --loader-bg-base: #0a0a0a;
  --loader-purple-core: #ffffff;
  --loader-purple-inner: #9b8bb5;
  --loader-purple-outer: #6b5b95;
  --loader-purple-glow: rgba(107, 91, 149, 0.4);
  --loader-gold: #d4a574;
  --loader-gold-glow: rgba(212, 165, 116, 0.3);
  --loader-cyan: #00e5ff;
  --loader-cyan-glow: rgba(0, 229, 255, 0.4);
  --loader-text-main: #f0f0f0;
  --loader-text-dim: rgba(240, 240, 240, 0.44);
  --loader-text-dark: rgba(240, 240, 240, 0.16);
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 250px;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
  padding: 40px;
  color: var(--loader-text-main);
  background:
    radial-gradient(circle at 50% 50%, var(--loader-bg-base) 0%, var(--loader-bg-deep) 100%);
  font-family: "JetBrains Mono", "Space Mono", monospace;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 900ms ease, visibility 900ms ease;
}

.ghost-boot-loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ghost-boot-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  opacity: 0.38;
  pointer-events: none;
}

.ghost-boot-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, transparent, var(--loader-purple-glow), transparent) 12vw 0 / 30vw 100% no-repeat,
    linear-gradient(to right, transparent, var(--loader-purple-glow), transparent) 58vw 0 / 30vw 100% no-repeat;
  opacity: 0.17;
  filter: blur(58px);
  animation: bootAmbientPulse 8s ease-in-out infinite alternate;
}

.boot-header,
.boot-footer,
.boot-data,
.boot-stage {
  position: relative;
  z-index: 3;
}

.boot-header {
  grid-column: 1 / 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.boot-brand-title {
  color: var(--loader-text-main);
  font-family: "Cinzel", "Rajdhani", sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.3em;
  line-height: 1;
  margin-bottom: 9px;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.24);
}

.boot-brand-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--loader-gold);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.boot-brand-subtitle::before {
  content: "";
  width: 12px;
  height: 2px;
  background: var(--loader-gold);
}

.boot-clock {
  color: var(--loader-text-dim);
  font-size: 12px;
  line-height: 1.7;
  text-align: right;
}

.boot-data {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
}

.boot-left {
  grid-column: 1;
  align-items: flex-start;
}

.boot-right {
  grid-column: 3;
  align-items: flex-end;
  text-align: right;
}

.boot-data-block {
  width: 100%;
}

.boot-log-block,
.boot-memory {
  flex-grow: 1;
}

.boot-memory {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.boot-label {
  color: var(--loader-cyan);
  font-family: "Rajdhani", "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.4em;
  margin-bottom: 8px;
  opacity: 0.84;
  text-transform: uppercase;
}

.boot-value {
  color: var(--loader-text-main);
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.boot-value span {
  color: var(--loader-text-dim);
}

.boot-value.small {
  font-size: 10px;
  line-height: 2;
}

.boot-cyan {
  color: var(--loader-cyan) !important;
}

.boot-gold {
  color: var(--loader-gold) !important;
}

.boot-log-stream {
  height: 122px;
  overflow: hidden;
  color: var(--loader-text-dim);
  font-size: 10px;
  line-height: 1.8;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.boot-log-line {
  display: flex;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px);
  animation: bootSlideUpFade 0.3s forwards;
}

.boot-log-hex {
  color: var(--loader-purple-inner);
}

.boot-log-msg {
  color: var(--loader-text-dim);
}

.boot-log-status {
  margin-left: auto;
  color: var(--loader-gold);
}

.boot-stage {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.boot-orb-container {
  position: relative;
  width: clamp(440px, 42vw, 640px);
  height: clamp(440px, 42vw, 640px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 60px;
}

.boot-orb-core,
.boot-orb-aura,
.boot-orb-field {
  position: absolute;
  border-radius: 50%;
}

.boot-orb-core {
  z-index: 4;
  width: clamp(190px, 16vw, 240px);
  height: clamp(190px, 16vw, 240px);
  background: radial-gradient(circle, var(--loader-purple-core) 0%, var(--loader-purple-inner) 40%, transparent 80%);
  box-shadow: 0 0 40px var(--loader-purple-core), inset 0 0 20px #fff;
  mix-blend-mode: screen;
  animation: bootCorePulse 4s ease-in-out infinite alternate;
}

.boot-orb-aura {
  z-index: 3;
  width: clamp(340px, 31vw, 480px);
  height: clamp(340px, 31vw, 480px);
  background: radial-gradient(circle, var(--loader-purple-inner) 0%, var(--loader-purple-outer) 50%, transparent 70%);
  filter: blur(20px);
  opacity: 0.6;
  animation: bootAuraBreathe 6s ease-in-out infinite alternate;
}

.boot-orb-field {
  z-index: 2;
  width: clamp(440px, 42vw, 640px);
  height: clamp(440px, 42vw, 640px);
  border: 1px solid rgba(107, 91, 149, 0.2);
  background-image: conic-gradient(from 0deg, transparent 0deg, rgba(107, 91, 149, 0.12) 90deg, transparent 180deg);
  box-shadow: 0 0 120px var(--loader-purple-glow);
  animation: bootRotateField 20s linear infinite;
}

.boot-orb-field::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px dashed rgba(0, 229, 255, 0.12);
  border-radius: 50%;
  animation: bootRotateField 30s linear infinite reverse;
}

.boot-particles {
  position: absolute;
  inset: -50px;
  z-index: 5;
  pointer-events: none;
}

.boot-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--loader-cyan);
  box-shadow: 0 0 4px var(--loader-cyan);
  opacity: 0;
}

.boot-progress {
  width: min(560px, 78vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.boot-status {
  color: var(--loader-text-main);
  font-family: "Rajdhani", "JetBrains Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.3em;
  text-align: center;
  text-transform: uppercase;
  animation: bootFlicker 4s infinite;
}

.boot-bar-wrap {
  position: relative;
  width: 100%;
  height: 2px;
  background: var(--loader-text-dark);
}

.boot-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 0%;
  height: 100%;
  background: var(--loader-gold);
  box-shadow: 0 0 10px var(--loader-gold-glow);
  transition: width 0.12s linear;
}

.boot-bar-head {
  position: absolute;
  right: 0;
  top: 50%;
  width: 4px;
  height: 12px;
  transform: translateY(-50%);
  background: var(--loader-cyan);
  box-shadow: 0 0 15px var(--loader-cyan-glow);
}

.boot-numbers {
  width: 100%;
  display: flex;
  justify-content: space-between;
  color: var(--loader-gold);
  font-size: 11px;
}

.boot-footer {
  grid-column: 1 / 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  color: var(--loader-text-dark);
  font-size: 10px;
}

@keyframes bootAmbientPulse {
  0% { opacity: 0.12; }
  100% { opacity: 0.26; }
}

@keyframes bootCorePulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.05); opacity: 1; }
}

@keyframes bootAuraBreathe {
  0% { transform: scale(0.9); opacity: 0.4; }
  100% { transform: scale(1.1); opacity: 0.72; }
}

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

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

@keyframes bootFlicker {
  0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
    opacity: 1;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
  }
  20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
    opacity: 0.4;
    text-shadow: none;
  }
}

@media (max-width: 820px) {
  .ghost-boot-loader {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    padding: 24px;
  }

  .boot-header,
  .boot-footer,
  .boot-stage {
    grid-column: 1;
  }

  .boot-header {
    flex-direction: column;
  }

  .boot-clock,
  .boot-data,
  .boot-footer {
    display: none;
  }

  .boot-orb-container {
    width: 340px;
    height: 340px;
    margin-bottom: 42px;
  }

  .boot-orb-field {
    width: 340px;
    height: 340px;
  }

  .boot-orb-aura {
    width: 275px;
    height: 275px;
  }

  .boot-orb-core {
    width: 138px;
    height: 138px;
  }
}
