/* 
 * Background Animation Stylesheet for Secure ID Verification System
 * Provides elegant particle-based background effects
 */

/* Canvas Container */
.particles-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

#particles-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Page overlay that helps text readability over the animation */
.page-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

/* Improved Card Styling with Animation */
.step-card {
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  backdrop-filter: blur(5px);
  background-color: rgba(20, 20, 20, 0.8) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(201, 165, 90, 0.2) !important;
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 3px 10px rgba(201, 165, 90, 0.3) !important;
}

.step-card .card-header {
  background: linear-gradient(to right, #c9a55a, #dcb978) !important;
  border-bottom: none;
}

/* Animated Icons */
.step-icon {
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.step-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(201, 165, 90, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.5s ease;
}

.step-icon:hover::after {
  width: 100%;
  height: 100%;
}

.step.active .step-icon::after {
  background: rgba(0, 0, 0, 0.1);
  width: 100%;
  height: 100%;
}

/* Animated confirmation box */
.identity-confirmation-box {
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  background: rgba(20, 20, 20, 0.7);
  background-image: linear-gradient(
    135deg,
    rgba(201, 165, 90, 0.05) 0%,
    rgba(0, 0, 0, 0) 100%
  );
}

.identity-confirmation-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, transparent, #c9a55a, transparent);
  transform: translateX(-100%);
  transition: transform 1.5s ease;
}

.identity-confirmation-box:hover::before {
  transform: translateX(100%);
}

/* Improved Upload Container with Animation */
.custom-file-upload {
  background-color: rgba(20, 20, 20, 0.7);
  background-image: linear-gradient(
    135deg,
    rgba(201, 165, 90, 0.05) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.custom-file-upload:hover {
  background-color: rgba(201, 165, 90, 0.15);
  transform: scale(1.02);
}

.custom-file-upload i {
  transition: transform 0.3s ease;
}

.custom-file-upload:hover i {
  transform: scale(1.1);
}

/* Animated buttons */
.btn-primary,
.btn-info,
.btn-warning,
.btn-success {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
}

.btn-primary::after,
.btn-info::after,
.btn-warning::after,
.btn-success::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
  z-index: -1;
}

.btn-primary:hover::after,
.btn-info:hover::after,
.btn-warning:hover::after,
.btn-success:hover::after {
  left: 0;
}

/* Completion animation enhancements */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.completion-icon i {
  animation: pulse 2s infinite ease-in-out;
}

.reference-box {
  position: relative;
  overflow: hidden;
}

.reference-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(201, 165, 90, 0) 0%,
    rgba(201, 165, 90, 0.1) 20%,
    rgba(201, 165, 90, 0.2) 40%,
    rgba(201, 165, 90, 0.1) 60%,
    rgba(201, 165, 90, 0) 80%
  );
  transform: translateX(-100%);
  animation: shine 3s infinite;
}

@keyframes shine {
  to {
    transform: translateX(100%);
  }
}

/* Enhanced step indicator animations */
.step.active .step-icon {
  animation: pulse-step 2s infinite ease-in-out;
}

@keyframes pulse-step {
  0% {
    box-shadow: 0 0 0 0 rgba(201, 165, 90, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(201, 165, 90, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(201, 165, 90, 0);
  }
}

/* Loading animation */
.loading-spinner {
  display: inline-block;
  position: relative;
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.loading-spinner div {
  position: absolute;
  border: 2px solid #000;
  opacity: 1;
  border-radius: 50%;
  animation: loading-spinner 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.loading-spinner div:nth-child(2) {
  animation-delay: -0.5s;
}

@keyframes loading-spinner {
  0% {
    top: 9px;
    left: 9px;
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    top: 0px;
    left: 0px;
    width: 18px;
    height: 18px;
    opacity: 0;
  }
}

/* Enhanced alert animations */
.alert {
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* For mobile devices */
@media (max-width: 768px) {
  .particles-background {
    opacity: 0.5; /* Reduce intensity on mobile */
  }

  .step-card:hover {
    transform: none; /* Disable hover effect on mobile */
  }
}
