/* Valley Bike Service - User Journey Milestone Celebration Animations */

/* Confetti Animation */
@keyframes confetti-slow {
  0% { transform: translate3d(0, 0, 0) rotateX(0) rotateY(0); }
  100% { transform: translate3d(25px, 105vh, 0) rotateX(180deg) rotateY(180deg); }
}

@keyframes confetti-medium {
  0% { transform: translate3d(0, 0, 0) rotateX(0) rotateY(0); }
  100% { transform: translate3d(100px, 105vh, 0) rotateX(100deg) rotateY(180deg); }
}

@keyframes confetti-fast {
  0% { transform: translate3d(0, 0, 0) rotateX(0) rotateY(0); }
  100% { transform: translate3d(-50px, 105vh, 0) rotateX(10deg) rotateY(250deg); }
}

/* Milestone Badge Animations */
@keyframes milestone-pop {
  0% { transform: scale(0) rotate(0deg); opacity: 0; }
  50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
  100% { transform: scale(1) rotate(360deg); opacity: 1; }
}

@keyframes milestone-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(52, 152, 219, 0.5); }
  50% { box-shadow: 0 0 30px rgba(52, 152, 219, 1), 0 0 50px rgba(52, 152, 219, 0.8); }
}

@keyframes progress-fill {
  0% { width: 0%; }
  100% { width: var(--progress-width); }
}

@keyframes bounce-celebration {
  0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
  40%, 43% { transform: translateY(-20px); }
  70% { transform: translateY(-10px); }
}

@keyframes shake-excitement {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes pulse-celebration {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes float-up {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes slide-in-right {
  0% { transform: translateX(100px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* Milestone Container */
.milestone-celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}

.milestone-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 10000;
  pointer-events: auto;
}

.milestone-badge {
  display: inline-block;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  animation: milestone-pop 1s ease-out, milestone-glow 2s ease-in-out infinite;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.milestone-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  animation: bounce-celebration 2s ease-in-out;
}

.milestone-description {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  animation: float-up 1s ease-out 0.5s both;
}

.milestone-progress {
  width: 300px;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  margin: 1rem auto;
  overflow: hidden;
}

.milestone-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 3px;
  animation: progress-fill 2s ease-out;
  --progress-width: 100%;
}

.milestone-continue-btn {
  background: linear-gradient(135deg, #e74c3c, #f39c12);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: pulse-celebration 2s ease-in-out infinite;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.milestone-continue-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Confetti Pieces */
.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #3498db;
  animation: confetti-slow 3s linear infinite;
}

.confetti:nth-child(1) {
  left: 10%;
  animation: confetti-slow 3s linear infinite;
  animation-delay: 0s;
  background: #e74c3c;
}

.confetti:nth-child(2) {
  left: 20%;
  animation: confetti-medium 2.5s linear infinite;
  animation-delay: 0.5s;
  background: #f39c12;
}

.confetti:nth-child(3) {
  left: 30%;
  animation: confetti-fast 2s linear infinite;
  animation-delay: 1s;
  background: #2ecc71;
}

.confetti:nth-child(4) {
  left: 40%;
  animation: confetti-slow 3.5s linear infinite;
  animation-delay: 0.3s;
  background: #9b59b6;
}

.confetti:nth-child(5) {
  left: 50%;
  animation: confetti-medium 2.8s linear infinite;
  animation-delay: 0.7s;
  background: #1abc9c;
}

.confetti:nth-child(6) {
  left: 60%;
  animation: confetti-fast 2.2s linear infinite;
  animation-delay: 0.2s;
  background: #e67e22;
}

.confetti:nth-child(7) {
  left: 70%;
  animation: confetti-slow 3.2s linear infinite;
  animation-delay: 1.2s;
  background: #34495e;
}

.confetti:nth-child(8) {
  left: 80%;
  animation: confetti-medium 2.7s linear infinite;
  animation-delay: 0.8s;
  background: #e74c3c;
}

.confetti:nth-child(9) {
  left: 90%;
  animation: confetti-fast 2.4s linear infinite;
  animation-delay: 0.4s;
  background: #3498db;
}

.confetti:nth-child(10) {
  left: 85%;
  animation: confetti-slow 3.1s linear infinite;
  animation-delay: 0.9s;
  background: #f39c12;
}

/* Progress Indicator Styles */
.journey-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(52, 152, 219, 0.2);
  z-index: 1000;
}

.journey-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  transition: width 0.8s ease;
  width: 0%;
}

/* Milestone Notifications */
.milestone-notification {
  position: fixed;
  top: 100px;
  right: -400px;
  width: 350px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 20px;
  z-index: 10000;
  transition: all 0.5s ease;
}

.milestone-notification.show {
  right: 20px;
  animation: slide-in-right 0.5s ease-out;
}

.milestone-notification-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  float: left;
  margin-right: 15px;
  animation: pulse-celebration 2s ease-in-out infinite;
}

.milestone-notification-content h4 {
  margin: 0 0 5px 0;
  color: #2c3e50;
  font-weight: 600;
}

.milestone-notification-content p {
  margin: 0;
  color: #7f8c8d;
  font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .milestone-badge {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }
  
  .milestone-title {
    font-size: 1.5rem;
  }
  
  .milestone-description {
    font-size: 1rem;
  }
  
  .milestone-progress {
    width: 250px;
  }
  
  .milestone-notification {
    width: 300px;
    right: -350px;
  }
  
  .milestone-notification.show {
    right: 10px;
  }
}

/* Journey Step Indicators */
.journey-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
  padding: 0 1rem;
}

.journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 1rem;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.journey-step.active {
  opacity: 1;
  animation: bounce-celebration 1s ease-out;
}

.journey-step.completed {
  opacity: 1;
}

.journey-step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #bdc3c7;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.journey-step.active .journey-step-circle {
  background: linear-gradient(135deg, #3498db, #2ecc71);
  animation: milestone-glow 2s ease-in-out infinite;
}

.journey-step.completed .journey-step-circle {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.journey-step-label {
  font-size: 0.8rem;
  text-align: center;
  color: #7f8c8d;
  font-weight: 500;
}

.journey-step.active .journey-step-label {
  color: #2c3e50;
  font-weight: 600;
}

/* Celebration Button Styles */
.btn-celebrate {
  position: relative;
  overflow: hidden;
}

.btn-celebrate.celebrating {
  animation: shake-excitement 0.5s ease-in-out;
}

.btn-celebrate::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.btn-celebrate.celebrating::after {
  width: 300px;
  height: 300px;
}