/* ==========================================
   ANIMATIONS
   ========================================== */

/* Tilt Animation */
@keyframes tilt {
  0%, 100% {
    transform: rotate(-1deg);
  }
  50% {
    transform: rotate(1deg);
  }
}

.animate-tilt {
  animation: tilt 2s ease-in-out infinite;
}

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

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

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

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive::-webkit-scrollbar {
  height: 0.5rem;
}

.table-responsive::-webkit-scrollbar-track {
  background: #1e293b;
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #39ff14;
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #2ed60f;
}

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

.prose {
  color: #e2e8f0;
  max-width: 100%;
}

/* Headings */
.prose h2 {
  color: #39ff14;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 1em;
  letter-spacing: -0.025em;
}

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

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

/* Paragraphs */
.prose p {
  color: #cbd5e1;
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-top: 0;
  margin-bottom: 1.25em;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Links */
.prose a {
  color: #39ff14;
  text-decoration: underline;
  text-decoration-color: rgba(57, 255, 20, 0.3);
  text-underline-offset: 0.25em;
  font-weight: 500;
  transition: all 0.2s ease;
}

.prose a:hover {
  color: #2ed60f;
  text-decoration-color: rgba(57, 255, 20, 0.8);
}

/* Strong/Bold */
.prose strong {
  color: #ffffff;
  font-weight: 600;
}

/* Lists */
.prose ul,
.prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}

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

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

.prose li {
  color: #cbd5e1;
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  padding-left: 0.375em;
}

.prose li::marker {
  color: #39ff14;
}

.prose ul ul,
.prose ul ol,
.prose ol ul,
.prose ol ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

/* Tables */
.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.9375rem;
  line-height: 1.5;
  overflow-x: auto;
  display: block;
}

.prose thead {
  background-color: #1e293b;
  border-bottom: 0.125rem solid #39ff14;
}

.prose thead th {
  color: #39ff14;
  font-weight: 600;
  text-align: left;
  padding: 0.875rem 1rem;
  vertical-align: bottom;
}

.prose tbody tr {
  border-bottom: 0.0625rem solid #334155;
}

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

.prose tbody tr:hover {
  background-color: #1e293b;
}

.prose tbody td {
  color: #cbd5e1;
  padding: 0.875rem 1rem;
  vertical-align: top;
}

/* Blockquotes */
.prose blockquote {
  color: #94a3b8;
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.6;
  border-left: 0.25rem solid #39ff14;
  padding-left: 1.5em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  background-color: rgba(30, 41, 59, 0.5);
  padding-top: 1em;
  padding-bottom: 1em;
  padding-right: 1em;
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p {
  margin-bottom: 0.75em;
}

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

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  margin-top: 2em;
  margin-bottom: 2em;
  border-radius: 0.5rem;
  border: 0.0625rem solid rgba(57, 255, 20, 0.2);
}

/* Code */
.prose code {
  color: #39ff14;
  background-color: #1e293b;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'Courier New', Courier, monospace;
}

.prose pre {
  background-color: #0f172a;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border: 0.0625rem solid #334155;
}

.prose pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Horizontal Rules */
.prose hr {
  border: none;
  border-top: 0.0625rem solid #334155;
  margin-top: 3em;
  margin-bottom: 3em;
}

/* ==========================================
   MOBILE RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
  .prose h2 {
    font-size: 1.5rem;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
  }
  
  .prose h3 {
    font-size: 1.25rem;
    margin-top: 1.25em;
    margin-bottom: 0.625em;
  }
  
  .prose h4 {
    font-size: 1.125rem;
  }
  
  .prose p,
  .prose li {
    font-size: 1rem;
  }
  
  .prose blockquote {
    font-size: 1rem;
    padding-left: 1em;
    padding-right: 0.75em;
  }
  
  .prose table {
    font-size: 0.875rem;
  }
  
  .prose thead th,
  .prose tbody td {
    padding: 0.625rem 0.75rem;
  }
}

/* ==========================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================== */

.prose :focus-visible {
  outline: 0.125rem solid #39ff14;
  outline-offset: 0.125rem;
  border-radius: 0.25rem;
}

/* Ensure sufficient contrast */
.prose ::selection {
  background-color: #39ff14;
  color: #0f172a;
}
