/* Confetti Animation */
.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: linear-gradient(
    45deg,
    #3b82f6,
    #8b5cf6,
    #10b981,
    #f59e0b,
    #ef4444
  );
  border-radius: 50%;
  animation: confetti-fall 3s linear infinite;
  pointer-events: none;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Smooth transitions */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

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

/* Modal animations */
.modal-enter {
  animation: modalEnter 0.2s ease-out;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modal container fixes */
#modal-container {
  z-index: 9999;
}

#modal-container .absolute {
  z-index: 1;
}

#modal-container .flex {
  z-index: 2;
  position: relative;
}

#modal-content {
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  z-index: 3;
}

/* Ensure modal content is above overlay */
#modal-container .bg-white {
  position: relative;
  z-index: 3;
}

/* Toast animations */
.toast-enter {
  animation: toastEnter 0.3s ease-out;
}

.toast-exit {
  animation: toastExit 0.3s ease-in;
}

@keyframes toastEnter {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastExit {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Loading spinner */
.spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

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

/* Role pill styles */
.role-pill {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.role-pill.student {
  background: linear-gradient(135deg, #10b981, #059669);
}

.role-pill.manager {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Button hover effects */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Floating animations for background elements */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 6s ease-in-out infinite;
  animation-delay: 3s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Enhanced hover and focus states */
.card-hover {
  transition: all 0.2s ease;
}

.card-hover:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Focus states for accessibility */
.focus-visible:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Button focus states */
.btn-primary:focus,
.btn-secondary:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Link focus states */
a:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  text-decoration: underline;
}

/* Form input focus states */
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-color: #3b82f6;
}

/* Mobile navigation styles */
.mobile-nav {
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
}

.mobile-nav.open {
  transform: translateX(0);
}

/* Responsive utilities */
@media (max-width: 360px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .text-4xl {
    font-size: 1.875rem;
  }

  .text-3xl {
    font-size: 1.5rem;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .animate-float,
  .animate-float-delayed,
  .confetti {
    animation: none;
  }

  .card-hover:hover {
    transform: none;
  }
}
