/* Loading Spinner */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  backdrop-filter: blur(4px);
}

.page-loader.active {
  display: flex;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e3e7f9;
  border-top: 4px solid #6440ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loader-text {
  margin-top: 20px;
  color: #333;
  font-size: 16px;
  font-weight: 500;
}

/* Button loading state */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Mini loader for cards */
.card-loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #6440ff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

/* Success message animation */
.success-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: white;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  z-index: 100001;
  text-align: center;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  max-width: 90%;
  width: 360px;
}

.success-popup.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.success-popup .success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: successBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
}

.success-popup .success-icon::after {
  content: "✓";
  color: white;
  font-size: 48px;
  font-weight: bold;
  line-height: 1;
}

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

.success-popup h3 {
  margin: 0 0 12px;
  color: #1a1a1a;
  font-size: 24px;
  font-weight: 600;
  font-family: 'firago-semibolditalic', sans-serif;
}

.success-popup p {
  margin: 0;
  color: #666;
  font-size: 16px;
  line-height: 1.5;
  font-family: 'firago-mediumitalic', sans-serif;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .success-popup {
    width: 85%;
    padding: 32px 24px;
  }
  
  .success-popup .success-icon {
    width: 70px;
    height: 70px;
  }
  
  .success-popup .success-icon::after {
    font-size: 40px;
  }
  
  .success-popup h3 {
    font-size: 20px;
  }
  
  .success-popup p {
    font-size: 14px;
  }
}

