/* Animations */
@keyframes bonus-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.5), 0 0 40px rgba(220, 20, 60, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), 0 0 60px rgba(255, 215, 0, 0.4);
  }
}

.bonus-glow {
  animation: bonus-glow 3s ease-in-out infinite;
}

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

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

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

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

.game-card {
  flex: 0 0 280px;
  width: 280px;
}

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

/* Prose Styling for Readability */
.prose {
  max-width: 100%;
  color: #c0c0c0;
  font-size: clamp(1rem, 2.5vw, 1.0625rem);
  line-height: 1.75;
}

.prose h2 {
  color: #ffd700;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  margin-top: 2.5em;
  margin-bottom: 1em;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.prose h3 {
  color: #f59e0b;
  font-weight: 600;
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

.prose h4 {
  color: #e5e7eb;
  font-weight: 600;
  font-size: clamp(1.125rem, 3vw, 1.25rem);
  margin-top: 1.75em;
  margin-bottom: 0.5em;
  line-height: 1.4;
}

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

.prose a {
  color: #dc143c;
  text-decoration: underline;
  text-decoration-color: rgba(220, 20, 60, 0.3);
  text-underline-offset: 0.2em;
  transition: all 0.3s ease;
  font-weight: 500;
}

.prose a:hover {
  color: #ffd700;
  text-decoration-color: rgba(255, 215, 0, 0.6);
}

.prose strong {
  color: #e5e7eb;
  font-weight: 700;
}

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

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

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

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

.prose li {
  margin-bottom: 0.75em;
  padding-left: 0.5em;
  line-height: 1.7;
}

.prose li::marker {
  color: #dc143c;
  font-weight: 600;
}

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

.prose blockquote {
  border-left: 0.25rem solid #dc143c;
  padding-left: 1.5em;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  margin: 2em 0;
  font-style: italic;
  color: #9ca3af;
  background: linear-gradient(90deg, rgba(220, 20, 60, 0.05) 0%, transparent 100%);
}

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

.prose table {
  width: 100%;
  max-width: 100%;
  margin: 2em 0;
  border-collapse: collapse;
  font-size: clamp(0.875rem, 2vw, 1rem);
  overflow-x: auto;
  display: block;
}

.prose thead {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.prose th {
  padding: 1em 0.75em;
  text-align: left;
  font-weight: 700;
  color: #ffd700;
  border: 1px solid #2a2a2a;
  white-space: nowrap;
}

.prose td {
  padding: 0.875em 0.75em;
  border: 1px solid #2a2a2a;
  color: #c0c0c0;
  background-color: rgba(26, 26, 26, 0.3);
}

.prose tbody tr:hover td {
  background-color: rgba(220, 20, 60, 0.05);
}

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

.prose code {
  background-color: #1a1a1a;
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  color: #ffd700;
  border: 1px solid #2a2a2a;
}

.prose pre {
  background-color: #0a0a0a;
  padding: 1.5em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2em 0;
  border: 1px solid #2a2a2a;
}

.prose pre code {
  background-color: transparent;
  padding: 0;
  border: none;
  font-size: 0.875em;
}

.prose hr {
  border: none;
  border-top: 2px solid #2a2a2a;
  margin: 3em 0;
}

/* Table wrapper for safe scrolling */
.prose .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2em 0;
}

.prose .table-responsive table {
  margin: 0;
  display: table;
}

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

  .prose h2 {
    margin-top: 2em;
  }

  .prose h3 {
    margin-top: 1.75em;
  }

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

  .prose li {
    padding-left: 0.25em;
  }

  .prose blockquote {
    padding-left: 1em;
  }

  .prose th,
  .prose td {
    padding: 0.75em 0.5em;
  }
}

/* Ensure readability - prevent dark on dark, light on light */
.prose *::selection {
  background-color: rgba(220, 20, 60, 0.3);
  color: #ffd700;
}

/* Responsive Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

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

  .prose-custom h1 {
    font-size: 1.875rem;
  }

  .prose-custom h2 {
    font-size: 1.5rem;
  }

  .prose-custom h3 {
    font-size: 1.25rem;
  }

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

/* Accessibility */
:focus-visible {
  outline: 2px solid #ffd700;
  outline-offset: 2px;
}

/* Loading States */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.loading-shimmer {
  animation: shimmer 2s infinite;
  background: linear-gradient(to right, #1a1a1a 4%, #2a2a2a 25%, #1a1a1a 36%);
  background-size: 1000px 100%;
}
