/* Advanced Animations */

/* Particle Effects */
@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-20px) rotate(360deg); opacity: 0; }
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: linear-gradient(45deg, #00f5ff, #ff00ff);
  border-radius: 50%;
  animation: float 6s infinite linear;
  opacity: 0.6;
}

/* Game Hub Animations */
@keyframes pulse-glow {
  0% { box-shadow: 0 0 5px rgba(0, 245, 255, 0.5); }
  100% { box-shadow: 0 0 20px rgba(0, 245, 255, 0.8), 0 0 30px rgba(255, 0, 255, 0.6); }
}

@keyframes progress-shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes rainbow-border {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes score-glow {
  0% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
  100% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 140, 0, 0.6); }
}

/* Vault Animations */
@keyframes matrix-rain {
  0% { transform: translateY(-100vh); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

.matrix-char {
  color: #00ff00;
  font-family: monospace;
  position: absolute;
  animation: matrix-rain 3s linear infinite;
}

/* Button Hover Effects */
.interactive-button {
  position: relative;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.interactive-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.interactive-button:hover::before {
  width: 300px;
  height: 300px;
}

.interactive-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

/* Modal Animations */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-content {
  animation: modalFadeIn 0.3s ease-out;
}

/* Loading Animations */
@keyframes loadingBar {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

.loading-bar {
  animation: loadingBar 3s ease-out forwards;
}

/* Network Visualization */
@keyframes nodeGlow {
  0%, 100% { 
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
    transform: scale(1.05);
  }
}

.network-node {
  animation: nodeGlow 2s ease-in-out infinite;
}

/* Typing Effect */
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: #3b82f6; }
}

.typing-text {
  overflow: hidden;
  border-right: 3px solid;
  white-space: nowrap;
  animation: 
    typing 2s steps(40, end),
    blink 0.75s step-end infinite;
}

/* Stagger Animation Utility */
.stagger-item {
  opacity: 0;
  transform: translateY(30px);
  animation: staggerIn 0.6s ease-out forwards;
}

@keyframes staggerIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }