/* Loading Screen with Rotating Logo */

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-screen.active {
  opacity: 1;
  pointer-events: all;
}

/* Logo without animation by default */
.loading-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 32px;
  filter: drop-shadow(0 6px 24px rgba(102, 126, 234, 0.6));
  /* No animation by default - ensures fresh start every time */
}

/* Apply animation ONLY when loading screen is active - Method 3 from test */
.loading-screen.active .loading-logo {
  animation: rotate-logo 1.5s ease-in-out infinite;
}

@keyframes rotate-logo {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

.loading-text {
  color: white;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 1px;
  animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.loading-dots {
  display: inline-block;
  width: 20px;
  text-align: left;
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% {
    content: '';
  }
  40% {
    content: '.';
  }
  60% {
    content: '..';
  }
  80%, 100% {
    content: '...';
  }
}

/* Alternative pulse animation for logo */
.loading-logo.pulse {
  animation: pulse-logo 1.5s ease-in-out infinite;
}

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