/* Parallax Animation */
.parallax-bg {
  transform: translateZ(-1px) scale(1.5);
  will-change: transform;
}

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

.tilt-card:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
  box-shadow: 0 20px 40px rgba(139, 0, 0, 0.3);
}

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

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

/* Keyframe Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(165, 42, 42, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(165, 42, 42, 0.8);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

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

.prose h2 {
  color: #A52A2A;
  font-size: 2rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

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

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

.prose p {
  color: #D8D8D8;
  margin-bottom: 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.prose a {
  color: #A52A2A;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: #B22222;
}

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

.prose ul, .prose ol {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  padding-left: 1.75rem;
}

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

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

.prose li {
  margin-bottom: 0.75rem;
  color: #D8D8D8;
  line-height: 1.7;
}

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

.prose blockquote {
  border-left: 0.25rem solid #A52A2A;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #C0C0C0;
  background: rgba(74, 14, 78, 0.2);
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.prose table {
  width: 100%;
  max-width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  overflow-x: auto;
  display: block;
  background: rgba(74, 14, 78, 0.3);
  border-radius: 0.75rem;
  border: 1px solid rgba(165, 42, 42, 0.3);
}

.prose thead {
  background: #8B0000;
}

.prose th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 600;
  color: #E8E8E8;
  border-bottom: 2px solid rgba(165, 42, 42, 0.5);
  font-size: 0.9375rem;
}

.prose td {
  padding: 1rem 1.5rem;
  color: #D8D8D8;
  border-bottom: 1px solid rgba(165, 42, 42, 0.2);
  font-size: 0.9375rem;
}

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

.prose tbody tr:hover {
  background: rgba(74, 14, 78, 0.4);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.prose code {
  background: rgba(74, 14, 78, 0.5);
  color: #A52A2A;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background: rgba(45, 10, 46, 0.8);
  color: #E8E8E8;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid rgba(165, 42, 42, 0.3);
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.prose hr {
  border: none;
  border-top: 2px solid rgba(165, 42, 42, 0.3);
  margin: 3rem 0;
}

/* Responsive Typography Adjustments */
@media (max-width: 768px) {
  .prose h2 {
    font-size: 1.75rem;
  }
  
  .prose h3 {
    font-size: 1.375rem;
  }
  
  .prose p, .prose li {
    font-size: 1rem;
  }
  
  .prose table {
    font-size: 0.875rem;
  }
  
  .prose th, .prose td {
    padding: 0.75rem 1rem;
  }
}

/* Ensure Readable Contrast */
.prose em {
  color: #C0C0C0;
  font-style: italic;
}

.prose del {
  color: #8B0000;
  text-decoration: line-through;
}

/* List Spacing */
.prose ul ul, .prose ol ul, .prose ul ol, .prose ol ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}
