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

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

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

.marquee {
  animation: marquee 20s linear infinite;
}

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

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

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

.prose h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
  color: #6b21a8;
  background: linear-gradient(to right, #9333ea, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.prose h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.25em;
  margin-bottom: 0.5em;
  color: #6b21a8;
}

.prose p {
  margin-top: 0;
  margin-bottom: 1.25em;
  line-height: 1.75;
  font-size: 1.0625rem;
  color: #374151;
}

.prose a {
  color: #9333ea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

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

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

.prose ul {
  list-style-type: disc;
  padding-left: 1.5em;
  margin-top: 1em;
  margin-bottom: 1em;
  color: #374151;
}

.prose ol {
  list-style-type: decimal;
  padding-left: 1.5em;
  margin-top: 1em;
  margin-bottom: 1em;
  color: #374151;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  line-height: 1.75;
  padding-left: 0.375em;
}

.prose ul ul, .prose ol ul {
  list-style-type: circle;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose ul ol, .prose ol ol {
  list-style-type: lower-alpha;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose blockquote {
  font-style: italic;
  border-left: 4px solid #9333ea;
  padding-left: 1.5em;
  margin: 1.5em 0;
  color: #4b5563;
  background: linear-gradient(to right, rgba(147, 51, 234, 0.05), transparent);
  padding-top: 1em;
  padding-bottom: 1em;
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p {
  margin: 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  font-size: 0.9375rem;
  overflow-x: auto;
  display: block;
  max-width: 100%;
}

.prose thead {
  background: linear-gradient(to right, #9333ea, #ec4899);
  color: white;
}

.prose th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  border: 1px solid #d1d5db;
}

.prose td {
  padding: 0.875rem 1rem;
  border: 1px solid #e5e7eb;
  color: #374151;
}

.prose tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.prose tbody tr:hover {
  background-color: #f3e8ff;
}

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

.prose code {
  background-color: #f3e8ff;
  color: #7c3aed;
  padding: 0.125em 0.375em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background-color: #1f2937;
  color: #e5e7eb;
  padding: 1.25em;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.5em 0;
}

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .prose {
    font-size: 1rem;
  }
  
  .prose h2 {
    font-size: 1.5rem;
  }
  
  .prose h3 {
    font-size: 1.25rem;
  }
  
  .prose h4 {
    font-size: 1.125rem;
  }
  
  .prose table {
    font-size: 0.875rem;
  }
  
  .prose th,
  .prose td {
    padding: 0.625rem 0.75rem;
  }
}

/* Ensure no dark text on dark background */
.bg-purple-900 .prose,
.bg-purple-800 .prose,
.bg-gray-900 .prose,
.bg-gray-800 .prose {
  color: #f3f4f6;
}

.bg-purple-900 .prose h2,
.bg-purple-900 .prose h3,
.bg-purple-900 .prose h4,
.bg-purple-800 .prose h2,
.bg-purple-800 .prose h3,
.bg-purple-800 .prose h4 {
  color: #fae8ff;
}

.bg-purple-900 .prose a,
.bg-purple-800 .prose a {
  color: #e9d5ff;
}

.bg-purple-900 .prose a:hover,
.bg-purple-800 .prose a:hover {
  color: #fbcfe8;
}
