#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f0ebff 0%, #faf8ff 50%, #ffe8df 100%);
  transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1), visibility 0.55s ease;
}

/* Ambient blobs */
#page-loader::before,
#page-loader::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: pl-blob 6s ease-in-out infinite alternate;
}
#page-loader::before {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(94,23,235,0.18) 0%, transparent 70%);
  top: -80px;
  left: -80px;
}
#page-loader::after {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255,107,53,0.14) 0%, transparent 70%);
  bottom: -60px;
  right: -60px;
  animation-delay: 3s;
}

@keyframes pl-blob {
  0%   { transform: scale(1) translate(0,0); }
  100% { transform: scale(1.15) translate(30px, 20px); }
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Card */
.pl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 48px 36px;
  border-radius: 28px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 4px 24px rgba(94,23,235,0.10),
    0 1px 4px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.7);
}

/* Logo */
.pl-logo {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  object-fit: contain;
  margin-bottom: 28px;
  filter: drop-shadow(0 4px 16px rgba(94,23,235,0.25));
  animation: pl-float 3s ease-in-out infinite;
}

@keyframes pl-float {
  0%, 100% { transform: translateY(0);   }
  50%       { transform: translateY(-6px); }
}

/* Spinner ring */
.pl-ring {
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
}

.pl-ring svg {
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}

.pl-ring circle {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
}

.pl-ring .track {
  stroke: rgba(94,23,235,0.10);
}

.pl-ring .arc {
  stroke: url(#pl-grad);
  stroke-dasharray: 126;
  stroke-dashoffset: 126;
  animation: pl-arc 1.5s cubic-bezier(0.4,0,0.2,1) infinite;
}

@keyframes pl-arc {
  0%   { stroke-dashoffset: 126; opacity: 1; }
  55%  { stroke-dashoffset: 0;   opacity: 1; }
  75%  { stroke-dashoffset: 0;   opacity: 0.25; }
  100% { stroke-dashoffset: 126; opacity: 1; }
}

/* Brand label */
.pl-brand {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 20px;
  opacity: 0.8;
}

/* Progress bar */
.pl-bar-wrap {
  width: 160px;
  height: 3px;
  background: rgba(94,23,235,0.10);
  border-radius: 99px;
  overflow: hidden;
}

.pl-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), --brand-dark);
  animation: pl-progress 2s cubic-bezier(0.4,0,0.2,1) infinite;
}

@keyframes pl-progress {
  0%   { width: 0%;   margin-left: 0%; }
  50%  { width: 70%;  margin-left: 15%; }
  100% { width: 0%;   margin-left: 100%; }
}
