/* ============================================================
   EmberBet Casino – Custom CSS
   ============================================================ */

/* --- Base Reset & Overflow Control --- */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  word-break: break-word;
}

body {
  overflow-x: hidden;
  word-break: break-word;
}

/* --- Table Scroll Utility --- */
.prose-casino .prose-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  margin: 1.5em 0;
  border-radius: 0.5rem;
}

.prose-casino .prose-table-scroll table {
  margin-top: 0;
  margin-bottom: 0;
}

/* --- Prose Casino Styles --- */
.prose-casino {
  color: #d1d5db;
  font-size: 0.9375rem;
  line-height: 1.75;
  max-width: 100%;
}

.prose-casino h1,
.prose-casino h2,
.prose-casino h3,
.prose-casino h4 {
  color: #f5c842;
  font-family: Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.6em;
}

.prose-casino h1 { font-size: 2rem; }
.prose-casino h2 { font-size: 1.5rem; color: #e6a817; }
.prose-casino h3 { font-size: 1.2rem; color: #f5c842; }

.prose-casino p {
  margin-bottom: 1em;
  color: #d1d5db;
}

.prose-casino a {
  color: #4db8ff;
  text-decoration: underline;
  transition: color 0.2s;
}

.prose-casino a:hover {
  color: #1a8fff;
}

.prose-casino ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1em;
  color: #d1d5db;
}

.prose-casino ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1em;
  color: #d1d5db;
}

.prose-casino li {
  margin-bottom: 0.4em;
}

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

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

.prose-casino blockquote {
  border-left: 4px solid #f5c842;
  padding-left: 1rem;
  margin: 1.5em 0;
  color: #9ca3af;
  font-style: italic;
}

.prose-casino table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1.5em 0;
}

.prose-casino thead {
  background-color: #251880;
  color: #f5c842;
}

.prose-casino th {
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-weight: 700;
  border: 1px solid #2e1fa0;
}

.prose-casino td {
  padding: 0.6rem 0.8rem;
  border: 1px solid #251880;
  color: #d1d5db;
}

.prose-casino tbody tr:nth-child(even) {
  background-color: rgba(26, 16, 96, 0.35);
}

.prose-casino code {
  background-color: rgba(26, 16, 96, 0.5);
  color: #f5c842;
  border-radius: 0.25rem;
  padding: 0.1em 0.4em;
  font-size: 0.875em;
  font-family: monospace;
}

.prose-casino hr {
  border-color: rgba(245, 200, 66, 0.2);
  margin: 2em 0;
}

.prose-casino img {
  border-radius: 0.5rem;
  max-width: 100%;
  height: auto;
}

/* --- Invert prose for dark backgrounds --- */
.prose-invert .prose-casino {
  color: #e5e7eb;
}

/* --- CTA Buttons --- */
.cta-btn-primary {
  background: linear-gradient(90deg, #f5c842 0%, #e6a817 50%, #c8890d 100%);
  color: #0d0830;
  font-weight: 700;
  border-radius: 9999px;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.cta-btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(245, 200, 66, 0.35);
}

/* --- Sticky Header --- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s;
}

/* --- Nav Link Active --- */
.nav-link.active,
.nav-link:hover {
  color: #f5c842;
}

/* --- Bonus Badge Animation --- */
.bonus-badge {
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 200, 66, 0.15), 0 0 20px rgba(245, 200, 66, 0.08);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(245, 200, 66, 0), 0 0 40px rgba(245, 200, 66, 0.2);
  }
}

/* --- Ember Spark Animations --- */
.spark {
  animation: spark-float 6s ease-in-out infinite;
  transform-origin: center;
}

.spark.delay-1 { animation-delay: -1s; animation-duration: 7s; }
.spark.delay-2 { animation-delay: -2s; animation-duration: 5s; }
.spark.delay-3 { animation-delay: -3s; animation-duration: 8s; }
.spark.delay-4 { animation-delay: -4s; animation-duration: 6.5s; }
.spark.delay-5 { animation-delay: -0.5s; animation-duration: 9s; }

@keyframes spark-float {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.7;
  }
  25% {
    opacity: 1;
  }
  50% {
    transform: translateY(-18px) scale(1.3);
    opacity: 0.4;
  }
  75% {
    opacity: 0.9;
  }
}

/* --- Games Marquee / Horizontal Scroll --- */
.games-marquee-outer {
  position: relative;
  width: 100%;
}

.games-marquee-track {
  display: flex;
  gap: 1.5rem;
  animation: marquee-scroll 30s linear infinite;
  width: max-content;
}

.games-marquee-outer:hover .games-marquee-track {
  animation-play-state: paused;
}

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

/* --- Step Cards --- */
.step-card {
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(245, 200, 66, 0.12);
}

/* --- Promo Cards --- */
.promo-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

.promo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(245, 200, 66, 0.1);
}

/* --- Word Cloud Provider Tags --- */
.provider-tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background-color: rgba(26, 16, 96, 0.4);
  border: 1px solid rgba(245, 200, 66, 0.1);
  transition: background-color 0.2s, transform 0.2s;
  cursor: default;
}

.provider-tag:hover {
  background-color: rgba(245, 200, 66, 0.1);
  transform: scale(1.05);
}

/* --- FAQ Accordion --- */
.faq-question {
  cursor: pointer;
  background: none;
  border: none;
  transition: background-color 0.2s;
}

.faq-question:hover {
  background-color: rgba(245, 200, 66, 0.05);
}

.faq-question[aria-expanded="true"] {
  background-color: rgba(245, 200, 66, 0.07);
}

.faq-answer {
  border-top: 1px solid rgba(245, 200, 66, 0.1);
}

/* --- Game Card Image Zoom --- */
.game-card img {
  transition: transform 0.5s ease;
}

.game-card:hover img {
  transform: scale(1.1);
}

/* --- Parallax Hero --- */
#hero {
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

@media (max-width: 768px) {
  #hero {
    background-attachment: scroll;
  }
  .games-marquee-track {
    animation-duration: 20s;
  }
}

/* --- Responsive Tables --- */
.overflow-x-auto {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

table {
  min-width: 600px;
}

/* Inline tables inside prose don't need min-width forcing unless in scroll container */
.prose-casino table {
  min-width: unset;
  width: 100%;
}

/* --- Burger Menu Lines --- */
.burger-line {
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* --- Scrollbar Styling (Webkit) --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: #2e1fa0;
  border-radius: 3px;
}

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

/* --- Selection colour --- */
::selection {
  background-color: rgba(245, 200, 66, 0.3);
  color: #fff;
}

/* --- Focus Visible Outline --- */
:focus-visible {
  outline: 2px solid #f5c842;
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Utility: Gold text gradient --- */
.text-gold-gradient {
  background: linear-gradient(90deg, #f5c842, #e6a817);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Mobile first breakpoints for game cards --- */
@media (max-width: 640px) {
  .game-card {
    width: 13rem;
  }
  .games-marquee-track {
    gap: 1rem;
  }
}
