/* 8-bit Duck Hunt Theme - Custom Animations & Overrides */

/* Keyframe Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.9);
  }
}

@keyframes slide-in-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pixel-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes duck-fly {
  0% {
    transform: translateX(-100px) translateY(0) rotate(-15deg);
  }
  25% {
    transform: translateX(25vw) translateY(-50px) rotate(0deg);
  }
  50% {
    transform: translateX(50vw) translateY(-20px) rotate(15deg);
  }
  75% {
    transform: translateX(75vw) translateY(-70px) rotate(-10deg);
  }
  100% {
    transform: translateX(100vw) translateY(-30px) rotate(5deg);
  }
}

@keyframes countdown-fade {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(0.9);
  }
}

@keyframes spin-wheel {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

/* Utility Classes */
.float-animation {
  animation: float 3s ease-in-out infinite;
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.pixel-pop {
  animation: pixel-pop 0.3s ease-in-out;
}

.duck-fly-animation {
  animation: duck-fly 8s linear infinite;
}

.marquee-container {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-content {
  display: inline-block;
  animation: marquee 30s linear infinite;
}

/* 8-bit Pixel Art Styles */
.pixel-border {
  image-rendering: pixelated;
  border: 4px solid;
  border-image: repeating-linear-gradient(90deg, #fff 0px, #fff 4px, transparent 4px, transparent 8px) 4;
}

.retro-shadow {
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.3), 4px 4px 0 rgba(255, 255, 255, 0.1);
}

.pixel-corners {
  clip-path: polygon(
    0 4px,
    4px 4px,
    4px 0,
    calc(100% - 4px) 0,
    calc(100% - 4px) 4px,
    100% 4px,
    100% calc(100% - 4px),
    calc(100% - 4px) calc(100% - 4px),
    calc(100% - 4px) 100%,
    4px 100%,
    4px calc(100% - 4px),
    0 calc(100% - 4px)
  );
}

/* Prose Styling for Readability */
.prose {
  color: #e5e7eb;
  line-height: 1.75;
  max-width: 65ch;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #fbbf24;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.prose h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #60a5fa;
}

.prose ul,
.prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose strong {
  color: #fbbf24;
  font-weight: 600;
}

.prose a {
  color: #60a5fa;
  text-decoration: underline;
  transition: color 0.2s;
}

.prose a:hover {
  color: #93c5fd;
}

/* Game Grid Hover Effects */
.game-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.game-card:hover::before {
  left: 100%;
}

.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Duck Hunt Crosshair Cursor */
.crosshair-cursor {
  cursor: crosshair;
}

/* Pixel Art Grass Pattern */
.grass-pattern {
  background-image: repeating-linear-gradient(0deg, #166534 0px, #166534 2px, #15803d 2px, #15803d 4px);
}

/* Retro Button Styles */
.retro-btn {
  position: relative;
  font-family: "Press Start 2P", monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.1s;
}

.retro-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* Winner Flash Effect */
@keyframes winner-flash {
  0%,
  100% {
    background-color: rgba(34, 197, 94, 0.2);
  }
  50% {
    background-color: rgba(34, 197, 94, 0.5);
  }
}

.winner-row {
  animation: winner-flash 1s ease-in-out;
}

/* Countdown Effect */
.countdown-number {
  animation: countdown-fade 1s ease-in-out forwards;
}

/* Mobile Menu Transitions */
.mobile-menu {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.mobile-menu.hidden {
  transform: translateY(-100%);
  opacity: 0;
}

/* Sticky CTA Banner */
.sticky-cta {
  animation: slide-in-right 0.5s ease-out;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

/* Wheel of Fortune */
.wheel {
  transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Review Cards */
.review-card {
  backdrop-filter: blur(10px);
  background: rgba(30, 58, 138, 0.4);
  border: 2px solid rgba(96, 165, 250, 0.3);
}

/* Payment Method Logos */
.payment-logo {
  filter: grayscale(100%);
  transition: filter 0.3s, transform 0.3s;
}

.payment-logo:hover {
  filter: grayscale(0%);
  transform: scale(1.1);
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Loading Animation for Images */
img {
  transition: opacity 0.3s;
}

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}
