/* Animations */
@keyframes particle-float {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.6;
  }
}

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

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
  }
}

/* Particle container */
.particles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particles-container::before,
.particles-container::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 215, 0, 0.6);
  border-radius: 50%;
  animation: particle-float 6s ease-in-out infinite;
}

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

.particles-container::after {
  top: 60%;
  right: 15%;
  animation-delay: 3s;
}

/* Tilt effect */
.tilt-element {
  animation: tilt 8s ease-in-out infinite;
}

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

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

/* Prose styling for markdown content */
.prose {
  color: rgba(192, 192, 192, 0.9);
  max-width: 100%;
}

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

.prose h3 {
  color: #c0c0c0;
  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: #c0c0c0;
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  font-weight: 600;
  margin-top: 1.4em;
  margin-bottom: 0.6em;
}

.prose p {
  margin-top: 0;
  margin-bottom: 1.25em;
  line-height: 1.7;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.prose a {
  color: #ffd700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
  transition: all 0.2s ease;
}

.prose a:hover {
  color: #00ffff;
  border-bottom-color: #00ffff;
}

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

.prose ul, .prose ol {
  margin-top: 1em;
  margin-bottom: 1.5em;
  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.7;
  padding-left: 0.375em;
}

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

.prose table {
  width: 100%;
  max-width: 100%;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border-collapse: collapse;
  overflow-x: auto;
  display: block;
  font-size: clamp(0.875rem, 1.8vw, 1rem);
}

.prose thead {
  background: rgba(220, 20, 60, 0.3);
}

.prose th {
  padding: 0.875rem;
  text-align: left;
  font-weight: 600;
  color: #ffd700;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.prose td {
  padding: 0.875rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
  color: rgba(192, 192, 192, 0.9);
}

.prose tr:hover {
  background: rgba(220, 20, 60, 0.1);
}

.prose blockquote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border-left: 4px solid #dc143c;
  background: rgba(220, 20, 60, 0.1);
  font-style: italic;
  color: rgba(192, 192, 192, 0.95);
}

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

.prose img {
  max-width: 100%;
  height: auto;
  margin: 2em 0;
  border-radius: 0.5rem;
  border: 2px solid rgba(255, 215, 0, 0.2);
}

.prose code {
  background: rgba(220, 20, 60, 0.2);
  color: #00ffff;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background: rgba(10, 22, 40, 0.8);
  padding: 1.25em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.prose pre code {
  background: none;
  padding: 0;
  color: #c0c0c0;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .prose {
    font-size: 0.95rem;
  }
  
  .prose table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .prose th,
  .prose td {
    padding: 0.625rem;
  }
}

/* Ensure good contrast */
.prose ::selection {
  background: rgba(255, 215, 0, 0.3);
  color: #ffffff;
}

.prose hr {
  border: none;
  border-top: 2px solid rgba(220, 20, 60, 0.3);
  margin: 2em 0;
}
