/* ===========================
   ANIMATIONS & KEYFRAMES
   =========================== */

@keyframes glow-pulse {
  0%, 100% {
    text-shadow: 0 0 1rem rgba(20, 184, 166, 0.5), 0 0 2rem rgba(20, 184, 166, 0.3);
  }
  50% {
    text-shadow: 0 0 1.5rem rgba(20, 184, 166, 0.7), 0 0 3rem rgba(20, 184, 166, 0.5);
  }
}

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

@keyframes particle-float {
  0%, 100% {
    transform: translate(0, 0);
    opacity: 0.3;
  }
  50% {
    transform: translate(2rem, -2rem);
    opacity: 0.6;
  }
}

@keyframes box-glow {
  0%, 100% {
    box-shadow: 0 0 1.5rem rgba(20, 184, 166, 0.4), 0 0 3rem rgba(251, 191, 36, 0.2);
  }
  50% {
    box-shadow: 0 0 2rem rgba(20, 184, 166, 0.6), 0 0 4rem rgba(251, 191, 36, 0.4);
  }
}

@keyframes button-glow {
  0%, 100% {
    box-shadow: 0 0.5rem 1rem rgba(20, 184, 166, 0.5);
  }
  50% {
    box-shadow: 0 0.75rem 1.5rem rgba(20, 184, 166, 0.7);
  }
}

/* ===========================
   GLOW EFFECTS
   =========================== */

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

.glow-box {
  animation: box-glow 3s ease-in-out infinite;
}

.glow-button {
  animation: button-glow 2s ease-in-out infinite;
}

.glow-badge {
  animation: box-glow 4s ease-in-out infinite;
}

.glow-card {
  transition: all 0.3s ease;
}

.glow-card:hover {
  box-shadow: 0 0 1.5rem rgba(20, 184, 166, 0.4);
}

/* ===========================
   PARALLAX & PARTICLE EFFECTS
   =========================== */

.parallax-bg {
  transition: transform 0.3s ease-out;
}

.particles-bg::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(20, 184, 166, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(251, 191, 36, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.1) 0%, transparent 60%);
  animation: particle-float 8s ease-in-out infinite;
  pointer-events: none;
}

/* ===========================
   PROSE STYLING FOR MARKDOWN
   =========================== */

.prose {
  max-width: 100%;
  color: #cbd5e1;
  line-height: 1.75;
}

.prose h2 {
  color: #fbbf24;
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
}

.prose h3 {
  color: #14b8a6;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.6em;
  margin-bottom: 0.8em;
  line-height: 1.4;
}

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

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

.prose a {
  color: #14b8a6;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: #2dd4bf;
}

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

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

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

.prose ul li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  padding-left: 0.375em;
  color: #cbd5e1;
  line-height: 1.6;
}

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

.prose ol li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  padding-left: 0.375em;
  color: #cbd5e1;
  line-height: 1.6;
}

.prose blockquote {
  border-left: 0.25rem solid #14b8a6;
  padding-left: 1.5em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  font-style: italic;
  color: #94a3b8;
  background: rgba(20, 184, 166, 0.05);
  padding-top: 1em;
  padding-bottom: 1em;
  border-radius: 0.25rem;
}

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

.prose table {
  width: 100%;
  max-width: 100%;
  margin-top: 2em;
  margin-bottom: 2em;
  border-collapse: collapse;
  background: #1e293b;
  border-radius: 0.5rem;
  overflow: hidden;
}

.prose thead {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

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

.prose tbody tr {
  border-bottom: 1px solid #334155;
  transition: background-color 0.2s ease;
}

.prose tbody tr:hover {
  background-color: rgba(20, 184, 166, 0.05);
}

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

.prose tbody td {
  padding: 1rem 1.25rem;
  color: #cbd5e1;
  font-size: 0.9375rem;
}

.prose code {
  background: #1e293b;
  color: #2dd4bf;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background: #1e293b;
  padding: 1.5em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border: 1px solid #334155;
}

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

.prose hr {
  border: none;
  border-top: 2px solid #334155;
  margin-top: 3em;
  margin-bottom: 3em;
}

/* ===========================
   TABLE RESPONSIVE WRAPPER
   =========================== */

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.table-responsive table {
  min-width: 40rem;
}

/* ===========================
   MOBILE OPTIMIZATIONS
   =========================== */

@media (max-width: 768px) {
  .prose {
    font-size: 1rem;
  }
  
  .prose h2 {
    font-size: 1.625rem;
  }
  
  .prose h3 {
    font-size: 1.375rem;
  }
  
  .prose h4 {
    font-size: 1.125rem;
  }
  
  .prose table {
    font-size: 0.875rem;
  }
  
  .prose thead th,
  .prose tbody td {
    padding: 0.75rem;
  }
}

/* ===========================
   SMOOTH SCROLL
   =========================== */

html {
  scroll-behavior: smooth;
}

/* ===========================
   DETAILS/SUMMARY STYLING
   =========================== */

details summary {
  transition: color 0.2s ease;
}

details[open] summary {
  color: #14b8a6;
}

details summary::-webkit-details-marker {
  color: #14b8a6;
}
