/* POP LOADER CORE */
#egx-loader {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

/* POP-IN ANIMATION */
.egx-loader-inner {
  text-align: center;
  color: #fff;
  animation: egxPopIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes egxPopIn {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

/* QR POP */
.egx-loader-qr {
  width: 140px;
  margin-bottom: 18px;
  animation: egxFlash 0.6s ease-out;
}

@keyframes egxFlash {
  0%   { filter: brightness(0.2); }
  50%  { filter: brightness(2); }
  100% { filter: brightness(1); }
}

/* TEXT POP */
.egx-loader-text-main {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
  animation: egxTextPop 0.5s ease-out;
}

.egx-loader-text-sub {
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 20px;
  animation: egxTextPop 0.7s ease-out;
}

@keyframes egxTextPop {
  0%   { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ============================= */
/*      UPGRADED 3D CUBES        */
/* ============================= */

.egx-cubes {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}

.egx-cube {
  width: 22px;
  height: 22px;
  background: #ffcc33;
  border-radius: 4px;
  animation: egxCubeWave 0.6s infinite alternate ease-in-out,
             egxCubeGlow 1.2s infinite ease-in-out,
             egxCubeTilt 1.4s infinite ease-in-out;
  transform-style: preserve-3d;
}

.egx-cube:nth-child(2) {
  animation-delay: 0.15s;
}

.egx-cube:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes egxCubeWave {
  0%   { transform: translateY(0) scale(1); }
  100% { transform: translateY(-22px) scale(1.25); }
}

@keyframes egxCubeGlow {
  0%   { box-shadow: 0 0 6px #ffcc33; }
  50%  { box-shadow: 0 0 18px #ffcc33; }
  100% { box-shadow: 0 0 6px #ffcc33; }
}

@keyframes egxCubeTilt {
  0%   { transform: rotateX(0deg) rotateY(0deg); }
  50%  { transform: rotateX(20deg) rotateY(20deg); }
  100% { transform: rotateX(0deg) rotateY(0deg); }
}

/* EXIT POP */
.egx-loader-hide {
  opacity: 0;
  transform: scale(1.25);
}