/* Particle Animation */
@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(10px, -10px) rotate(5deg); }
  50% { transform: translate(-5px, -20px) rotate(-5deg); }
  75% { transform: translate(-10px, -10px) rotate(3deg); }
}

@keyframes glow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

.particle-container::before,
.particle-container::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #d4af37;
  border-radius: 50%;
  animation: float 8s ease-in-out infinite, glow 3s ease-in-out infinite;
}

.particle-container::before {
  top: 20%;
  left: 15%;
  animation-delay: 0s;
}

.particle-container::after {
  top: 60%;
  right: 20%;
  animation-delay: 2s;
}

/* Tilt Card Animation */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

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

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

/* Details/Summary Styling */
details summary {
  list-style: none;
  position: relative;
  padding-right: 2rem;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: '+';
  position: absolute;
  right: 1rem;
  top: 0;
  font-size: 1.5rem;
  color: #d4af37;
  transition: transform 0.3s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

/* Prose Styling for Markdown Content */
.prose {
  color: #f4e4b8;
  line-height: 1.75;
}

.prose h2 {
  color: #d4af37;
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 1em;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.prose h3 {
  color: #d4af37;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.4;
}

.prose h4 {
  color: #f4e4b8;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  color: rgba(244, 228, 184, 0.85);
}

.prose a {
  color: #d4af37;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: all 0.2s ease;
}

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

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

.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 {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  color: rgba(244, 228, 184, 0.85);
}

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

.prose blockquote {
  font-style: italic;
  border-left: 0.25rem solid #d4af37;
  padding-left: 1.5em;
  margin-top: 2em;
  margin-bottom: 2em;
  color: rgba(244, 228, 184, 0.9);
  background: rgba(45, 90, 69, 0.2);
  padding-top: 1em;
  padding-bottom: 1em;
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose table {
  width: 100%;
  max-width: 100%;
  margin-top: 2em;
  margin-bottom: 2em;
  border-collapse: collapse;
  background: rgba(26, 58, 46, 0.3);
  border: 1px solid rgba(45, 90, 69, 0.5);
  border-radius: 0.75rem;
  overflow: hidden;
}

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

.prose th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #d4af37;
  font-size: 0.9375rem;
}

.prose td {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(45, 90, 69, 0.3);
  color: rgba(244, 228, 184, 0.85);
}

.prose tbody tr:hover {
  background: rgba(45, 90, 69, 0.2);
}

.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);
}

.prose code {
  color: #d4af37;
  background: rgba(45, 90, 69, 0.3);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background: rgba(26, 58, 46, 0.5);
  border: 1px solid rgba(45, 90, 69, 0.5);
  border-radius: 0.5rem;
  padding: 1.5em;
  margin-top: 2em;
  margin-bottom: 2em;
  overflow-x: auto;
}

.prose pre code {
  background: none;
  padding: 0;
  color: #f4e4b8;
}

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

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

/* Responsive Typography */
@media (max-width: 768px) {
  .prose h2 {
    font-size: 1.5rem;
    margin-top: 2em;
  }
  
  .prose h3 {
    font-size: 1.25rem;
    margin-top: 1.75em;
  }
  
  .prose table {
    font-size: 0.875rem;
  }
  
  .prose th,
  .prose td {
    padding: 0.5rem 0.75rem;
  }
}

/* Ensure no fixed widths */
.prose * {
  max-width: 100%;
}

/* Better readability - prevent dark text on dark background */
.prose {
  background: transparent;
}

.prose p,
.prose li,
.prose td {
  line-height: 1.7;
}

/* Enhanced link visibility */
.prose a {
  font-weight: 500;
}

/* Better spacing for lists */
.prose ul ul,
.prose ol ul,
.prose ul ol,
.prose ol ol {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}
