/* Animations */
@keyframes tilt {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-2deg);
  }
  75% {
    transform: rotate(2deg);
  }
}

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

.animate-tilt {
  animation: tilt 3s ease-in-out infinite;
}

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

/* Prose Styling for Markdown Content */
.prose {
  color: #e5e7eb;
  max-width: 100%;
}

.prose h2 {
  color: #D4AF37;
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
}

@media (min-width: 1024px) {
  .prose h2 {
    font-size: 2rem;
  }
}

.prose h3 {
  color: #E5C158;
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.4;
}

@media (min-width: 1024px) {
  .prose h3 {
    font-size: 1.5rem;
  }
}

.prose h4 {
  color: #FFD700;
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.25em;
  margin-bottom: 0.625em;
  line-height: 1.5;
}

@media (min-width: 1024px) {
  .prose h4 {
    font-size: 1.25rem;
  }
}

.prose p {
  margin-top: 0;
  margin-bottom: 1.5em;
  line-height: 1.75;
  color: #d1d5db;
}

.prose a {
  color: #FFD700;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s;
}

.prose a:hover {
  color: #E5C158;
}

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

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

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

@media (min-width: 1024px) {
  .prose ul,
  .prose ol {
    padding-left: 2em;
  }
}

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

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

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  line-height: 1.75;
  color: #d1d5db;
}

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

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

.prose blockquote {
  font-style: italic;
  border-left: 0.25rem solid #D4AF37;
  padding-left: 1em;
  margin-left: 0;
  margin-right: 0;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  color: #e5e7eb;
  background: rgba(139, 21, 56, 0.3);
  padding-top: 0.75em;
  padding-bottom: 0.75em;
  border-radius: 0.5rem;
}

@media (min-width: 1024px) {
  .prose blockquote {
    padding-left: 1.5em;
    padding-right: 1em;
  }
}

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

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.875rem;
  background: #6B1229;
  border-radius: 0.75rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .prose table {
    font-size: 1rem;
  }
}

.prose thead {
  background: #4A0E1F;
  border-bottom: 2px solid #D4AF37;
}

.prose thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  color: #D4AF37;
  border-bottom: 2px solid #D4AF37;
}

@media (min-width: 1024px) {
  .prose thead th {
    padding: 1rem 1.5rem;
  }
}

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

.prose tbody tr:hover {
  background: #8B1538;
}

.prose tbody td {
  padding: 0.75rem 1rem;
  color: #e5e7eb;
}

@media (min-width: 1024px) {
  .prose tbody td {
    padding: 1rem 1.5rem;
  }
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin-top: 2em;
  margin-bottom: 2em;
  border: 2px solid rgba(212, 175, 55, 0.3);
}

.prose code {
  background: #4A0E1F;
  color: #FFD700;
  padding: 0.125em 0.375em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: monospace;
}

.prose pre {
  background: #4A0E1F;
  color: #e5e7eb;
  padding: 1em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

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

.prose hr {
  border: none;
  border-top: 2px solid rgba(212, 175, 55, 0.3);
  margin-top: 3em;
  margin-bottom: 3em;
}

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

/* Ensure good readability - no dark on dark or light on light */
.bg-burgundy-900 .text-burgundy-900,
.bg-burgundy-800 .text-burgundy-800,
.bg-burgundy-700 .text-burgundy-700 {
  color: #D4AF37 !important;
}

/* Custom scrollbar for tables */
.table-responsive::-webkit-scrollbar {
  height: 0.5rem;
}

.table-responsive::-webkit-scrollbar-track {
  background: #4A0E1F;
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #D4AF37;
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #E5C158;
}

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

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