/* Duck Dash Pop Flow - Custom CSS */
/* Animations & Keyframes */

@keyframes gradient {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

@keyframes bounce-soft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Animation Classes */
.animate-gradient {
  background-size: 200% 200%;
  animation: gradient 4s ease infinite;
}

.animate-pulse-soft {
  animation: pulse-soft 3s ease-in-out infinite;
}

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

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

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

.table-responsive table {
  min-width: 100%;
}

/* Smooth Transitions */
.game-card,
.step-card,
.promo-card,
.review-block {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover,
.step-card:hover,
.promo-card:hover {
  transform: translateY(-4px);
}

/* Tilt Element Base */
.tilt-element {
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
}

/* Button Hover Effects */
.btn-primary,
.btn-secondary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

/* Navigation Link Underline Effect */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffd93d, #ff9f1c);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* FAQ Accordion Styles */
.faq-toggle {
  cursor: pointer;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-content:not(.hidden) {
  max-height: 500px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 0.5rem;
  height: 0.5rem;
}

::-webkit-scrollbar-track {
  background: #0f0f1a;
}

::-webkit-scrollbar-thumb {
  background: #ffd93d;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff9f1c;
}

/* Selection Color */
::selection {
  background: rgba(255, 217, 61, 0.3);
  color: #fff;
}

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

/* Prose Styling for Markdown Content */
.prose {
  --tw-prose-body: #d1d5db;
  --tw-prose-headings: #ffffff;
  --tw-prose-lead: #9ca3af;
  --tw-prose-links: #ffd93d;
  --tw-prose-bold: #ffffff;
  --tw-prose-counters: #2ec4b6;
  --tw-prose-bullets: #ffd93d;
  --tw-prose-hr: #374151;
  --tw-prose-quotes: #f3f4f6;
  --tw-prose-quote-borders: #ffd93d;
  --tw-prose-captions: #9ca3af;
  --tw-prose-code: #ff6b9d;
  --tw-prose-pre-code: #e5e7eb;
  --tw-prose-pre-bg: #1a1a2e;
  --tw-prose-th-borders: #4b5563;
  --tw-prose-td-borders: #374151;
  color: var(--tw-prose-body);
  max-width: 100%;
  font-size: 1rem;
  line-height: 1.75;
}

.prose h2 {
  color: var(--tw-prose-headings);
  font-weight: 700;
  font-size: 1.75em;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
  padding-bottom: 0.5em;
  border-bottom: 2px solid rgba(255, 217, 61, 0.2);
}

.prose h3 {
  color: var(--tw-prose-headings);
  font-weight: 600;
  font-size: 1.375em;
  margin-top: 1.75em;
  margin-bottom: 0.75em;
  line-height: 1.4;
}

.prose h4 {
  color: #2ec4b6;
  font-weight: 600;
  font-size: 1.125em;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose a {
  color: var(--tw-prose-links);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}

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

.prose strong {
  color: var(--tw-prose-bold);
  font-weight: 600;
}

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

.prose ul > li {
  position: relative;
  padding-left: 0.375em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose ul > li::marker {
  color: var(--tw-prose-bullets);
}

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

.prose ol > li {
  padding-left: 0.375em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose ol > li::marker {
  color: var(--tw-prose-counters);
  font-weight: 500;
}

.prose blockquote {
  font-style: italic;
  color: var(--tw-prose-quotes);
  border-left: 4px solid var(--tw-prose-quote-borders);
  padding-left: 1em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  background: rgba(255, 217, 61, 0.05);
  padding: 1em 1.25em;
  border-radius: 0 0.5em 0.5em 0;
}

.prose blockquote p {
  margin: 0;
}

.prose hr {
  border-color: var(--tw-prose-hr);
  margin-top: 2.5em;
  margin-bottom: 2.5em;
}

.prose table {
  width: 100%;
  table-layout: auto;
  text-align: left;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.9em;
  line-height: 1.5;
  border-collapse: collapse;
}

.prose thead {
  border-bottom: 2px solid #ffd93d;
}

.prose thead th {
  color: #ffd93d;
  font-weight: 600;
  vertical-align: bottom;
  padding: 0.75em 1em;
  background: rgba(255, 217, 61, 0.1);
}

.prose thead th:first-child {
  border-radius: 0.5em 0 0 0;
}

.prose thead th:last-child {
  border-radius: 0 0.5em 0 0;
}

.prose tbody tr {
  border-bottom: 1px solid var(--tw-prose-td-borders);
  transition: background-color 0.2s ease;
}

.prose tbody tr:hover {
  background: rgba(46, 196, 182, 0.05);
}

.prose tbody td {
  vertical-align: top;
  padding: 0.75em 1em;
}

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

.prose code {
  color: var(--tw-prose-code);
  font-size: 0.9em;
  font-weight: 500;
}

.prose pre {
  color: var(--tw-prose-pre-code);
  background-color: var(--tw-prose-pre-bg);
  overflow-x: auto;
  font-size: 0.9em;
  line-height: 1.7;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border-radius: 0.75em;
  padding: 1em 1.25em;
  border: 1px solid rgba(255, 217, 61, 0.1);
}

/* Responsive Table Wrapper for Prose */
.prose .table-responsive,
.prose div:has(> table) {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2em 0;
  border-radius: 0.75em;
  border: 1px solid rgba(255, 217, 61, 0.1);
}

.prose .table-responsive table,
.prose div:has(> table) table {
  margin: 0;
  border-radius: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .prose {
    font-size: 0.9375rem;
  }

  .prose h2 {
    font-size: 1.5em;
  }

  .prose h3 {
    font-size: 1.25em;
  }

  .prose table {
    font-size: 0.85em;
  }

  .prose thead th,
  .prose tbody td {
    padding: 0.5em 0.75em;
  }
}

/* Global overflow handling */
html {
  overflow-x: clip;
  overflow-y: auto;
}

body {
  overflow-x: clip;
}

/* Ensure images scale properly */
img {
  max-width: 100%;
  height: auto;
}

/* Focus visible improvements */
:focus:not(:focus-visible) {
  outline: none;
}

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