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

/* Tilt Animation */
@keyframes tilt {
  0%, 100% {
    transform: rotate(-0.5deg);
  }
  50% {
    transform: rotate(0.5deg);
  }
}

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

/* Particle Canvas Setup */
#particles {
  pointer-events: none;
}

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

/* Table Responsive Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

/* Prose Styling for Markdown Content */
.prose {
  color: #cbd5e1;
  max-width: 100%;
}

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

.prose h3 {
  color: #f59e0b;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.6em;
  margin-bottom: 0.8em;
  line-height: 1.4;
}

.prose h4 {
  color: #f59e0b;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.4em;
  margin-bottom: 0.6em;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  line-height: 1.75;
  color: #cbd5e1;
}

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

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

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

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

.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.75;
  color: #cbd5e1;
}

.prose ul > li::marker {
  color: #f59e0b;
}

.prose ol > li::marker {
  color: #f59e0b;
  font-weight: 600;
}

.prose blockquote {
  font-style: italic;
  border-left: 0.25rem solid #f59e0b;
  padding-left: 1em;
  margin-top: 1.6em;
  margin-bottom: 1.6em;
  color: #cbd5e1;
  background: rgba(15, 23, 41, 0.5);
  padding: 1em;
  border-radius: 0.5rem;
}

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

@media (min-width: 640px) {
  .prose table {
    display: table;
  }
}

.prose thead {
  background: rgba(15, 23, 41, 0.8);
}

.prose th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  color: #f59e0b;
  border-bottom: 2px solid rgba(245, 158, 11, 0.3);
}

.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.1);
  color: #cbd5e1;
}

.prose tbody tr:hover {
  background: rgba(245, 158, 11, 0.05);
}

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

.prose code {
  color: #fbbf24;
  background: rgba(30, 36, 51, 0.8);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: monospace;
}

.prose pre {
  background: rgba(15, 23, 41, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 0.5rem;
  padding: 1em;
  overflow-x: auto;
  margin-top: 1.6em;
  margin-bottom: 1.6em;
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: #cbd5e1;
}

.prose hr {
  border: 0;
  border-top: 1px solid rgba(245, 158, 11, 0.3);
  margin-top: 3em;
  margin-bottom: 3em;
}

/* Ensure no overflow issues */
.prose * {
  max-width: 100%;
}

/* Particle Canvas Script */\
document.addEventListener('DOMContentLoaded\', function() {\
  const canvas = document.getElementById(\'particles\');\
  if (!canvas) return;
  \
  const ctx = canvas.getContext('2d\');\
  canvas.width = window.innerWidth;\
  canvas.height = window.innerHeight;
  \
  const particles = [];\
  const particleCount = 50;
  
  class Particle {\
    constructor() {\
      this.x = Math.random() * canvas.width;\
      this.y = Math.random() * canvas.height;\
      this.size = Math.random() * 2 + 1;\
      this.speedX = (Math.random() - 0.5) * 0.5;\
      this.speedY = (Math.random() - 0.5) * 0.5;\
      this.opacity = Math.random() * 0.5 + 0.2;
    }
    \
    update() {\
      this.x += this.speedX;\
      this.y += this.speedY;
      \
      if (this.x > canvas.width) this.x = 0;\
      if (this.x < 0) this.x = canvas.width;\
      if (this.y > canvas.height) this.y = 0;\
      if (this.y < 0) this.y = canvas.height;
    }
    \
    draw() {\
      ctx.fillStyle = \`rgba(245, 158, 11, ${this.opacity})`;\
      ctx.beginPath();
      ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
      ctx.fill();
    }
  }
  
  function init() {
    for (let i = 0; i < particleCount; i++) {
      particles.push(new Particle());
    }
  }
  
  function animate() {
    ctx.clearRect(0, 0, canvas.width, canvas.height);
    particles.forEach(particle => {
      particle.update();
      particle.draw();
    });
    requestAnimationFrame(animate);
  }
  
  init();
  animate();
  
  window.addEventListener('resize', () => {
    canvas.width = window.innerWidth;
    canvas.height = window.innerHeight;
  });
});
