/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(139, 10, 26, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(220, 20, 60, 0.8);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes pulse-subtle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* ============================================
   MARQUEE ANIMATION
   ============================================ */

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

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

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

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

/* Duplicate content for seamless loop */
.marquee-content::after {
  content: '';
  display: flex;
  flex: 0 0 auto;
}

/* ============================================
   PARALLAX EFFECTS
   ============================================ */

.parallax-element {
  transition: transform 0.1s ease-out;
  will-change: transform;
}

/* ============================================
   PROSE STYLING FOR MARKDOWN CONTENT
   ============================================ */

.prose-custom {
  color: #C0C0C8; /* vampire-silver */
  line-height: 1.7;
  max-width: 100%;
}

/* Headings */
.prose-custom h2 {
  color: #E8E8F0; /* vampire-mist */
  font-size: 1.875rem; /* 30px */
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
  background: linear-gradient(to right, #8B0A1A, #DC143C, #9370DB);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.prose-custom h2:first-child {
  margin-top: 0;
}

.prose-custom h3 {
  color: #E8E8F0; /* vampire-mist */
  font-size: 1.5rem; /* 24px */
  font-weight: 600;
  margin-top: 1.75em;
  margin-bottom: 0.75em;
  line-height: 1.4;
}

.prose-custom h4 {
  color: #9370DB; /* vampire-amethyst */
  font-size: 1.25rem; /* 20px */
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.4;
}

/* Paragraphs */
.prose-custom p {
  margin-bottom: 1.5em;
  line-height: 1.75;
  color: #C0C0C8; /* vampire-silver */
}

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

/* Strong and emphasis */
.prose-custom strong {
  color: #E8E8F0; /* vampire-mist */
  font-weight: 600;
}

.prose-custom em {
  font-style: italic;
  color: #9370DB; /* vampire-amethyst */
}

/* Links */
.prose-custom a {
  color: #DC143C; /* vampire-crimson */
  text-decoration: underline;
  transition: color 0.2s ease;
}

.prose-custom a:hover {
  color: #9370DB; /* vampire-amethyst */
}

/* Lists */
.prose-custom ul,
.prose-custom ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.75em;
  color: #C0C0C8; /* vampire-silver */
}

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

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

.prose-custom li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.prose-custom li::marker {
  color: #9370DB; /* vampire-amethyst */
}

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

/* Nested lists */
.prose-custom ul ul {
  list-style-type: circle;
}

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

/* Tables */
.prose-custom table {
  width: 100%;
  max-width: 100%;
  margin-top: 2em;
  margin-bottom: 2em;
  border-collapse: collapse;
  background-color: rgba(10, 10, 15, 0.5); /* vampire-obsidian/50 */
  border: 1px solid rgba(139, 10, 26, 0.3); /* vampire-ruby/30 */
  border-radius: 0.5rem;
  overflow: hidden;
  display: block;
  overflow-x: auto;
}

.prose-custom thead {
  background-color: rgba(139, 10, 26, 0.2); /* vampire-ruby/20 */
}

.prose-custom th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 700;
  color: #E8E8F0; /* vampire-mist */
  border-bottom: 2px solid rgba(139, 10, 26, 0.3); /* vampire-ruby/30 */
}

.prose-custom td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(139, 10, 26, 0.2); /* vampire-ruby/20 */
  color: #C0C0C8; /* vampire-silver */
}

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

.prose-custom tbody tr:hover {
  background-color: rgba(139, 10, 26, 0.1); /* vampire-ruby/10 */
}

/* Blockquotes */
.prose-custom blockquote {
  margin-top: 1.75em;
  margin-bottom: 1.75em;
  padding-left: 1.5em;
  padding-top: 0.75em;
  padding-bottom: 0.75em;
  border-left: 4px solid #9370DB; /* vampire-amethyst */
  background-color: rgba(26, 26, 36, 0.5); /* vampire-slate/50 */
  font-style: italic;
  color: #E8E8F0; /* vampire-mist */
}

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

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

/* Code blocks */
.prose-custom code {
  background-color: rgba(26, 26, 36, 0.7); /* vampire-slate/70 */
  color: #9370DB; /* vampire-amethyst */
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.prose-custom pre {
  background-color: rgba(10, 10, 15, 0.9); /* vampire-obsidian/90 */
  padding: 1.5em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.75em;
  margin-bottom: 1.75em;
  border: 1px solid rgba(139, 10, 26, 0.3); /* vampire-ruby/30 */
}

.prose-custom pre code {
  background-color: transparent;
  padding: 0;
  color: #C0C0C8; /* vampire-silver */
}

/* Horizontal rules */
.prose-custom hr {
  margin-top: 3em;
  margin-bottom: 3em;
  border: 0;
  border-top: 2px solid rgba(139, 10, 26, 0.3); /* vampire-ruby/30 */
}

/* Images */
.prose-custom img {
  max-width: 100%;
  height: auto;
  margin-top: 2em;
  margin-bottom: 2em;
  border-radius: 0.75rem;
  border: 2px solid rgba(139, 10, 26, 0.3); /* vampire-ruby/30 */
  box-shadow: 0 10px 30px rgba(139, 10, 26, 0.2);
}

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

.prose-custom figcaption {
  margin-top: 0.75em;
  text-align: center;
  font-size: 0.875rem;
  color: #9370DB; /* vampire-amethyst */
  font-style: italic;
}

/* ============================================
   RESPONSIVE TABLE WRAPPER
   ============================================ */

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(26, 26, 36, 0.5);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(139, 10, 26, 0.6);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(220, 20, 60, 0.8);
}

/* ============================================
   CUSTOM UTILITIES
   ============================================ */

.glow-ruby {
  box-shadow: 0 0 20px rgba(139, 10, 26, 0.5);
}

.glow-amethyst {
  box-shadow: 0 0 20px rgba(147, 112, 219, 0.5);
}

.text-shadow-glow {
  text-shadow: 0 0 20px rgba(220, 20, 60, 0.8);
}

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

/* Selection styling */
::selection {
  background-color: rgba(139, 10, 26, 0.7);
  color: #E8E8F0;
}

::-moz-selection {
  background-color: rgba(139, 10, 26, 0.7);
  color: #E8E8F0;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
  .prose-custom h2 {
    font-size: 1.625rem; /* 26px */
  }

  .prose-custom h3 {
    font-size: 1.375rem; /* 22px */
  }

  .prose-custom h4 {
    font-size: 1.125rem; /* 18px */
  }

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

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

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

  .prose-custom h2 {
    font-size: 1.5rem; /* 24px */
  }

  .prose-custom h3 {
    font-size: 1.25rem; /* 20px */
  }

  .prose-custom ul,
  .prose-custom ol {
    padding-left: 1.25em;
  }

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