/* ========================================
   ANIMATIONS & KEYFRAMES
   ======================================== */

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes particle-float {
  0%, 100% { 
    transform: translate(0, 0);
    opacity: 0;
  }
  10% { opacity: 1; }
  90% { opacity: 1; }
}

@keyframes tilt {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1deg); }
}

.animate-shimmer {
  animation: shimmer 3s infinite;
}

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

/* ========================================
   TILT EFFECT
   ======================================== */

.tilt-element {
  animation: tilt 2s ease-in-out infinite;
  transform-origin: center;
}

/* ========================================
   PARTICLE ANIMATION
   ======================================== */

.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particles::before,
.particles::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(212, 175, 55, 0.6);
  border-radius: 50%;
  animation: particle-float 8s ease-in-out infinite;
}

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

.particles::after {
  top: 60%;
  right: 15%;
  animation-delay: 2s;
  animation-duration: 12s;
}

/* ========================================
   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;
  text-wrap: balance;
}

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

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

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

.prose a {
  color: #D4AF37;
  text-decoration: underline;
  text-decoration-color: rgba(212, 175, 55, 0.3);
  text-underline-offset: 0.15em;
  transition: all 0.2s ease;
}

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

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

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

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

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

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

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

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

.prose ul ul,
.prose ul ol,
.prose ol ul,
.prose ol ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

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

.prose blockquote p {
  margin-top: 0;
  margin-bottom: 0;
}

/* Tables */
.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.9375rem;
  background: #12233D;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 0.75rem;
  overflow: hidden;
}

.prose thead {
  background: #1A3052;
}

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

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

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

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

.prose tbody td {
  color: #d1d5db;
  padding: 0.875rem 1rem;
  line-height: 1.5;
}

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

/* Code */
.prose code {
  color: #F0D87A;
  background: rgba(212, 175, 55, 0.1);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

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

.prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
  line-height: 1.7;
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin-top: 2em;
  margin-bottom: 2em;
  border: 2px solid rgba(212, 175, 55, 0.2);
}

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

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */

@media (max-width: 768px) {
  .prose h2 {
    font-size: 1.5rem;
  }
  
  .prose h3 {
    font-size: 1.25rem;
  }
  
  .prose h4 {
    font-size: 1.125rem;
  }
  
  .prose p,
  .prose li {
    font-size: 1rem;
  }
  
  .prose table {
    font-size: 0.875rem;
  }
  
  .prose thead th,
  .prose tbody td {
    padding: 0.625rem 0.75rem;
  }
}

/* Ensure tables never have overflow hidden */
.prose table,
.table-responsive table {
  overflow-x: visible !important;
}

/* ========================================
   SMOOTH SCROLL
   ======================================== */

html {
  scroll-behavior: smooth;
}

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

.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}
