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

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

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

/* Marquee Animation */
.marquee-container {
  position: relative;
}

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

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

.marquee-content {
  display: flex;
  width: max-content;
}

.marquee-content > * {
  flex-shrink: 0;
}

/* Duplicate content for seamless loop */
.marquee-content::after {
  content: "";
  display: flex;
  flex-shrink: 0;
}

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

@keyframes bonus-pulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), 0 0 40px rgba(212, 175, 55, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5), 0 0 60px rgba(212, 175, 55, 0.3);
  }
}

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

.table-responsive table {
  min-width: 600px;
}

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

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

.prose h3 {
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 600;
  color: #ffbf00;
  margin-top: 2em;
  margin-bottom: 0.875em;
  line-height: 1.4;
}

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

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

.prose a {
  color: #d4af37;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}

.prose a:hover {
  color: #ffd700;
  text-decoration-thickness: 2px;
}

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

.prose em {
  color: #fbbf24;
  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-top: 0.5em;
  margin-bottom: 0.5em;
  padding-left: 0.375em;
  color: #d1d5db;
}

.prose li::marker {
  color: #d4af37;
}

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

.prose blockquote {
  border-left: 0.25rem solid #d4af37;
  padding-left: 1.5em;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  margin: 1.75em 0;
  font-style: italic;
  color: #9ca3af;
  background: rgba(212, 175, 55, 0.05);
}

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

.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-top: 1.75em;
  margin-bottom: 1.75em;
  font-size: 0.9375rem;
}

.prose thead {
  border-bottom: 2px solid #d4af37;
}

.prose thead th {
  color: #ffd700;
  font-weight: 600;
  text-align: left;
  padding: 0.75em 1em;
  background: rgba(212, 175, 55, 0.1);
}

.prose tbody tr {
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.prose tbody tr:hover {
  background: rgba(212, 175, 55, 0.05);
}

.prose tbody td {
  padding: 0.75em 1em;
  color: #d1d5db;
}

.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 {
  color: #fbbf24;
  background: rgba(212, 175, 55, 0.1);
  padding: 0.125em 0.375em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: ui-monospace, monospace;
}

.prose pre {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 0.5rem;
  padding: 1.25em;
  overflow-x: auto;
  margin: 1.75em 0;
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: #e5e7eb;
}

.prose hr {
  border: none;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  margin: 2.5em 0;
}

/* Responsive table wrapper */
.prose .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.75em 0;
  border-radius: 0.5rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.prose .table-responsive table {
  margin: 0;
  min-width: 37.5rem;
}

/* Mobile optimizations */
@media (max-width: 48rem) {
  .prose {
    font-size: 1rem;
  }

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

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

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

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

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

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

/* Print styles for prose */
@media print {
  .prose {
    color: #000;
  }

  .prose h2,
  .prose h3,
  .prose h4 {
    color: #000;
    page-break-after: avoid;
  }

  .prose a {
    color: #000;
    text-decoration: underline;
  }

  .prose blockquote {
    border-left-color: #000;
  }
}

/* Smooth Transitions */
* {
  transition-property: color, background-color, border-color, transform, box-shadow;
  transition-duration: 200ms;
  transition-timing-function: ease-in-out;
}

/* Prevent horizontal overflow globally */
html,
body {
  overflow-x: clip;
  overflow-y: auto;
}

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

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

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

/* Print Styles */
@media print {
  .parallax-bg,
  .marquee-content {
    animation: none !important;
  }
}
