/* Loading Screen Styles */

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #ebeefd;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.loading-star {
  width: 40px;
  height: 40px;
  animation: pulse 2s ease-in-out infinite;
}

/* Rotating animation for non-home pages */
.loading-star.rotating {
  animation: rotate90 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

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

@keyframes rotate90 {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(90deg);
  }
}

.loading-text {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.loading-text .letter {
  display: inline-block;
  opacity: 0;
  animation: fadeInLetter 0.3s ease-in forwards;
  font-family: inherit;
  font-weight: inherit;
}

@keyframes fadeInLetter {
  to {
    opacity: 1;
  }
}

/* Media queries for smaller screens */
@media (max-width: 768px) {
  .loading-star {
    width: 32px;
    height: 32px;
  }

  .loading-text {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .loading-star {
    width: 28px;
    height: 28px;
  }

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

  .loading-content {
    gap: 0.75rem;
  }
}
