/* Animations and Custom Styles */

/* Gradient animation */
@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

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

/* Shimmer effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.animate-shimmer {
  background-size: 2000px 100%;
  animation: shimmer 3s linear infinite;
}

/* Pulse glow effect */
@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3), 0 0 40px rgba(255, 0, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 0, 255, 0.5), 0 0 80px rgba(255, 0, 255, 0.3);
  }
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Prism scatter effect */
.prism-scatter {
  background-image: radial-gradient(circle at 20% 30%, rgba(255, 0, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(204, 255, 0, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.15) 0%, transparent 50%);
  animation: scatter 20s ease-in-out infinite;
}

@keyframes scatter {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

/* Marquee animation */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.marquee-content {
  display: flex;
  animation: marquee 40s linear infinite;
  width: fit-content;
}

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

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

/* Parallax base */
.parallax {
  transition: transform 0.1s ease-out;
  will-change: transform;
}

/* Enhanced prose styling for markdown content with proper typography and contrast */
.prose-custom {
  max-width: 100%;
  line-height: 1.75;
  font-size: 1.0625rem;
  color: #e5e7eb;
}

.prose-custom > * {
  margin-bottom: 1.5em;
}

.prose-custom p {
  margin-bottom: 1.5em;
  line-height: 1.75;
  color: #e5e7eb;
}

.prose-custom p:first-of-type {
  font-size: 1.125rem;
  line-height: 1.7;
}

/* Headings with proper hierarchy and contrast */
.prose-custom h1,
.prose-custom h2,
.prose-custom h3,
.prose-custom h4,
.prose-custom h5,
.prose-custom h6 {
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2em;
  margin-bottom: 1em;
  letter-spacing: -0.025em;
}

.prose-custom h1 {
  font-size: 2.5rem;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

.prose-custom h2 {
  font-size: 2rem;
  color: #ccff00;
  text-shadow: 0 0 15px rgba(204, 255, 0, 0.2);
  border-bottom: 2px solid rgba(204, 255, 0, 0.3);
  padding-bottom: 0.5em;
}

.prose-custom h3 {
  font-size: 1.625rem;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.prose-custom h4 {
  font-size: 1.375rem;
  color: #ff00ff;
}

.prose-custom h5 {
  font-size: 1.125rem;
  color: #e5e7eb;
}

.prose-custom h6 {
  font-size: 1rem;
  color: #d1d5db;
}

/* Lists with proper spacing */
.prose-custom ul,
.prose-custom ol {
  margin-bottom: 1.5em;
  padding-left: 1.75em;
  color: #e5e7eb;
}

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

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

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

.prose-custom li::marker {
  color: #ccff00;
}

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

/* Links with proper contrast and hover states */
.prose-custom a {
  color: #ccff00;
  text-decoration: underline;
  text-decoration-color: rgba(204, 255, 0, 0.3);
  text-underline-offset: 0.2em;
  transition: all 0.3s ease;
  font-weight: 500;
}

.prose-custom a:hover {
  color: #ffd700;
  text-decoration-color: rgba(255, 215, 0, 0.6);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

/* Strong and emphasis */
.prose-custom strong {
  font-weight: 700;
  color: #ffffff;
}

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

/* Code blocks with proper contrast */
.prose-custom code {
  background-color: rgba(255, 0, 255, 0.15);
  color: #ffd700;
  padding: 0.25em 0.5em;
  border-radius: 0.375rem;
  font-size: 0.9em;
  font-family: "Courier New", monospace;
  border: 1px solid rgba(255, 0, 255, 0.3);
}

.prose-custom pre {
  background-color: rgba(10, 10, 31, 0.8);
  color: #e5e7eb;
  padding: 1.5em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.5em;
  border: 1px solid rgba(255, 0, 255, 0.2);
}

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

/* Blockquotes with visual distinction */
.prose-custom blockquote {
  border-left: 0.375rem solid #ff00ff;
  padding-left: 1.5em;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  margin: 2em 0;
  font-style: italic;
  color: #d1d5db;
  background-color: rgba(255, 0, 255, 0.05);
  border-radius: 0 0.5rem 0.5rem 0;
}

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

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

/* Images with responsive behavior */
.prose-custom img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 2em 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 0, 255, 0.2);
}

/* Tables with proper styling and responsiveness */
.prose-custom table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.9375rem;
  background-color: rgba(10, 10, 31, 0.6);
  border-radius: 0.5rem;
  overflow: hidden;
}

.prose-custom thead {
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.3), rgba(204, 255, 0, 0.3));
}

.prose-custom th {
  padding: 1em 1.25em;
  text-align: left;
  font-weight: 700;
  color: #ffffff;
  border-bottom: 2px solid rgba(255, 0, 255, 0.5);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.prose-custom td {
  padding: 1em 1.25em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
  line-height: 1.6;
}

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

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

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

/* Table responsive wrapper - MUST be applied to wrapper div, not table */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2em 0;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Horizontal rules */
.prose-custom hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 255, 0.5), rgba(204, 255, 0, 0.5), transparent);
  margin: 3em 0;
}

/* Figure and figcaption */
.prose-custom figure {
  margin: 2em 0;
}

.prose-custom figcaption {
  margin-top: 0.75em;
  font-size: 0.875rem;
  color: #9ca3af;
  text-align: center;
  font-style: italic;
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
  .prose-custom {
    font-size: 1rem;
  }

  .prose-custom h1 {
    font-size: 2rem;
  }

  .prose-custom h2 {
    font-size: 1.625rem;
  }

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

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

  .prose-custom th,
  .prose-custom td {
    padding: 0.75em 1em;
  }

  .prose-custom pre {
    padding: 1em;
  }
}

@media (max-width: 480px) {
  .prose-custom {
    font-size: 0.9375rem;
  }

  .prose-custom h1 {
    font-size: 1.75rem;
  }

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

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

  .prose-custom th,
  .prose-custom td {
    padding: 0.625em 0.75em;
    font-size: 0.875rem;
  }
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a1f;
}

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

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #ccff00, #ff00ff);
}

/* Prevent horizontal overflow */
body {
  overflow-x: clip;
}
