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

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

/* Floating Coins Animation */
@keyframes float-coin {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

.floating-coin {
  position: absolute;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
  border-radius: 50%;
  animation: float-coin 8s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.floating-coin::before {
  content: "€";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: bold;
  color: #18181b;
}

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

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

.marquee-container {
  position: relative;
  width: 100%;
}

.marquee-content {
  animation: marquee 40s linear infinite;
  will-change: transform;
}

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

/* Prose Styling for Readability */
.prose-custom {
  color: #e4e4e7;
  line-height: 1.75;
  max-width: 100%;
  font-size: 1.0625rem;
}

/* Enhanced heading styles with proper spacing and contrast */
.prose-custom h2 {
  margin-top: 2em;
  margin-bottom: 1em;
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 800;
  line-height: 1.2;
  color: #fbbf24;
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.prose-custom h3 {
  margin-top: 1.75em;
  margin-bottom: 0.875em;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  color: #fbbf24;
}

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

/* Paragraph styling with optimal readability */
.prose-custom p {
  margin-bottom: 1.25em;
  color: #d4d4d8;
  max-width: 75ch;
}

.prose-custom p:first-of-type {
  font-size: 1.125em;
  line-height: 1.7;
}

/* Comprehensive list styling */
.prose-custom ul,
.prose-custom ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.75em;
  color: #d4d4d8;
}

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

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

.prose-custom li {
  margin-bottom: 0.625em;
  padding-left: 0.375em;
  line-height: 1.7;
}

.prose-custom li::marker {
  color: #f59e0b;
  font-weight: 600;
}

.prose-custom ul ul,
.prose-custom ol ul {
  list-style-type: circle;
  margin-top: 0.625em;
}

.prose-custom ul ol,
.prose-custom ol ol {
  list-style-type: lower-alpha;
  margin-top: 0.625em;
}

/* Link styling with proper contrast and hover states */
.prose-custom a {
  color: #fbbf24;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  border-bottom: 1px solid transparent;
}

.prose-custom a:hover {
  color: #fcd34d;
  border-bottom-color: #fcd34d;
}

.prose-custom a:focus {
  outline: 2px solid #f59e0b;
  outline-offset: 0.125rem;
  border-radius: 0.125rem;
}

/* Strong and emphasis with high contrast */
.prose-custom strong {
  color: #fbbf24;
  font-weight: 700;
}

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

/* Code and pre blocks with proper background contrast */
.prose-custom code {
  background-color: #27272a;
  color: #fcd34d;
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: "Courier New", monospace;
  border: 1px solid #3f3f46;
}

.prose-custom pre {
  background-color: #18181b;
  color: #e4e4e7;
  padding: 1.25em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid #27272a;
  line-height: 1.6;
}

.prose-custom pre code {
  background-color: transparent;
  padding: 0;
  border: none;
  font-size: 0.9375em;
}

/* Blockquote with gradient border and proper spacing */
.prose-custom blockquote {
  border-left: 0.25rem solid #f59e0b;
  padding-left: 1.25em;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  margin: 1.75em 0;
  font-style: italic;
  color: #a1a1aa;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, transparent 100%);
  border-radius: 0 0.25rem 0.25rem 0;
}

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

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

/* Image styling with responsive behavior and proper spacing */
.prose-custom img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 2em auto;
  display: block;
  box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.3);
  border: 2px solid #27272a;
}

.prose-custom figure {
  margin: 2em 0;
  max-width: 100%;
}

.prose-custom figcaption {
  margin-top: 0.75em;
  text-align: center;
  color: #a1a1aa;
  font-size: 0.875em;
  font-style: italic;
}

/* Comprehensive table styling with responsive wrapper */
.prose-custom table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.9375em;
  background-color: #18181b;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
}

.prose-custom thead {
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
}

.prose-custom thead th {
  padding: 1em 1.25em;
  text-align: left;
  font-weight: 700;
  color: #18181b;
  text-transform: uppercase;
  font-size: 0.875em;
  letter-spacing: 0.05em;
}

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

.prose-custom tbody tr:hover {
  background-color: #27272a;
}

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

.prose-custom td {
  padding: 1em 1.25em;
  color: #d4d4d8;
  vertical-align: top;
}

.prose-custom tbody td:first-child {
  font-weight: 600;
  color: #fbbf24;
}

/* Table responsive wrapper with smooth scrolling */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2em 0;
  border-radius: 0.5rem;
  max-width: 100%;
}

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

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

.table-responsive::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #f59e0b 0%, #ec4899 100%);
  border-radius: 0.25rem;
}

/* Horizontal rule styling */
.prose-custom hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #f59e0b 50%, transparent 100%);
  margin: 3em 0;
}

/* Definition lists */
.prose-custom dl {
  margin: 1.5em 0;
}

.prose-custom dt {
  font-weight: 700;
  color: #fbbf24;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

.prose-custom dd {
  margin-left: 1.5em;
  color: #d4d4d8;
  margin-bottom: 1em;
}

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

  .prose-custom table {
    font-size: 0.875em;
  }

  .prose-custom thead th,
  .prose-custom td {
    padding: 0.875em 1em;
  }
}

@media (max-width: 640px) {
  .prose-custom {
    font-size: 0.9375rem;
  }

  .prose-custom h2 {
    margin-top: 1.5em;
  }

  .prose-custom h3 {
    margin-top: 1.25em;
  }

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

  .prose-custom table {
    font-size: 0.8125em;
  }

  .prose-custom thead th,
  .prose-custom td {
    padding: 0.75em 0.875em;
  }

  .prose-custom img {
    margin: 1.5em auto;
  }
}

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

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

::-webkit-scrollbar-track {
  background: #18181b;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f472b6 100%);
}

/* Details/Summary Styling */
details summary {
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: "+";
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  color: #f59e0b;
  transition: transform 0.3s;
}

details[open] summary::after {
  transform: rotate(45deg);
}

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