/* ========================================
   ANIMATIONS & EFFECTS
   ======================================== */

/* Particle Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-10px) translateX(-10px);
    opacity: 0.4;
  }
  75% {
    transform: translateY(-30px) translateX(15px);
    opacity: 0.5;
  }
}

.particles {
  position: relative;
}

.particles::before,
.particles::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: linear-gradient(45deg, #d4af37, #f4d03f);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
  box-shadow:
    0 0 10px rgba(212, 175, 55, 0.5),
    20px 30px 0 rgba(212, 175, 55, 0.3),
    40px 10px 0 rgba(244, 208, 63, 0.4),
    -20px 50px 0 rgba(212, 175, 55, 0.3),
    -40px 20px 0 rgba(244, 208, 63, 0.4),
    60px 60px 0 rgba(212, 175, 55, 0.2),
    80px 30px 0 rgba(244, 208, 63, 0.3),
    -60px 70px 0 rgba(212, 175, 55, 0.3),
    100px 80px 0 rgba(244, 208, 63, 0.2),
    -80px 40px 0 rgba(212, 175, 55, 0.3);
}

.particles::after {
  animation-delay: 3s;
  animation-duration: 8s;
}

/* Tilt Card Effect */
.tilt-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tilt-card:hover {
  transform: translateY(-5px) rotateX(2deg) rotateY(2deg);
  box-shadow: 0 20px 40px rgba(212, 175, 55, 0.3);
}

/* Glow Pulse */
@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
  }
}

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

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

.prose-custom {
  color: #c5c8d0;
  line-height: 1.75;
}

/* Headings */
.prose-custom h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #d4af37;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
}

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

.prose-custom h4 {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  font-weight: 600;
  color: #d4af37;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

/* Paragraphs */
.prose-custom p {
  margin-bottom: 1.25em;
  font-size: clamp(0.9375rem, 2vw, 1rem);
  color: #c5c8d0;
}

/* Links */
.prose-custom a {
  color: #f4d03f;
  text-decoration: underline;
  text-decoration-color: rgba(244, 208, 63, 0.3);
  transition: all 0.3s ease;
}

.prose-custom a:hover {
  color: #d4af37;
  text-decoration-color: #d4af37;
}

/* Lists */
.prose-custom ul,
.prose-custom ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

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

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

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

.prose-custom li::marker {
  color: #d4af37;
}

/* Strong/Bold */
.prose-custom strong,
.prose-custom b {
  color: #f4d03f;
  font-weight: 600;
}

/* Emphasis/Italic */
.prose-custom em,
.prose-custom i {
  color: #c5c8d0;
  font-style: italic;
}

/* Blockquotes */
.prose-custom blockquote {
  border-left: 0.25rem solid #d4af37;
  padding-left: 1.5em;
  margin: 1.5em 0;
  font-style: italic;
  color: #8a8e97;
  background: rgba(42, 45, 51, 0.5);
  padding: 1.5em;
  border-radius: 0.5rem;
}

.prose-custom blockquote p {
  margin: 0;
}

/* Tables */
.prose-custom table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: clamp(0.875rem, 1.8vw, 1rem);
  background: #2d3139;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.prose-custom thead {
  background: #4a4e57;
}

.prose-custom th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #d4af37;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.prose-custom td {
  padding: 0.875rem 1rem;
  color: #c5c8d0;
  border-bottom: 1px solid rgba(138, 142, 151, 0.1);
}

.prose-custom tbody tr:hover {
  background: rgba(74, 78, 87, 0.3);
}

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

/* Table Wrapper for Responsive Scrolling */
.table-responsive {
  overflow-x: auto;
  margin: 1.5em 0;
  border-radius: 0.75rem;
  -webkit-overflow-scrolling: touch;
}

/* Images */
.prose-custom img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2em auto;
  display: block;
  border: 2px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Code */
.prose-custom code {
  background: #2d3139;
  color: #f4d03f;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: "Courier New", monospace;
}

.prose-custom pre {
  background: #2d3139;
  color: #c5c8d0;
  padding: 1.5em;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.prose-custom pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Horizontal Rules */
.prose-custom hr {
  border: none;
  border-top: 2px solid rgba(212, 175, 55, 0.2);
  margin: 2.5em 0;
}

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

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

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

/* ========================================
   UTILITY OVERRIDES
   ======================================== */

/* Ensure proper overflow handling */
html {
  overflow-x: clip;
  overflow-y: auto;
}

body {
  overflow-x: clip;
  overflow-y: auto;
}

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

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 0.625rem;
}

::-webkit-scrollbar-track {
  background: #1a1d23;
}

::-webkit-scrollbar-thumb {
  background: #d4af37;
  border-radius: 0.3125rem;
}

::-webkit-scrollbar-thumb:hover {
  background: #f4d03f;
}
