/* Animations */
@keyframes tilt {
  0%, 100% {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  }
  25% {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg);
  }
  75% {
    transform: perspective(1000px) rotateX(-2deg) rotateY(2deg);
  }
}

.tilt-hover:hover {
  animation: tilt 0.6s ease-in-out;
}

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

.marquee-container {
  position: relative;
  width: 100%;
}

.marquee-content {
  display: flex;
  animation: marquee 30s linear infinite;
  width: max-content;
}

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

/* Duplicate content for seamless loop */
.marquee-content::after {
  content: '';
  display: flex;
  position: absolute;
  left: 100%;
  top: 0;
}

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

.prose h2 {
  color: #d4af37;
  font-size: 2rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  border-bottom: 2px solid #6b1f3a;
  padding-bottom: 0.75rem;
}

.prose h3 {
  color: #f0d88a;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.prose h4 {
  color: #f0d88a;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1.5rem;
  color: #e8e8e8;
  font-size: 1.0625rem;
}

.prose a {
  color: #d4af37;
  text-decoration: underline;
  transition: color 0.3s ease;
}

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

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

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

.prose ul,
.prose ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
  color: #e8e8e8;
}

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

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

.prose li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

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

.prose blockquote {
  border-left: 4px solid #6b1f3a;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #c0c0c0;
  background: #3a3a3a;
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2rem 0;
  border: 2px solid #6b1f3a;
  box-shadow: 0 4px 12px rgba(107, 31, 58, 0.3);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: #3a3a3a;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #6b1f3a;
}

.prose thead {
  background: #6b1f3a;
}

.prose th {
  padding: 1rem;
  text-align: left;
  color: #f0d88a;
  font-weight: 600;
  border-bottom: 2px solid #8b2d4f;
}

.prose td {
  padding: 1rem;
  color: #e8e8e8;
  border-bottom: 1px solid #4a1528;
}

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

.prose tr:hover {
  background: #2b2b2b;
}

.prose code {
  background: #3a3a3a;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.9375rem;
  color: #f0d88a;
  border: 1px solid #6b1f3a;
}

.prose pre {
  background: #3a3a3a;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid #6b1f3a;
}

.prose pre code {
  background: transparent;
  padding: 0;
  border: none;
}

.prose hr {
  border: none;
  border-top: 2px solid #6b1f3a;
  margin: 3rem 0;
}

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

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

/* Ensure good contrast */
.prose-invert {
  color: #e8e8e8;
}

.prose-gold h2,
.prose-gold h3,
.prose-gold a {
  color: #d4af37;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .prose {
    font-size: 1rem;
  }
  
  .prose h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
  }
  
  .prose h3 {
    font-size: 1.375rem;
  }
  
  .prose h4 {
    font-size: 1.125rem;
  }
  
  .prose ul,
  .prose ol {
    padding-left: 1.5rem;
  }
  
  .prose blockquote {
    padding-left: 1rem;
    padding: 1rem;
  }
  
  .prose table {
    font-size: 0.9375rem;
  }
  
  .prose th,
  .prose td {
    padding: 0.75rem;
  }
}
