/* Particle Animation */
@keyframes particle-float {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-20px) translateX(10px) scale(1.2);
    opacity: 0.6;
  }
}

.particles {
  position: relative;
  width: 100%;
  height: 100%;
}

.particles::before,
.particles::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  animation: particle-float 3s ease-in-out infinite;
}

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

.particles::after {
  top: 60%;
  left: 80%;
  animation-delay: 1.5s;
}

/* Tilt Animation */
@keyframes tilt {
  0%, 100% {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
  }
  25% {
    transform: perspective(1000px) rotateY(2deg) rotateX(1deg);
  }
  75% {
    transform: perspective(1000px) rotateY(-2deg) rotateX(-1deg);
  }
}

.tilt-card {
  animation: tilt 6s ease-in-out infinite;
}

.tilt-card:hover {
  animation-play-state: paused;
}

/* Prose Styling for Markdown Content */
.prose {
  color: #1A0B2E;
  line-height: 1.7;
}

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

.prose h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #6BCF7F;
  margin-top: 1.75em;
  margin-bottom: 0.875em;
  line-height: 1.4;
}

.prose h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #FFD93D;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

.prose p {
  margin-top: 1em;
  margin-bottom: 1em;
  font-size: 1.0625rem;
  line-height: 1.7;
}

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

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

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

.prose ul, .prose ol {
  margin-top: 1em;
  margin-bottom: 1em;
  padding-left: 1.75em;
}

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

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

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

.prose li::marker {
  color: #FF6B9D;
  font-weight: 600;
}

.prose blockquote {
  border-left: 4px solid #FFD93D;
  padding-left: 1.5em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  font-style: italic;
  color: #4A4A4A;
  background: #FFF8F0;
  padding-top: 1em;
  padding-bottom: 1em;
  padding-right: 1em;
  border-radius: 0.5rem;
}

.prose table {
  width: 100%;
  max-width: 100%;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border-collapse: collapse;
  overflow-x: auto;
  display: block;
}

.prose thead {
  background: linear-gradient(135deg, #FF6B9D, #FFD93D);
  color: white;
}

.prose th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.9375rem;
}

.prose td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #E5E7EB;
  font-size: 0.9375rem;
}

.prose tbody tr:hover {
  background: #FFF8F0;
}

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

.prose code {
  background: #FFF8F0;
  color: #FF6B9D;
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background: #1A0B2E;
  color: #FFF8F0;
  padding: 1.25em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

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

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

/* Ensure proper contrast */
.bg-dark {
  color: #FFF8F0;
}

.bg-light {
  color: #1A0B2E;
}

.text-dark {
  color: #1A0B2E;
}

.text-light {
  color: #FFF8F0;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .prose {
    font-size: 1rem;
  }
  
  .prose h2 {
    font-size: 1.625rem;
  }
  
  .prose h3 {
    font-size: 1.375rem;
  }
  
  .prose h4 {
    font-size: 1.125rem;
  }
  
  .prose table {
    font-size: 0.875rem;
  }
  
  .prose th,
  .prose td {
    padding: 0.625rem 0.75rem;
  }
}

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

/* Focus states for accessibility */
a:focus,
button:focus {
  outline: 2px solid #FFD93D;
  outline-offset: 2px;
}
