.loading-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: linear-gradient(120deg, #e8f9f0 65%, #d0f0e0 100%);
  z-index: 9999;
  display: flex;
  align-items: center; justify-content: center;
  transition: opacity 0.45s cubic-bezier(.4,2,.2,1);
}

.spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.square-spinner {
  width: 62px; height: 62px;
  position: relative;
  animation: spin-cube 1.15s linear infinite;
}

.square-cube {
  position: absolute;
  width: 20px; height: 20px;
  background: linear-gradient(135deg, #21c56a, #38b978 90%);
  border-radius: 6px;
  box-shadow: 0 4px 22px #38b9782c;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0.85);
  animation: pop-cube 0.4s;
}

.square-cube:nth-child(1) { /* top */
  transform: translate(-50%,-50%) translateY(-24px) scale(1);
  background: linear-gradient(135deg, #38b978, #b7efd1 100%);
}
.square-cube:nth-child(2) { /* right */
  transform: translate(-50%,-50%) translateX(24px) scale(1);
  background: linear-gradient(135deg, #21c56a, #38b978 100%);
}
.square-cube:nth-child(3) { /* bottom */
  transform: translate(-50%,-50%) translateY(24px) scale(1);
  background: linear-gradient(135deg, #21c56a 60%, #b7efd1 100%);
}
.square-cube:nth-child(4) { /* left */
  transform: translate(-50%,-50%) translateX(-24px) scale(1);
  background: linear-gradient(135deg, #38b978 80%, #21c56a 100%);
}

@keyframes spin-cube {
  100% { transform: rotate(360deg);}
}
@keyframes pop-cube {
  0% { transform: scale(0.5);}
  80% { transform: scale(1.18);}
  100% { transform: scale(1);}
}

.loading-text {
  margin-top: 26px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.22em;
  letter-spacing: 1.3px;
  color: #178a4d;
  text-shadow: 0 1px 12px #38b97828;
  display: flex; gap: 5px; align-items: center;
}
.loading-text .dot {
  font-size: 1.26em;
  opacity: 0.3;
  animation: blinkDot 1.3s infinite;
}
.loading-text .dot:nth-child(2) { animation-delay: .22s; }
.loading-text .dot:nth-child(3) { animation-delay: .44s; }
@keyframes blinkDot {
  0%,80%,100% { opacity: .18;}
  40% { opacity: 1;}
}
