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

@keyframes tilt {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(3deg) scale(1.05);
  }
  75% {
    transform: rotate(-3deg) scale(0.95);
  }
}

@keyframes tilt-reverse {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-3deg) scale(0.95);
  }
  75% {
    transform: rotate(3deg) scale(1.05);
  }
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

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

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

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

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient 5s ease infinite;
}

/* Enhanced prose styling for markdown content with better readability and responsive design */
.prose {
  color: #e8e8f0;
  max-width: 100%;
  line-height: 1.75;
}

.prose h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #00d4ff;
  margin-top: 2.5em;
  margin-bottom: 1em;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.prose h3 {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 600;
  color: #ff0040;
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

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

.prose p {
  margin-bottom: 1.5em;
  line-height: 1.8;
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  color: #c8c8d8;
}

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

.prose ul,
.prose ol {
  margin: 1.5em 0;
  padding-left: 1.75em;
}

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

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

.prose li {
  margin-bottom: 0.75em;
  line-height: 1.75;
  padding-left: 0.5em;
  color: #c8c8d8;
}

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

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

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

.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: clamp(0.875rem, 1.8vw, 1rem);
  overflow-x: auto;
  display: block;
}

.prose thead {
  background: linear-gradient(135deg, #ff0040 0%, #00d4ff 100%);
}

.prose th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.prose td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid #3a3a4e;
  color: #c8c8d8;
}

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

.prose tbody tr:hover {
  background-color: rgba(0, 212, 255, 0.05);
}

.prose blockquote {
  border-left: 4px solid #ff0040;
  padding-left: 1.5em;
  margin: 2em 0;
  font-style: italic;
  color: #b8b8c8;
  background: rgba(255, 0, 64, 0.05);
  padding: 1.5em;
  border-radius: 0.5rem;
}

.prose code {
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: "Courier New", monospace;
}

.prose hr {
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff0040, #00d4ff, transparent);
  margin: 3em 0;
}

.prose-custom {
  max-width: none;
}

.prose-custom p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.prose-custom h1,
.prose-custom h2,
.prose-custom h3,
.prose-custom h4 {
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.prose-custom h3 {
  font-size: 1.5rem;
}

.prose-custom h4 {
  font-size: 1.25rem;
}

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

.prose-custom li {
  margin-bottom: 0.5rem;
}

.prose-custom a {
  color: #00d4ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.prose-custom a:hover {
  color: #ff0040;
}

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

.prose-custom table {
  width: 100%;
  border-collapse: collapse;
}

.prose-custom thead {
  background: linear-gradient(to right, #ff0040, #a020f0);
}

.prose-custom th,
.prose-custom td {
  padding: 0.75rem 1rem;
  text-align: left;
}

.prose-custom tbody tr {
  border-bottom: 1px solid #505070;
}

.prose-custom tbody tr:hover {
  background-color: #2d2d44;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

details summary {
  cursor: pointer;
  user-select: none;
}

details summary::-webkit-details-marker {
  display: none;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
  overflow-y: auto;
}

::selection {
  background-color: #ff0040;
  color: white;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #ff0040, #00d4ff);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #00d4ff, #ff0040);
}

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

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

  .prose th,
  .prose td {
    padding: 0.625rem 0.75rem;
  }

  .table-responsive {
    margin: 0 -1rem;
    padding: 0 1rem;
  }
}
