/* Cinematic animations */

/* Fade in with cinematic effect */
.cinematic-fade-in {
  opacity: 0;
  transform: translateY(40px);
  animation: cinematicFadeIn 1s forwards;
}

.cinematic-fade-in.delay-1 {
  animation-delay: 0.3s;
}

.cinematic-fade-in.delay-2 {
  animation-delay: 0.6s;
}

.cinematic-fade-in.delay-3 {
  animation-delay: 0.9s;
}

@keyframes cinematicFadeIn {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reveal animation for scroll effects */
.cinematic-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cinematic-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Film reel effect */
.film-reel {
  position: relative;
  overflow: hidden;
}

.film-reel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px,
      transparent 20px
    );
  pointer-events: none;
  animation: filmScroll 0.5s linear infinite;
}

@keyframes filmScroll {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 20px;
  }
}

/* Spotlight effect */
.spotlight {
  position: relative;
}

.spotlight::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(0, 255, 157, 0.1) 0%,
    rgba(0, 255, 157, 0) 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.spotlight:hover::before {
  opacity: 1;
}

/* Scanline effect */
.scanline {
  position: relative;
  overflow: hidden;
}

.scanline::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  animation: scan 4s linear infinite;
  z-index: 10;
}

@keyframes scan {
  0% {
    top: 0;
  }
  100% {
    top: 100%;
  }
}

/* Glitch effect for titles */
.glitch-title {
  position: relative;
  animation: glitch-anim 5s infinite;
}

@keyframes glitch-anim {
  0%, 100% {
    text-shadow: 0 0 0 var(--accent-primary);
  }
  25% {
    text-shadow: -5px 0 0 var(--accent-secondary), 5px 0 0 var(--accent-tertiary);
  }
  50% {
    text-shadow: 5px 0 0 var(--accent-secondary), -5px 0 0 var(--accent-tertiary);
  }
  75% {
    text-shadow: -3px 0 0 var(--accent-secondary), 3px 0 0 var(--accent-tertiary);
  }
}

/* Matrix rain effect */
.matrix-rain {
  position: relative;
  overflow: hidden;
}

.matrix-rain::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 255, 157, 0.05) 50%, transparent 50%);
  background-size: 100% 4px;
  z-index: 1;
  pointer-events: none;
  animation: matrix-scroll 2s linear infinite;
}

@keyframes matrix-scroll {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 100%;
  }
}

/* Hologram effect */
.hologram {
  position: relative;
  overflow: hidden;
}

.hologram::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, 
    rgba(0, 255, 157, 0.1) 0%, 
    rgba(255, 0, 170, 0.1) 50%, 
    rgba(0, 204, 255, 0.1) 100%);
  z-index: -1;
  pointer-events: none;
  animation: hologram-flicker 3s infinite;
}

@keyframes hologram-flicker {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
}

/* Floating effect for cards */
.floating-card {
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-15px) rotate(-1deg);
  }
  50% {
    transform: translateY(0) rotate(0deg);
  }
  75% {
    transform: translateY(-8px) rotate(1deg);
  }
}

/* Pulse effect for interactive elements */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(0, 255, 157, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 157, 0);
  }
}

/* Neon flicker effect */
.neon-flicker {
  animation: neon-flicker 4s infinite;
}

@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: 
      0 0 5px var(--accent-primary),
      0 0 10px var(--accent-primary),
      0 0 15px var(--accent-primary);
    box-shadow: 
      0 0 5px var(--accent-primary),
      0 0 10px var(--accent-primary);
  }
  20%, 24%, 55% {
    text-shadow: none;
    box-shadow: none;
  }
}

/* Typewriter effect */
.typewriter {
  overflow: hidden;
  border-right: 3px solid var(--accent-primary);
  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: var(--accent-primary); }
}

/* Curtain reveal effect */
.curtain-reveal {
  position: relative;
  overflow: hidden;
}

.curtain-reveal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  animation: curtain 1.5s cubic-bezier(0.86, 0, 0.07, 1) forwards;
  z-index: 100;
}

@keyframes curtain {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Spotlight sweep */
.spotlight-sweep {
  position: relative;
  overflow: hidden;
}

.spotlight-sweep::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 157, 0.2), transparent);
  animation: sweep 3s ease-in-out infinite;
}

@keyframes sweep {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}