#phantom-boot-loader {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background-color: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s ease, transform 0.6s ease;
  user-select: none;
  -webkit-user-select: none;
}

#phantom-boot-loader.pbl-fade-out {
  opacity: 0 !important;
  pointer-events: none !important;
  filter: blur(8px) !important;
  transform: scale(1.03);
}

.pbl-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Black-first: nothing paints until the logo has fully decoded and the
     loading screen is explicitly revealed (see .pbl-ready below). */
  opacity: 0;
}

#phantom-boot-loader.pbl-ready .pbl-content {
  opacity: 1;
  animation: pblFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pbl-logo-wrap {
  margin-bottom: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pbl-logo {
  width: 340px;
  max-width: 78vw;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 25px rgba(250, 204, 21, 0.35)) drop-shadow(0 0 50px rgba(0, 255, 180, 0.25));
  animation: pblLogoPulse 3s ease-in-out infinite alternate;
}

.pbl-progress-container {
  width: 220px;
  max-width: 65vw;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

.pbl-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #00ffa3 0%, #00e5ff 100%);
  box-shadow: 0 0 14px rgba(0, 255, 163, 0.85), 0 0 28px rgba(0, 229, 255, 0.5);
  transition: width 0.08s ease-out;
}

.pbl-percentage {
  color: #00ffa3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  font-weight: 500;
  margin-top: 14px;
  letter-spacing: 0.25em;
  text-shadow: 0 0 10px rgba(0, 255, 163, 0.6);
  opacity: 0.9;
}

@keyframes pblFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
  }
}

@keyframes pblLogoPulse {
  0% {
    filter: drop-shadow(0 0 20px rgba(250, 204, 21, 0.3)) drop-shadow(0 0 40px rgba(0, 255, 180, 0.2));
    transform: scale(1);
  }
  100% {
    filter: drop-shadow(0 0 35px rgba(250, 204, 21, 0.55)) drop-shadow(0 0 65px rgba(0, 255, 180, 0.35));
    transform: scale(1.018);
  }
}
