/**
 * Narrative Opening Styles
 * Cinematic opening sequence styles
 */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes titleGlow {
  0%,
  100% {
    text-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
  }
  50% {
    text-shadow:
      0 0 40px rgba(57, 255, 20, 0.8),
      0 0 60px rgba(57, 255, 20, 0.4);
  }
}

.narrative-opening-overlay {
  animation: fadeIn 0.5s ease-in;
  position: relative;
}

.narrative-opening-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 255, 0, 0.03) 0px,
    transparent 1px,
    transparent 2px,
    rgba(0, 255, 0, 0.03) 3px
  );
  pointer-events: none;
  z-index: 1;
}

.narrative-opening-overlay h1 {
  animation: titleGlow 2s ease-in-out infinite;
}

.narrative-scanlines {
  animation: scanlineMove 8s linear infinite;
}

@keyframes scanlineMove {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(4px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* Skip button (for returning players who want to rewatch) */
.narrative-opening-skip {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #557755;
  color: #88cc88;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: "Courier New", monospace;
  transition: all 0.3s ease;
}

.narrative-opening-skip:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: #39ff14;
  color: #39ff14;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .narrative-opening-overlay h1 {
    font-size: 2.5rem !important;
  }

  .narrative-opening-overlay h2 {
    font-size: 1.2rem !important;
  }

  .narrative-opening-overlay p {
    font-size: 1rem !important;
  }
}
