/* Loading page specific styles */
/* Global font override for loading page */
* {
  font-family: Arial, sans-serif !important;
}

.loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: hidden;
  transition: opacity 0.5s ease, transform 0.5s ease;
  font-family: Arial, sans-serif !important;
}

.loading-content {
  text-align: center;
  color: white;
  z-index: 2;
  margin-top: 100px;
}

.loading-logo {
  width: 600px;
  height: 300px;
  margin: 0 auto 10px;
  /* Remove all background and border effects */
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: none;
  border: none;
  animation: logoFloat 1.5s ease-in-out infinite;
  padding: 0;
}

.loading-logo img {
  width: 600px;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.loading-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  background: linear-gradient(45deg, #fff, #f0f0f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 2s ease-in-out infinite alternate;
}

.loading-subtitle {
  font-size: 1.2rem;
  margin-bottom: 40px;
  opacity: 0.9;
  animation: subtitleFade 2s ease-in-out infinite alternate;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto 30px;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.loading-dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: dotBounce 0.8s ease-in-out infinite both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }

.loading-progress {
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 30px auto;
  overflow: hidden;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #fff, #f0f0f0);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

.loading-percentage {
  font-size: 1rem;
  margin-top: 10px;
  opacity: 0.8;
  animation: percentagePulse 1s ease-in-out infinite;
}

/* Background animation elements */
.loading-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.loading-bg-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  animation: float 3s ease-in-out infinite;
}

.loading-bg-circle:nth-child(1) {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.loading-bg-circle:nth-child(2) {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 10%;
  animation-delay: 2s;
}

.loading-bg-circle:nth-child(3) {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

.loading-bg-circle:nth-child(4) {
  width: 80px;
  height: 80px;
  top: 30%;
  right: 30%;
  animation-delay: 1s;
}

/* Animation definitions */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes dotBounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes logoFloat {
  0%, 100% { 
    transform: translateY(0px) scale(1);
  }
  50% { 
    transform: translateY(-35px) scale(1.08);
  }
}

@keyframes titleGlow {
  0% { text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
  100% { text-shadow: 0 0 30px rgba(255, 255, 255, 0.8); }
}

@keyframes subtitleFade {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

@keyframes progressFill {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

@keyframes percentagePulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-50px) rotate(180deg);
    opacity: 0.7;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .loading-title {
    font-size: 2rem;
  }
  
  .loading-subtitle {
    font-size: 1rem;
  }
  
  .loading-logo {
    width: 260px;
    height: 130px;
  }
  
  .loading-logo img {
    width: 260px;
    height: auto;
    max-height: 130px;
  }
  
  .loading-progress {
    width: 250px;
  }
}

/* Dark mode adaptation */
@media (prefers-color-scheme: dark) {
  .loading-container {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  }
}

/* Hide loading page animation */
.loading-container.fade-out {
  opacity: 0;
  transform: scale(0.9);
}

.loading-container.hidden {
  display: none;
}
