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

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

@keyframes pulse-slow {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.05);
  }
}

@keyframes sparkle {
  0%, 100% {
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.5), 0 0 20px rgba(168, 85, 247, 0.3);
  }
  50% {
    text-shadow: 0 0 20px rgba(34, 211, 238, 0.8), 0 0 30px rgba(168, 85, 247, 0.6), 0 0 40px rgba(250, 204, 21, 0.4);
  }
}

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

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

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

.animate-pulse-slow {
  animation: pulse-slow 4s ease-in-out infinite;
}

.sparkle-text {
  animation: sparkle 3s ease-in-out infinite;
}

.animate-marquee {
  animation: marquee 20s linear infinite;
}

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

.prose h2 {
  color: #22d3ee;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
  background: linear-gradient(to right, #fde047, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.prose h3 {
  color: #a78bfa;
  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: #fbbf24;
  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.5em;
  line-height: 1.75;
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: #d1d5db;
}

.prose a {
  color: #22d3ee;
  text-decoration: underline;
  text-decoration-color: rgba(34, 211, 238, 0.3);
  transition: all 0.2s ease;
  word-wrap: break-word;
}

.prose a:hover {
  color: #06b6d4;
  text-decoration-color: rgba(6, 182, 212, 0.6);
}

.prose strong {
  color: #fbbf24;
  font-weight: 700;
}

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

.prose ul {
  list-style-type: disc;
  padding-left: 1.5em;
  margin-top: 1em;
  margin-bottom: 1.5em;
}

.prose ol {
  list-style-type: decimal;
  padding-left: 1.5em;
  margin-top: 1em;
  margin-bottom: 1.5em;
}

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

.prose li::marker {
  color: #22d3ee;
}

.prose blockquote {
  border-left: 4px solid #22d3ee;
  padding-left: 1.5em;
  margin-left: 0;
  margin-right: 0;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  font-style: italic;
  color: #c4b5fd;
  background: rgba(168, 85, 247, 0.1);
  padding-top: 1em;
  padding-bottom: 1em;
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin-top: 2em;
  margin-bottom: 2em;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.3);
  border: 2px solid rgba(34, 211, 238, 0.2);
}

.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-top: 2em;
  margin-bottom: 2em;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.3), rgba(67, 56, 202, 0.3));
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.prose thead {
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.5), rgba(67, 56, 202, 0.5));
}

.prose th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 700;
  color: #22d3ee;
  border-bottom: 2px solid rgba(34, 211, 238, 0.3);
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.prose td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  color: #d1d5db;
  font-size: clamp(0.875rem, 2vw, 1rem);
}

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

.prose tbody tr:hover {
  background: rgba(139, 92, 246, 0.15);
  transition: background 0.2s ease;
}

.prose code {
  background: rgba(168, 85, 247, 0.2);
  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);
  color: #d1d5db;
  padding: 1.5em;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.875em;
}

.prose hr {
  border: none;
  border-top: 2px solid rgba(34, 211, 238, 0.3);
  margin-top: 3em;
  margin-bottom: 3em;
}

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

/* Ensure responsive behavior */
@media (max-width: 768px) {
  .prose {
    font-size: 1rem;
  }
  
  .prose h2 {
    font-size: 1.5rem;
    margin-top: 1.5em;
  }
  
  .prose h3 {
    font-size: 1.25rem;
    margin-top: 1.25em;
  }
  
  .prose table {
    font-size: 0.875rem;
  }
  
  .prose th,
  .prose td {
    padding: 0.625rem 0.75rem;
  }
}
