.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  border-top-color: #3B82F6;
  animation: spin 1s ease-in-out infinite;
}

/* ====================================
   ENHANCED FULL-SCREEN TRANSITION OVERLAY
   ==================================== */

.floating-spinner.full-screen-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none;
  background-color: transparent;
  border-radius: 8px;
  box-shadow: none;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

.floating-spinner.full-screen-transition.visible {
  opacity: 1;
  visibility: visible;
}

/* Animated backdrop with dark theme */
.transition-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
  animation: backdropFade 0.4s ease-out;
}

@keyframes backdropFade {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Content container */
.transition-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  animation: contentSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes contentSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Icon container with animations */
.transition-icon-container {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Spinning ring loader */
.spinner-ring {
  width: 120px;
  height: 120px;
  border: 6px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  border-top-color: white;
  animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
  position: absolute;
}

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

/* Success checkmark (hidden by default) */
.success-checkmark {
  width: 80px;
  height: 80px;
  opacity: 0;
  transform: scale(0);
  position: absolute;
  transition: all 0.3s ease;
}

.success-checkmark.show {
  opacity: 1;
  transform: scale(1);
  animation: checkmarkPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes checkmarkPop {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-45deg);
  }
  50% {
    transform: scale(1.1) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.checkmark-circle {
  stroke: white;
  stroke-width: 3;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: checkmarkCircle 0.6s ease-in-out forwards;
}

.success-checkmark.show .checkmark-circle {
  stroke-dashoffset: 0;
}

@keyframes checkmarkCircle {
  to {
    stroke-dashoffset: 0;
  }
}

.checkmark-check {
  stroke: white;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}

.success-checkmark.show .checkmark-check {
  animation: checkmarkCheck 0.4s 0.3s ease-in-out forwards;
}

@keyframes checkmarkCheck {
  to {
    stroke-dashoffset: 0;
  }
}

/* Text animations */
.transition-text {
  text-align: center;
  color: white;
  animation: textFadeIn 0.6s 0.2s ease-out backwards;
}

@keyframes textFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.transition-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.transition-subtitle {
  font-size: 1.1rem;
  margin: 0.5rem 0 0 0;
  opacity: 0.9;
  font-weight: 400;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .transition-icon-container {
    width: 100px;
    height: 100px;
  }

  .spinner-ring {
    width: 100px;
    height: 100px;
    border-width: 5px;
  }

  .success-checkmark {
    width: 70px;
    height: 70px;
  }

  .transition-title {
    font-size: 1.5rem;
  }

  .transition-subtitle {
    font-size: 1rem;
  }
}

/* Pulse animation for waiting state */
.transition-icon-container.pulse {
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Legacy spinner support (fallback) */
.floating-spinner .spinner {
  width: 30px;
  height: 30px;
  border-width: 3px;
}

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

.loading-text {
  font-size: 18px;
  font-weight: 500;
  color: #4B5563;
  margin-top: 10px;
}

/* Lighter sidebar icons */
.sidebar-icon {
  color: #94A3B8; /* Lighter color */
  transition: color 0.3s ease;
}

.sidebar-icon:hover, 
.sidebar-icon.active {
  color: #3B82F6; /* Brighter blue on hover/active */
}
