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

@keyframes glow {
  0%,
  100% {
    text-shadow: 0 0 20px rgba(233, 30, 140, 0.8), 0 0 40px rgba(233, 30, 140, 0.6), 0 0 60px rgba(233, 30, 140, 0.4);
  }
  50% {
    text-shadow: 0 0 30px rgba(233, 30, 140, 1), 0 0 60px rgba(233, 30, 140, 0.8), 0 0 90px rgba(233, 30, 140, 0.6);
  }
}

@keyframes pulse-slow {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

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

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Animation Classes */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

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

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

.animate-pulse-slow-delayed {
  animation: pulse-slow 4s ease-in-out infinite 2s;
}

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

/* Hero Pattern Background */
.hero-pattern {
  background-image: radial-gradient(circle at 20% 50%, rgba(233, 30, 140, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(20, 184, 184, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(177, 0, 255, 0.1) 0%, transparent 50%);
  background-size: 100% 100%;
  animation: pulse-slow 8s ease-in-out infinite;
}

/* Parallax Effect */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

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

/* Enhanced Prose Styling */
.prose {
  color: #e5e7eb;
  line-height: 1.8;
  max-width: 100%;
}

.prose p {
  margin-bottom: 1.5em;
  line-height: 1.8;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: #ffffff;
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 1em;
  line-height: 1.3;
}

.prose h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: #14b8b8;
  padding-bottom: 0.5em;
  border-bottom: 2px solid rgba(20, 184, 184, 0.3);
}

.prose h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: #e91e8c;
}

.prose h4 {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  color: #1dd1d1;
}

.prose a {
  color: #14b8b8;
  text-decoration: underline;
  text-decoration-color: rgba(20, 184, 184, 0.3);
  text-underline-offset: 0.2em;
  transition: all 0.2s;
}

.prose a:hover {
  color: #1dd1d1;
  text-decoration-color: rgba(29, 209, 209, 0.6);
}

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

.prose ul,
.prose ol {
  margin-left: 1.5em;
  margin-bottom: 1.5em;
  padding-left: 0.5em;
}

.prose li {
  margin-bottom: 0.75em;
  line-height: 1.7;
}

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

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

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

.prose code {
  background-color: rgba(233, 30, 140, 0.1);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  color: #1dd1d1;
}

.prose blockquote {
  border-left: 0.25rem solid #e91e8c;
  padding-left: 1.5em;
  margin-left: 0;
  margin-right: 0;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  font-style: italic;
  color: #d1d5db;
  background-color: rgba(233, 30, 140, 0.05);
  padding-top: 1em;
  padding-bottom: 1em;
  border-radius: 0.25rem;
}

.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.95em;
  background-color: rgba(30, 41, 59, 0.5);
  border-radius: 0.5rem;
  overflow: hidden;
}

.prose thead {
  background-color: rgba(233, 30, 140, 0.2);
}

.prose th {
  padding: 1em 0.75em;
  text-align: left;
  font-weight: 600;
  border: 1px solid rgba(233, 30, 140, 0.3);
  color: #ffffff;
}

.prose td {
  padding: 0.875em 0.75em;
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: #e5e7eb;
}

.prose tbody tr:hover {
  background-color: rgba(20, 184, 184, 0.08);
  transition: background-color 0.2s;
}

.prose tbody tr:nth-child(even) {
  background-color: rgba(15, 23, 42, 0.3);
}

/* Lead Paragraph */
.prose .lead {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  line-height: 1.8;
  color: #d1d5db;
  margin-bottom: 2em;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose > *:last-child {
  margin-bottom: 0;
}

/* Table Responsive Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border-radius: 0.5rem;
  max-width: 100%;
}

/* Custom Scrollbar */
.table-responsive::-webkit-scrollbar {
  height: 0.5rem;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(233, 30, 140, 0.5);
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(233, 30, 140, 0.7);
}

/* Details/Summary Styling */
details summary::-webkit-details-marker {
  display: none;
}

details[open] summary {
  border-bottom: 1px solid rgba(233, 30, 140, 0.2);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #e91e8c 0%, #14b8b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Button Hover Effects */
.btn-hover-scale:hover {
  transform: scale(1.05);
}

/* Card Hover Effects */
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(233, 30, 140, 0.3);
}

/* Neon Border Animation */
.neon-border {
  border: 2px solid transparent;
  background: linear-gradient(#1e293b, #1e293b) padding-box, linear-gradient(135deg, #e91e8c, #14b8b8) border-box;
  animation: spin-slow 8s linear infinite;
}

/* Text Shadow for Better Readability */
.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Image Overlay */
.image-overlay {
  position: relative;
}

.image-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 50%);
  pointer-events: none;
}

/* Responsive Typography Adjustments */
@media (max-width: 640px) {
  .prose {
    font-size: 0.95rem;
  }

  .prose h2 {
    margin-top: 2em;
  }

  .prose h3 {
    margin-top: 1.75em;
  }

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

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

  .prose th,
  .prose td {
    padding: 0.75em 0.5em;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .prose {
    font-size: 1rem;
  }
}

@media (min-width: 1025px) {
  .prose {
    font-size: 1.0625rem;
  }

  .prose p {
    margin-bottom: 1.75em;
  }
}

/* Prevent Horizontal Overflow */
html,
body {
  overflow-x: clip;
  max-width: 100vw;
}

* {
  box-sizing: border-box;
}

img,
video {
  max-width: 100%;
  height: auto;
}
