/* Animation Keyframes */
@keyframes float-particle {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100vh) translateX(20px);
    opacity: 0;
  }
}

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

/* Particle Animation */
.particle-container {
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, #D4AF37, transparent);
  border-radius: 50%;
  animation: float-particle linear infinite;
  box-shadow: 0 0 10px #D4AF37;
}

/* Tilt Animation */
.tilt-card {
  animation: tilt 6s ease-in-out infinite;
  transform-style: preserve-3d;
}

/* Mobile Menu */
.mobile-menu.active {
  display: block;
}

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

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

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

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

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

.prose p {
  margin-top: 1em;
  margin-bottom: 1em;
  line-height: 1.6;
  color: #d1d5db;
  font-size: 1.0625rem;
}

.prose a {
  color: #D4AF37;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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

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

.prose em {
  color: #f3f4f6;
  font-style: italic;
}

.prose ul {
  list-style-type: disc;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.625em;
}

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

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

.prose li::marker {
  color: #D4AF37;
}

.prose blockquote {
  border-left: 0.25rem solid #D4AF37;
  padding-left: 1.5em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  font-style: italic;
  color: #f3f4f6;
  background: rgba(212, 175, 55, 0.05);
  padding-top: 0.75em;
  padding-bottom: 0.75em;
  border-radius: 0 0.5rem 0.5rem 0;
}

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

.prose thead {
  background: rgba(212, 175, 55, 0.1);
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.prose th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 700;
  color: #D4AF37;
  font-size: 0.9375rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.prose td {
  padding: 0.75rem 1rem;
  color: #d1d5db;
  font-size: 0.9375rem;
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.prose tbody tr {
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  transition: background-color 0.2s;
}

.prose tbody tr:hover {
  background: rgba(212, 175, 55, 0.05);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin-top: 2em;
  margin-bottom: 2em;
  border: 2px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.prose code {
  background: rgba(212, 175, 55, 0.1);
  color: #F4D03F;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: monospace;
}

.prose pre {
  background: #0A1E3D;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 0.5rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: #e5e7eb;
  font-size: 0.875rem;
}

.prose hr {
  border: none;
  border-top: 2px solid rgba(212, 175, 55, 0.2);
  margin-top: 3em;
  margin-bottom: 3em;
}

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

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

/* Table scrolling on mobile */
@media (max-width: 640px) {
  .prose table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
