/* Loading screen styles */
.sd-loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #1a0b3a 0%, #2d1b4e 100%);
  z-index: 9999;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.sd-loading-screen.hidden {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.sd-loading-container {
  text-align: center;
}

.sd-loading-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  animation: sd-pulse 2s ease-in-out infinite;
}

.sd-loading-icon svg,
.sd-loading-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sd-loading-text {
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  letter-spacing: -0.3px;
}

.sd-loading-subtext {
  font-size: 0.875rem;
  opacity: 0.7;
  margin: 0;
}

.sd-loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1.5rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #6d28d9;
  border-radius: 50%;
  animation: sd-spin 1s linear infinite;
}

@keyframes sd-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(0.95);
  }
}

@keyframes sd-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Loading screen progress bar */
.sd-loading-progress {
  width: 100px;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 1.5rem auto 0;
  overflow: hidden;
}

.sd-loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6d28d9, #10b981);
  border-radius: 2px;
  animation: sd-progress 2s ease-in-out infinite;
  width: 30%;
}

@keyframes sd-progress {
  0% {
    width: 10%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 90%;
  }
}

/* Fade out transition */
.sd-loading-screen.fade-out {
  animation: sd-fade-out 0.5s ease-out forwards;
}

@keyframes sd-fade-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Minimal loading state for web */
@media (max-width: 768px) {
  .sd-loading-screen {
    justify-content: flex-end;
    padding-bottom: 20%;
  }

  .sd-loading-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
  }

  .sd-loading-text {
    font-size: 1rem;
  }
}
