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

@keyframes tilt {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

@keyframes particle {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-20px) scale(1.05);
    opacity: 1;
  }
}

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

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

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

.animate-particle {
  animation: particle 6s ease-in-out infinite;
}

.animate-shimmer {
  animation: shimmer 3s linear infinite;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 1000px 100%;
}

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

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

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

.prose h2 {
  font-size: 1.875rem;
  font-weight: 800;
  color: #db2777;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.prose h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ec4899;
  margin-top: 1.75rem;
  margin-bottom: 0.875rem;
  line-height: 1.4;
}

.prose h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f472b6;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.prose p {
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #4b5563;
}

.prose a {
  color: #db2777;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: #be185d;
}

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

.prose em {
  font-style: italic;
}

.prose ul {
  list-style-type: disc;
  padding-left: 1.75em;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.prose ol {
  list-style-type: decimal;
  padding-left: 1.75em;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.prose li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.7;
  color: #4b5563;
}

.prose li > p {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

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

.prose blockquote {
  border-left: 0.25rem solid #fbbf24;
  padding-left: 1.5rem;
  font-style: italic;
  color: #6b7280;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #fef3c7, transparent);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-radius: 0.25rem;
}

.prose blockquote p {
  margin-top: 0;
  margin-bottom: 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.prose thead {
  background: linear-gradient(to right, #db2777, #fbbf24);
}

.prose thead th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}

.prose tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s ease;
}

.prose tbody tr:hover {
  background-color: #fef3c7;
}

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

.prose td {
  padding: 0.875rem 1rem;
  color: #4b5563;
}

.prose tbody td:first-child {
  font-weight: 600;
  color: #1f2937;
}

.prose code {
  background-color: #fef3c7;
  color: #db2777;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: "Courier New", monospace;
}

.prose pre {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

.prose pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: 1em;
}

.prose hr {
  border: none;
  border-top: 2px solid #fbbf24;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

/* Table responsive wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

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

/* Additional responsive utilities */
@media (max-width: 768px) {
  .prose {
    font-size: 0.9375rem;
  }

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

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

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

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

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

/* Accessibility improvements */
.prose a:focus,
button:focus,
details:focus {
  outline: 2px solid #db2777;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .prose {
    color: #000;
  }

  .prose a {
    text-decoration: underline;
    color: #000;
  }
}
