/* Custom styles for ParaSprunki website */

/* Glitch text effect for horror theme */
.glitch-text {
  position: relative;
  animation: glitch 3s infinite;
}

@keyframes glitch {
  0% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                -0.05em -0.025em 0 rgba(0, 255, 0, 0.75),
                -0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
  }
  14% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                -0.05em -0.025em 0 rgba(0, 255, 0, 0.75),
                -0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
  }
  15% {
    text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
                0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
                -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
  }
  49% {
    text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
                0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
                -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
  }
  50% {
    text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75),
                0.05em 0 0 rgba(0, 255, 0, 0.75),
                0 -0.05em 0 rgba(0, 0, 255, 0.75);
  }
  99% {
    text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75),
                0.05em 0 0 rgba(0, 255, 0, 0.75),
                0 -0.05em 0 rgba(0, 0, 255, 0.75);
  }
  100% {
    text-shadow: -0.025em 0 0 rgba(255, 0, 0, 0.75),
                -0.025em -0.025em 0 rgba(0, 255, 0, 0.75),
                -0.025em -0.05em 0 rgba(0, 0, 255, 0.75);
  }
}

/* Game container styles */
.game-container {
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.game-container:hover {
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #4a0000;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6a0000;
}

/* Flicker animation for horror effect */
.flicker {
  animation: flicker 8s infinite alternate;
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
  }
  20%, 22%, 24%, 55% {
    opacity: 0.5;
  }
}

/* Responsive navigation */
@media (max-width: 640px) {
  header nav {
    flex-direction: column;
  }
  
  header nav .flex {
    margin-top: 1rem;
    justify-content: center;
  }
}

/* Hover effects for cards */
.bg-gray-800:hover, .bg-gray-900:hover {
  transform: translateY(-2px);
  transition: transform 0.3s ease;
}

/* Static effect for background */
.static-bg {
  position: relative;
}

.static-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/><feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.5 0"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)"/></svg>');
  opacity: 0.05;
  pointer-events: none;
}

/* Creepy text effect */
.creepy-text {
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

/* Pulse effect for buttons */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(185, 28, 28, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(185, 28, 28, 0);
  }
}

.pulse-effect:hover {
  animation: pulse 1.5s infinite;
}

/* Hidden message effect */
.hidden-message {
  color: rgba(255, 0, 0, 0.1);
  transition: color 0.5s ease;
}

.hidden-message:hover {
  color: rgba(255, 0, 0, 0.8);
}
