/* Parallax Effect */
.parallax-bg {
  transform: translateZ(-1px) scale(1.5);
  will-change: transform;
}

@media (prefers-reduced-motion: no-preference) {
  .parallax-bg {
    animation: parallax 20s ease-in-out infinite alternate;
  }
}

@keyframes parallax {
  0% {
    transform: translateY(0) scale(1.1);
  }
  100% {
    transform: translateY(-50px) scale(1.15);
  }
}

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

.marquee-content {
  display: flex;
  animation: marquee 40s linear infinite;
}

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

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

/* Bonus Glow Effect */
.bonus-glow {
  animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
  0% {
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
  }
  100% {
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.8)) drop-shadow(0 0 50px rgba(14, 165, 233, 0.6));
  }
}

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

/* Prose Styling for Readability */
.prose-custom {
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 100%;
}

.prose-custom h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.3;
  font-weight: 700;
  color: #d4af37;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.prose-custom h3 {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  line-height: 1.4;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
  color: #06b6d4;
}

.prose-custom h4 {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  line-height: 1.5;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #0ea5e9;
}

.prose-custom h5 {
  font-size: 1.125rem;
  line-height: 1.5;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #e2e8f0;
}

.prose-custom h6 {
  font-size: 1rem;
  line-height: 1.5;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #cbd5e1;
}

.prose-custom p {
  margin-bottom: 1.5rem;
  color: #e2e8f0;
  line-height: 1.75;
}

.prose-custom p:first-of-type {
  font-size: 1.125rem;
  line-height: 1.7;
}

.prose-custom a {
  color: #0ea5e9;
  text-decoration: underline;
  text-decoration-color: rgba(14, 165, 233, 0.4);
  text-underline-offset: 0.2em;
  transition: all 0.3s ease;
  font-weight: 500;
}

.prose-custom a:hover {
  color: #d4af37;
  text-decoration-color: rgba(212, 175, 55, 0.6);
}

.prose-custom a:focus {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
  border-radius: 0.125rem;
}

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

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

.prose-custom ul ul {
  list-style-type: circle;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

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

.prose-custom ol ol {
  list-style-type: lower-alpha;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.prose-custom li {
  margin-bottom: 0.75rem;
  color: #e2e8f0;
  line-height: 1.7;
  padding-left: 0.5rem;
}

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

.prose-custom li > p {
  margin-bottom: 0.75rem;
}

.prose-custom table {
  width: 100%;
  max-width: 100%;
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
  display: table;
}

.prose-custom thead {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(14, 165, 233, 0.15));
  border-bottom: 2px solid #d4af37;
}

.prose-custom th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  color: #d4af37;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  vertical-align: middle;
}

.prose-custom td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  vertical-align: top;
}

.prose-custom tbody tr {
  transition: background-color 0.2s ease;
}

.prose-custom tbody tr:hover {
  background-color: rgba(14, 165, 233, 0.05);
}

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

.prose-custom blockquote {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  border-left: 4px solid #d4af37;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), transparent);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: #cbd5e1;
}

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

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

.prose-custom blockquote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #94a3b8;
  font-style: normal;
}

.prose-custom img {
  max-width: 100%;
  height: auto;
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 0.75rem;
  display: block;
  border: 1px solid rgba(14, 165, 233, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.prose-custom code {
  background-color: rgba(14, 165, 233, 0.1);
  color: #06b6d4;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: ui-monospace, monospace;
  font-weight: 500;
}

.prose-custom pre {
  background-color: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
  padding: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.prose-custom pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: 0.875rem;
}

.prose-custom hr {
  margin-top: 3rem;
  margin-bottom: 3rem;
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
  opacity: 0.5;
}

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

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

.prose-custom dl {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.prose-custom dt {
  font-weight: 700;
  color: #d4af37;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.prose-custom dd {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: #e2e8f0;
}

.prose-custom figure {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.prose-custom figcaption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  color: #94a3b8;
  font-style: italic;
}

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

.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.5);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.8);
}

/* Prevent horizontal overflow globally */
body {
  overflow-x: clip;
}

/* Game Card Hover Effects */
.game-card {
  transition: all 0.3s ease;
}

/* Details/Summary Styling */
details summary::-webkit-details-marker {
  display: none;
}

/* Mobile Menu Transitions */
#mobile-menu {
  transition: all 0.3s ease-in-out;
}

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

  .prose-custom h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
  }

  .prose-custom h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }

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

  .prose-custom blockquote {
    padding: 1rem 1rem 1rem 1.25rem;
  }

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

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

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Loading States */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
