/* ============================================
   CUSTOM ANIMATIONS & KEYFRAMES
   ============================================ */

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 1rem rgba(236, 72, 153, 0.5),
                 0 0 2rem rgba(236, 72, 153, 0.3);
  }
  50% {
    text-shadow: 0 0 1.5rem rgba(236, 72, 153, 0.7),
                 0 0 3rem rgba(236, 72, 153, 0.5);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 1rem rgba(251, 191, 36, 0.5),
                0 0 2rem rgba(251, 191, 36, 0.3);
  }
  50% {
    box-shadow: 0 0 2rem rgba(251, 191, 36, 0.7),
                0 0 3rem rgba(251, 191, 36, 0.5);
  }
}

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

@keyframes particle-move {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(100vw, -100vh) rotate(360deg);
    opacity: 0;
  }
}

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

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

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* ============================================
   PARTICLE BACKGROUND
   ============================================ */

.particles-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particles-bg::before,
.particles-bg::after {
  content: '';
  position: absolute;
  width: 0.5rem;
  height: 0.5rem;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.8), transparent);
  border-radius: 50%;
  animation: particle-move 15s linear infinite;
}

.particles-bg::before {
  left: 10%;
  top: 80%;
  animation-delay: 0s;
}

.particles-bg::after {
  left: 60%;
  top: 90%;
  animation-delay: 5s;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.8), transparent);
}

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

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.5rem;
}

.table-responsive table {
  min-width: 100%;
  width: max-content;
}

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

.prose-custom,
.prose {
  max-width: 100%;
  color: #d1d5db;
  line-height: 1.75;
}

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

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

.prose-custom h4,
.prose h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #a78bfa;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.5;
}

.prose-custom p,
.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  font-size: 1rem;
  line-height: 1.75;
  color: #d1d5db;
}

.prose-custom a,
.prose a {
  color: #ec4899;
  text-decoration: underline;
  text-decoration-color: rgba(236, 72, 153, 0.4);
  transition: all 0.2s;
}

.prose-custom a:hover,
.prose a:hover {
  color: #f9a8d4;
  text-decoration-color: #f9a8d4;
}

.prose-custom strong,
.prose strong {
  color: #fbbf24;
  font-weight: 700;
}

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

/* Lists */
.prose-custom ul,
.prose ul {
  list-style-type: disc;
  padding-left: 1.625em;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  color: #d1d5db;
}

.prose-custom ol,
.prose ol {
  list-style-type: decimal;
  padding-left: 1.625em;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  color: #d1d5db;
}

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

.prose-custom li > p,
.prose li > p {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

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

/* Tables */
.prose-custom table,
.prose table {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.9375rem;
  line-height: 1.5;
  overflow-x: auto;
  display: block;
}

.prose-custom thead,
.prose thead {
  background-color: #1e293b;
  border-bottom: 0.125rem solid #ec4899;
}

.prose-custom thead th,
.prose thead th {
  color: #fbbf24;
  font-weight: 600;
  vertical-align: bottom;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 0.0625rem solid #475569;
}

.prose-custom tbody tr,
.prose tbody tr {
  border-bottom: 0.0625rem solid #334155;
  transition: background-color 0.2s;
}

.prose-custom tbody tr:hover,
.prose tbody tr:hover {
  background-color: #1e293b;
}

.prose-custom tbody td,
.prose tbody td {
  padding: 0.75rem 1rem;
  vertical-align: top;
  color: #d1d5db;
  border-bottom: 0.0625rem solid #334155;
}

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

/* Blockquotes */
.prose-custom blockquote,
.prose blockquote {
  font-style: italic;
  border-left: 0.25rem solid #ec4899;
  padding-left: 1.5em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  color: #9ca3af;
  background-color: rgba(236, 72, 153, 0.05);
  padding-top: 1em;
  padding-bottom: 1em;
  border-radius: 0.25rem;
}

.prose-custom blockquote p,
.prose blockquote p {
  margin: 0;
}

/* Images */
.prose-custom img,
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin-top: 2em;
  margin-bottom: 2em;
  box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.3);
  border: 0.0625rem solid rgba(236, 72, 153, 0.2);
}

/* Code */
.prose-custom code,
.prose code {
  background-color: #1e293b;
  color: #22d3ee;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
  border: 0.0625rem solid #334155;
}

.prose-custom pre,
.prose pre {
  background-color: #0f172a;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.75em;
  margin-bottom: 1.75em;
  border: 0.0625rem solid #334155;
  line-height: 1.75;
}

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

/* Horizontal Rule */
.prose-custom hr,
.prose hr {
  border: none;
  border-top: 0.0625rem solid rgba(236, 72, 153, 0.3);
  margin-top: 3em;
  margin-bottom: 3em;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 640px) {
  .prose-custom h2,
  .prose h2 {
    font-size: 1.5rem;
  }

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

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

  .prose-custom thead th,
  .prose thead th,
  .prose-custom tbody td,
  .prose tbody td {
    padding: 0.5rem 0.75rem;
  }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

*:focus {
  outline: 0.125rem solid #ec4899;
  outline-offset: 0.125rem;
}

.sr-only {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
