/* ===== Extra Animations & Effects for 404 Page ===== */

/* Enhanced Background Animation */
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body {
  background-size: 400% 400% !important;
  animation: gradientMove 15s ease infinite !important;
}

/* Glowing Border Effect */
.notfound {
  position: relative;
}

.notfound::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff6b6b);
  background-size: 400% 400%;
  border-radius: 32px;
  z-index: -1;
  animation: gradientMove 3s ease infinite;
  opacity: 0.7;
}

/* Text Typing Effect */
.notfound h2 {
  overflow: hidden;
  border-right: 3px solid #ffffff;
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: #ffffff; }
}

/* Bouncing 404 Numbers */
.notfound .notfound-404 h1 {
  animation: bounce 2s ease-in-out infinite, gradientShift 3s ease-in-out infinite, float 6s ease-in-out infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-10px); }
}

/* Shimmer Effect on Button */
.notfound a {
  position: relative;
  overflow: hidden;
}

.notfound a::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.notfound a:hover::after {
  left: 100%;
}

/* Floating Icons */
.notfound h2 i {
  animation: iconFloat 2s ease-in-out infinite;
  margin-right: 10px;
}

.notfound a i {
  margin-right: 8px;
  animation: iconPulse 1.5s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(5deg); }
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Particle System */
.particle {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  animation: particleFloat 8s linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Enhanced Decorative Elements */
.decoration {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  animation: decorationPulse 3s ease-in-out infinite;
}

@keyframes decorationPulse {
  0%, 100% { 
    transform: scale(1) rotate(0deg); 
    opacity: 0.3; 
  }
  50% { 
    transform: scale(1.5) rotate(180deg); 
    opacity: 0.6; 
  }
}

/* Text Glow Effect */
.notfound p {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from { text-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }
  to { text-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 30px rgba(255, 255, 255, 0.3); }
}

/* Responsive Enhancements */
@media only screen and (max-width: 767px) {
  .notfound h2 {
    white-space: normal;
    animation: none;
    border-right: none;
  }
  
  .notfound .notfound-404 h1 {
    animation: bounce 2s ease-in-out infinite, gradientShift 3s ease-in-out infinite;
  }
}

/* Loading Screen Effect */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOut 1s ease-in-out 2s forwards;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Hover Effects for Interactive Elements */
.notfound:hover {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

.notfound a:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 20px 50px rgba(255, 107, 107, 0.5);
}

/* Custom Cursor */
.notfound a {
  cursor: pointer;
}

.notfound a:hover {
  cursor: pointer;
}

/* Enhanced Mobile Experience */
@media only screen and (max-width: 480px) {
  .notfound {
    margin: 10px;
    padding: 20px 15px;
  }
  
  .notfound::before {
    display: none;
  }
  
  .decoration {
    display: none;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .notfound {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #ffffff;
  }
  
  .notfound h2,
  .notfound p {
    color: #ffffff;
  }
} 