/* Animations & Custom Styles */

/* Gradient Animation */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

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

@media (prefers-reduced-motion: no-preference) {
  .parallax-bg {
    transition: transform 0.1s ease-out;
  }
}

/* Coin Burst Animation */
@keyframes coin-burst {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(1.5) rotate(360deg);
    opacity: 0;
  }
}

.coin-burst {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff0080, #ff1493);
  box-shadow: 0 0 40px #ff0080;
  animation: coin-burst 4s ease-in-out infinite;
}

.coin-burst-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.coin-burst-2 {
  top: 60%;
  right: 15%;
  animation-delay: 1.5s;
  background: radial-gradient(circle, #00ffff, #0080ff);
  box-shadow: 0 0 40px #00ffff;
}

.coin-burst-3 {
  bottom: 20%;
  left: 50%;
  animation-delay: 3s;
}

/* Marquee Animation */
.marquee-container {
  position: relative;
  width: 100%;
}

.marquee-content {
  display: flex;
  animation: marquee 30s linear infinite;
}

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

.marquee-content:hover {
  animation-play-state: paused;
}

/* Enhanced prose styling for markdown content with proper typography and contrast */
.prose {
  max-width: 100%;
  color: #e5e7eb;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  margin-top: 2.5em;
  margin-bottom: 1em;
  line-height: 1.2;
  color: #00ffff;
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
  letter-spacing: -0.02em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.875em;
  line-height: 1.3;
  color: #ff0080;
  text-shadow: 0 0 15px rgba(255, 0, 128, 0.3);
  letter-spacing: -0.01em;
}

.prose h4 {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 600;
  margin-top: 1.75em;
  margin-bottom: 0.75em;
  line-height: 1.4;
  color: #ff1493;
}

.prose p {
  margin-top: 0;
  margin-bottom: 1.5em;
  line-height: 1.8;
  color: #d1d5db;
}

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

.prose a {
  color: #ff1493;
  text-decoration: underline;
  text-decoration-color: rgba(255, 20, 147, 0.3);
  text-underline-offset: 0.2em;
  transition: all 0.3s ease;
  font-weight: 500;
}

.prose a:hover {
  color: #00ffff;
  text-decoration-color: rgba(0, 255, 255, 0.5);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

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

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

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

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

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

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

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

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

.prose blockquote {
  font-style: italic;
  border-left: 0.25rem solid #ff0080;
  padding-left: 1.5em;
  margin-top: 1.75em;
  margin-bottom: 1.75em;
  color: #9ca3af;
  background: rgba(255, 0, 128, 0.05);
  padding-top: 1em;
  padding-bottom: 1em;
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p {
  color: #d1d5db;
}

.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.prose thead {
  border-bottom: 2px solid rgba(255, 0, 128, 0.4);
}

.prose thead th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 700;
  color: #00ffff;
  background: rgba(0, 255, 255, 0.08);
  vertical-align: bottom;
}

.prose tbody tr {
  border-bottom: 1px solid rgba(255, 0, 128, 0.15);
  transition: background-color 0.2s ease;
}

.prose tbody tr:hover {
  background: rgba(255, 0, 128, 0.05);
}

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

.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.4), 0 0 20px rgba(255, 0, 128, 0.2);
}

.prose figure {
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose figcaption {
  margin-top: 0.875em;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #9ca3af;
  text-align: center;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
  padding: 0.2em 0.4em;
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 0.25rem;
  color: #00ffff;
}

.prose pre {
  overflow-x: auto;
  margin-top: 1.75em;
  margin-bottom: 1.75em;
  padding: 1.25em 1.5em;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 0, 128, 0.2);
  border-radius: 0.5rem;
  line-height: 1.6;
}

.prose pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: #e5e7eb;
}

.prose hr {
  border: none;
  border-top: 2px solid rgba(255, 0, 128, 0.3);
  margin-top: 3em;
  margin-bottom: 3em;
}

/* Table wrapper for horizontal scrolling */
.prose .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 2em;
  margin-bottom: 2em;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 0, 128, 0.2);
}

.prose .table-responsive table {
  margin: 0;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
  .prose {
    font-size: 1rem;
  }

  .prose ul,
  .prose ol {
    padding-left: 1.25em;
  }

  .prose blockquote {
    padding-left: 1em;
  }

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

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

/* Ensure proper contrast in all scenarios */
@media (prefers-color-scheme: light) {
  .prose {
    color: #1f2937;
  }

  .prose p,
  .prose li {
    color: #374151;
  }

  .prose h2 {
    color: #0891b2;
  }

  .prose h3 {
    color: #db2777;
  }
}

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

/* Mobile Menu Active State */
#burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#burger.active span:nth-child(2) {
  opacity: 0;
}

#burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

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

/* Glow Effects */
.glow-magenta {
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.5);
}

.glow-cyan {
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

/* Focus States for Accessibility */
a:focus,
button:focus,
details:focus {
  outline: 2px solid #00ffff;
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  .parallax-bg,
  .coin-burst,
  .marquee-content {
    display: none;
  }
}
