/* Achievement System Visual Feedback */

/* Floating Achievement Notification */
.achievement-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 1em 1.5em;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(76, 175, 80, 0.3);
  font-size: 0.95em;
  font-weight: 600;
  z-index: 10000;
  opacity: 0;
  transform: translateX(100%);
  animation: slideInAchievement 0.5s ease-out forwards, 
             fadeOutAchievement 0.5s ease-in 2.5s forwards;
  max-width: 320px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.achievement-notification.milestone {
  background: linear-gradient(135deg, #FF9800, #f57c00);
  box-shadow: 0 8px 24px rgba(255, 152, 0, 0.4);
  border: 2px solid rgba(255, 193, 7, 0.3);
}

.achievement-notification.big-reward {
  background: linear-gradient(135deg, #9C27B0, #7B1FA2);
  box-shadow: 0 8px 24px rgba(156, 39, 176, 0.4);
  border: 2px solid rgba(186, 104, 200, 0.3);
  font-size: 1.05em;
}

.achievement-notification .achievement-icon {
  display: inline-block;
  font-size: 1.4em;
  margin-right: 0.5em;
}

.achievement-notification .achievement-points {
  font-size: 1.2em;
  font-weight: 700;
  color: #FFD700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

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

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

/* Achievement Progress Indicator (in-game) */
.achievement-progress-indicator {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5em 1em;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  z-index: 9999;
  display: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(76, 175, 80, 0.5);
}

.achievement-progress-indicator.active {
  display: block;
  animation: pulseProgress 2s ease-in-out infinite;
}

.achievement-progress-indicator .progress-bar {
  background: #333;
  height: 4px;
  border-radius: 2px;
  margin-top: 0.4em;
  overflow: hidden;
}

.achievement-progress-indicator .progress-fill {
  background: linear-gradient(90deg, #4CAF50, #81C784);
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease-out;
}

@keyframes pulseProgress {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.02); }
}

/* Point Counter Animation */
.point-counter-animation {
  position: fixed;
  pointer-events: none;
  font-size: 1.2em;
  font-weight: 700;
  color: #4CAF50;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  z-index: 9998;
  opacity: 0;
}

.point-counter-animation.animate {
  animation: floatUp 2s ease-out forwards;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-30px) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translateY(-60px) scale(0.9);
  }
}

/* Achievement Milestone Celebration */
.milestone-celebration {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 9997;
  display: none;
}

.milestone-celebration.active {
  display: block;
  animation: celebrationPulse 3s ease-out;
}

.milestone-celebration::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 193, 7, 0.1) 0%, transparent 70%);
  animation: celebrationGlow 3s ease-out;
}

@keyframes celebrationPulse {
  0%, 100% { opacity: 0; }
  10%, 90% { opacity: 1; }
}

@keyframes celebrationGlow {
  0% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .achievement-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    transform: translateY(-100%);
    animation: slideDownAchievement 0.5s ease-out forwards, 
               fadeUpAchievement 0.5s ease-in 2.5s forwards;
  }

  @keyframes slideDownAchievement {
    from {
      opacity: 0;
      transform: translateY(-100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes fadeUpAchievement {
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(-100%);
    }
  }

  .achievement-progress-indicator {
    top: 10px;
    left: 10px;
    right: 10px;
    transform: none;
    text-align: center;
  }
}