/* Custom Animations and Overrides */

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.animate-shimmer {
  background-size: 2000px 100%;
  animation: shimmer 3s linear infinite;
}

/* Hero Glow Effect */
.hero-glow {
  background: radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.15) 0%, transparent 50%);
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Bonus Badge Glow */
.bonus-badge-glow {
  animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6), 0 0 60px rgba(154, 205, 50, 0.4);
  }
}

/* Scatter Pattern Background */
.scatter-pattern {
  background-image: radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(154, 205, 50, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 70% 20%, rgba(154, 205, 50, 0.08) 0%, transparent 50%);
  animation: scatter-float 8s ease-in-out infinite;
}

@keyframes scatter-float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(10px, -10px);
  }
  50% {
    transform: translate(-5px, 10px);
  }
  75% {
    transform: translate(5px, 5px);
  }
}

/* Marquee Animation for Game Cards */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.marquee-content {
  display: flex;
  gap: 1.5rem;
  animation: marquee 30s linear infinite;
}

.marquee-content:hover {
  animation-play-state: paused;
}

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

.game-card {
  flex: 0 0 280px;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.2);
  transition: all 0.3s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

/* Duplicate marquee content for seamless loop */
.marquee-content::after {
  content: "";
  display: flex;
  gap: 1.5rem;
}

/* Parallax Elements */
.parallax-element {
  transition: transform 0.1s ease-out;
  will-change: transform;
}

/* Prose Content Styling for Readability */
.prose-content {
  font-size: 1.0625rem;
  line-height: 1.7;
}

.prose-content h3 {
  font-size: 1.75rem;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose-content h4 {
  font-size: 1.375rem;
  line-height: 1.4;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

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

.prose-content ul {
  margin-bottom: 1.25rem;
}

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

.prose-content a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.prose-content table {
  width: 100%;
  margin: 1.5rem 0;
}

/* Responsive Table Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

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

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #ffd700, #9acd32);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #ffa500, #7fff00);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .prose-content {
    font-size: 1rem;
  }

  .prose-content h3 {
    font-size: 1.5rem;
  }

  .prose-content h4 {
    font-size: 1.25rem;
  }

  .game-card {
    flex: 0 0 240px;
  }
}

/* Ensure no horizontal overflow */
body {
  overflow-x: clip;
}

/* Glass morphism effect for cards */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Prose Styling for Markdown Content */
.prose {
  max-width: 100%;
  color: #e5e5e5;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose h2 {
  color: #ffd700;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2.5em;
  margin-bottom: 1em;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffd700 0%, #9acd32 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  color: #f4c430;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.35;
  margin-top: 2em;
  margin-bottom: 0.875em;
  letter-spacing: -0.01em;
}

.prose h4 {
  color: #9acd32;
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.75em;
  margin-bottom: 0.75em;
}

.prose p {
  margin-bottom: 1.5em;
  color: #d1d1d1;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a {
  color: #ffd700;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

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

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

.prose em {
  color: #f4c430;
  font-style: italic;
}

/* Lists */
.prose ul,
.prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.5em;
  padding-left: 1.75em;
}

.prose ul {
  list-style-type: none;
}

.prose ul > li {
  position: relative;
  padding-left: 0.5em;
  margin-bottom: 0.75em;
  color: #d1d1d1;
}

.prose ul > li::before {
  content: "▸";
  position: absolute;
  left: -1.25em;
  color: #ffd700;
  font-weight: bold;
}

.prose ol {
  list-style-type: decimal;
  list-style-position: outside;
}

.prose ol > li {
  padding-left: 0.5em;
  margin-bottom: 0.75em;
  color: #d1d1d1;
}

.prose ol > li::marker {
  color: #ffd700;
  font-weight: 600;
}

.prose li > ul,
.prose li > ol {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

/* Tables */
.prose table {
  width: 100%;
  max-width: 100%;
  margin-top: 2em;
  margin-bottom: 2em;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow-x: auto;
}

.prose thead {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(154, 205, 50, 0.15) 100%);
  border-bottom: 2px solid #ffd700;
}

.prose thead th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #ffd700;
  white-space: nowrap;
}

.prose tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease;
}

.prose tbody tr:hover {
  background-color: rgba(255, 215, 0, 0.05);
}

.prose tbody tr:last-child {
  border-bottom: none;
}

.prose tbody td {
  padding: 0.875rem 1rem;
  color: #d1d1d1;
}

.prose tbody td:first-child {
  font-weight: 500;
  color: #f4c430;
}

/* Blockquotes */
.prose blockquote {
  margin-top: 2em;
  margin-bottom: 2em;
  padding-left: 1.5em;
  border-left: 4px solid #ffd700;
  font-style: italic;
  color: #b8b8b8;
  background: rgba(255, 215, 0, 0.05);
  padding: 1.25em 1.5em;
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p {
  margin-bottom: 0.75em;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin-top: 2em;
  margin-bottom: 2em;
  border: 2px solid rgba(255, 215, 0, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Code */
.prose code {
  background: rgba(255, 215, 0, 0.1);
  color: #9acd32;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: "Courier New", monospace;
}

.prose pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 0.5rem;
  padding: 1.25em;
  overflow-x: auto;
  margin-top: 1.75em;
  margin-bottom: 1.75em;
}

.prose pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 0.875rem;
  line-height: 1.7;
}

/* Horizontal Rule */
.prose hr {
  border: none;
  border-top: 2px solid rgba(255, 215, 0, 0.2);
  margin-top: 3em;
  margin-bottom: 3em;
}

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

  .prose ul,
  .prose ol {
    padding-left: 1.5em;
  }

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

  .prose thead th,
  .prose tbody td {
    padding: 0.625rem 0.75rem;
  }
}

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

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

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

/* Ensure table wrapper for horizontal scroll */
.prose .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2em 0;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.prose .table-responsive table {
  margin: 0;
  border-radius: 0;
}
