/* Keyframe Animations */
@keyframes pulse-glow {
  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 20px rgba(255, 107, 71, 0.5), 0 0 40px rgba(251, 191, 36, 0.3);
  }
  50% {
    opacity: 0.95;
    text-shadow: 0 0 30px rgba(255, 107, 71, 0.7), 0 0 60px rgba(251, 191, 36, 0.5);
  }
}

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

@keyframes particle-float {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes beam-slide {
  0% {
    transform: translateX(-100%) translateY(100%);
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: translateX(100%) translateY(-100%);
    opacity: 0;
  }
}

/* Animation Classes */
.animate-pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

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

/* Particle System */
#particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: linear-gradient(45deg, #ff6b47, #fbbf24);
  border-radius: 50%;
  animation: particle-float 20s linear infinite;
  box-shadow: 0 0 10px rgba(255, 107, 71, 0.5);
}

/* Coral Beam Effects */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 107, 71, 0.05) 45%,
    rgba(251, 191, 36, 0.05) 50%,
    rgba(255, 107, 71, 0.05) 55%,
    transparent 60%,
    transparent 100%
  );
  animation: beam-slide 15s linear infinite;
  pointer-events: none;
  z-index: 0;
}

/* Parallax Elements */
.parallax {
  will-change: transform;
}

/* Prose Styling for Markdown Content */
.prose {
  color: #e5e7eb;
  max-width: 100%;
}

.prose h2 {
  color: #ff8f75;
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
  background: linear-gradient(to right, #ff8f75, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

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

.prose a {
  color: #ff8f75;
  text-decoration: underline;
  text-decoration-color: rgba(255, 143, 117, 0.3);
  transition: all 0.2s ease;
}

.prose a:hover {
  color: #fbbf24;
  text-decoration-color: rgba(251, 191, 36, 0.6);
}

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

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

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

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

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

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.9375rem;
  background: rgba(31, 41, 55, 0.5);
  border-radius: 0.75rem;
  overflow: hidden;
}

.prose thead {
  background: linear-gradient(to right, rgba(255, 107, 71, 0.2), rgba(251, 191, 36, 0.2));
}

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

.prose td {
  padding: 0.875rem 1rem;
  color: #d1d5db;
  border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

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

.prose tbody tr:hover {
  background: rgba(55, 65, 81, 0.3);
}

.prose blockquote {
  border-left: 4px solid #ff8f75;
  padding-left: 1.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin: 2em 0;
  background: rgba(31, 41, 55, 0.3);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: #d1d5db;
}

.prose blockquote p {
  margin: 0;
}

.prose code {
  background: rgba(31, 41, 55, 0.6);
  color: #fbbf24;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: "Courier New", monospace;
}

.prose pre {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(255, 107, 71, 0.2);
  border-radius: 0.5rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 2em 0;
}

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

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #ff6b47, #fbbf24);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #ff8f75, #fcd34d);
}

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

  .prose h3 {
    font-size: 1.25rem;
  }

  .prose p,
  .prose li {
    font-size: 1rem;
  }

  .prose table {
    font-size: 0.875rem;
  }

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

/* Ensure readability with proper contrast */
.prose {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Add subtle backdrop for better text readability on gradients */
.prose > * {
  position: relative;
}
