/* Particle Animation Background */
.particles-container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particles-container::before,
.particles-container::after {
  content: "";
  position: absolute;
  width: 40%;
  height: 40%;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 20s infinite ease-in-out;
}

.particles-container::before {
  background: radial-gradient(circle, #f59e0b, #d97706);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.particles-container::after {
  background: radial-gradient(circle, #fbbf24, #f59e0b);
  bottom: 10%;
  right: 10%;
  animation-delay: 5s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.1);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  75% {
    transform: translate(20px, 30px) scale(1.05);
  }
}

/* Tilt Animation */
.tilt-element {
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.tilt-element:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) scale(1.02);
}

/* Golden Glow Arc Effect */
@keyframes arc-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3), 0 0 40px rgba(245, 158, 11, 0.2), inset 0 0 20px
      rgba(245, 158, 11, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.5), 0 0 60px rgba(245, 158, 11, 0.3), inset 0 0 30px
      rgba(245, 158, 11, 0.2);
  }
}

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

.table-responsive::-webkit-scrollbar {
  height: 0.5rem;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(51, 65, 85, 0.3);
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.5);
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.7);
}

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

.prose h2 {
  color: #fbbf24;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
  background: linear-gradient(to right, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.prose h3 {
  color: #fcd34d;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  margin-top: 1.6em;
  margin-bottom: 0.8em;
  line-height: 1.4;
}

.prose h4 {
  color: #fde68a;
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  font-weight: 600;
  margin-top: 1.4em;
  margin-bottom: 0.7em;
  line-height: 1.5;
}

.prose p {
  margin-top: 0;
  margin-bottom: 1.25em;
  line-height: 1.75;
  font-size: clamp(0.9375rem, 2vw, 1rem);
  color: #cbd5e1;
}

.prose a {
  color: #fbbf24;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

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

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

.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 li::marker {
  color: #f59e0b;
}

.prose blockquote {
  border-left: 0.25rem solid #f59e0b;
  padding-left: 1.5em;
  margin-left: 0;
  margin-right: 0;
  margin-top: 1.6em;
  margin-bottom: 1.6em;
  font-style: italic;
  color: #e2e8f0;
  background: rgba(245, 158, 11, 0.05);
  padding-top: 1em;
  padding-bottom: 1em;
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: clamp(0.875rem, 1.8vw, 0.9375rem);
  background: rgba(15, 23, 42, 0.5);
  border-radius: 0.75rem;
  overflow: hidden;
}

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

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

.prose tbody tr {
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  transition: background-color 0.2s ease;
}

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

.prose tbody td {
  padding: 0.75rem 1rem;
  color: #cbd5e1;
}

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

.prose code {
  background: rgba(245, 158, 11, 0.1);
  color: #fcd34d;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: "Courier New", monospace;
}

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

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

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

/* Ensure tables in prose are scrollable on mobile */
.prose .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 2em;
  margin-bottom: 2em;
}

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

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

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

/* Smooth Transitions */
* {
  scroll-behavior: smooth;
}

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