/* Custom animations and overrides */

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

.floating-crown {
  animation: float 3s ease-in-out infinite;
}

/* Parallax effect for hero background */
@keyframes parallax {
  0% {
    transform: translateY(0px);
  }
  100% {
    transform: translateY(-50px);
  }
}

.parallax-bg {
  animation: parallax 20s linear infinite;
}

/* Marquee animation for game cards */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.marquee {
  animation: marquee 30s linear infinite;
}

/* Tilt effect on hover */
.tilt-hover:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
  transition: transform 0.3s ease;
}

/* Particle effect background */
@keyframes particle-float {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-40px) translateX(-5px);
    opacity: 1;
  }
  75% {
    transform: translateY(-20px) translateX(-10px);
    opacity: 0.7;
  }
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #d4af37;
  border-radius: 50%;
  animation: particle-float 6s ease-in-out infinite;
}

.particle:nth-child(2) {
  animation-delay: -1s;
}
.particle:nth-child(3) {
  animation-delay: -2s;
}
.particle:nth-child(4) {
  animation-delay: -3s;
}
.particle:nth-child(5) {
  animation-delay: -4s;
}

/* Bonus badge pulse */
@keyframes pulse-gold {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
  }
}

.bonus-badge {
  animation: pulse-gold 2s ease-in-out infinite;
}

/* Game card 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(212, 175, 55, 0.2), transparent);
  transition: left 0.5s;
}

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #b8941f;
}

/* Enhanced prose styling for better readability and responsive design */
.prose {
  color: #e5e7eb;
  line-height: 1.7;
  max-width: 100%;
  font-size: 1rem;
}

.prose h2 {
  color: #d4af37;
  font-weight: 700;
  font-size: 1.875rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.prose h3 {
  color: #d4af37;
  font-weight: 600;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.prose h4 {
  color: #d4af37;
  font-weight: 600;
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.prose p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
}

.prose a {
  color: #d4af37;
  text-decoration: none;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.prose a:hover {
  color: #b8941f;
  border-bottom-color: #b8941f;
}

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

.prose li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.prose blockquote {
  border-left: 0.25rem solid #d4af37;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #d1d5db;
  background: rgba(212, 175, 55, 0.05);
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  overflow-x: auto;
  display: block;
  white-space: nowrap;
}

.prose table tbody {
  display: table;
  width: 100%;
}

.prose th,
.prose td {
  border: 1px solid #374151;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: normal;
}

.prose th {
  background-color: #d4af37;
  color: #000;
  font-weight: 600;
  font-size: 0.875rem;
}

.prose td {
  font-size: 0.875rem;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 2rem 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Responsive typography */
@media (max-width: 768px) {
  .prose {
    font-size: 0.9rem;
  }

  .prose h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
  }

  .prose h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
  }

  .prose h4 {
    font-size: 1.125rem;
    margin-top: 1.25rem;
  }

  .prose table {
    font-size: 0.8rem;
  }

  .prose th,
  .prose td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .prose {
    font-size: 0.875rem;
  }

  .prose h2 {
    font-size: 1.375rem;
  }

  .prose h3 {
    font-size: 1.125rem;
  }

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

  .prose blockquote {
    padding: 1rem;
    margin: 1.5rem 0;
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .floating-crown {
    animation-duration: 2s;
  }

  .bonus-badge {
    animation-duration: 3s;
  }

  .game-card {
    transform: none !important;
  }

  .game-card:hover {
    transform: scale(1.02) !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .prose {
    color: #ffffff;
  }

  .prose a {
    color: #ffd700;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .floating-crown,
  .bonus-badge,
  .parallax-bg,
  .marquee,
  .particle {
    animation: none;
  }

  .game-card,
  .tilt-hover {
    transition: none;
  }
}

/* Focus styles for accessibility */
a:focus,
button:focus {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .floating-crown,
  .bonus-badge,
  nav,
  footer {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
