/* Hide default Sellauth loading screen */
#sellauth-loader,
.sellauth-loader,
[id*="loader"],
[class*="sellauth-loading"],
body > div[style*="position: fixed"][style*="z-index"] > div[style*="border"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Custom Loading Screen Styles */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--cl-background-primary) 0%, var(--cl-background-secondary) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999999 !important;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.loading-logo {
  width: 80px;
  height: 80px;
  position: relative;
  animation: pulse 2s ease-in-out infinite;
}

.loading-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(var(--cl-accent-rgb), 0.5));
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.loading-spinner {
  width: 60px;
  height: 60px;
  position: relative;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: var(--cl-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
  border-top-color: rgba(var(--cl-accent-rgb), 0.5);
  animation-duration: 1.5s;
  animation-direction: reverse;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 500;
  text-align: center;
  animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.loading-dots {
  display: flex;
  gap: 8px;
  margin-top: 1rem;
}

.loading-dot {
  width: 10px;
  height: 10px;
  background: var(--cl-accent);
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) {
  animation-delay: 0s;
}

.loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-20px);
    opacity: 1;
  }
}

.loading-progress {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 1rem;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--cl-accent), rgba(var(--cl-accent-rgb), 0.6));
  border-radius: 2px;
  animation: progress 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(var(--cl-accent-rgb), 0.5);
}

@keyframes progress {
  0% {
    width: 0%;
    transform: translateX(0);
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
    transform: translateX(0);
  }
}

/* Alternative spinner styles */
.loading-spinner-alt {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--cl-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Glow effect */
.loading-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(var(--cl-accent-rgb), 0.2) 0%, transparent 70%);
  border-radius: 50%;
  animation: glow 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .loading-logo {
    width: 60px;
    height: 60px;
  }
  
  .loading-spinner {
    width: 50px;
    height: 50px;
  }
  
  .loading-text {
    font-size: 1rem;
  }
  
  .loading-progress {
    width: 150px;
  }
}