/* ============================================================
   MegaFishWins Casino – Custom CSS
   Fishing-themed iGaming site for New Zealand
   Emerald + Gold + Twilight Ocean palette
============================================================ */

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  word-break: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   CSS CUSTOM PROPERTIES
============================================================ */
:root {
  --brand-primary:   #0d7a4e;
  --brand-secondary: #c8a827;
  --brand-dark:      #071a2e;
  --brand-darker:    #040f1c;
  --brand-ocean:     #0a3a5c;
  --brand-emerald:   #10b981;
  --brand-gold:      #f0c040;
  --brand-accent:    #1de9b6;
}

/* ============================================================
   SCROLLBAR STYLING
============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--brand-darker);
}
::-webkit-scrollbar-thumb {
  background: var(--brand-primary);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-emerald);
}

/* ============================================================
   HERO SECTION
============================================================ */
.hero-section {
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(13,122,78,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(240,192,64,0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* Fern-inspired SVG pattern overlay */
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 5 Q35 20 30 30 Q25 20 30 5Z' fill='none' stroke='rgba(16,185,129,0.06)' stroke-width='1'/%3E%3Cpath d='M30 30 Q45 25 55 30 Q45 35 30 30Z' fill='none' stroke='rgba(16,185,129,0.06)' stroke-width='1'/%3E%3Cpath d='M30 30 Q15 25 5 30 Q15 35 30 30Z' fill='none' stroke='rgba(16,185,129,0.04)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
}

/* ============================================================
   WAVE PATTERN
============================================================ */
.wave-pattern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath d='M0,60 C240,120 480,0 720,60 C960,120 1200,0 1440,60 L1440,120 L0,120 Z' fill='rgba(13,122,78,0.15)'/%3E%3Cpath d='M0,80 C360,20 720,100 1080,40 C1260,10 1380,70 1440,80 L1440,120 L0,120 Z' fill='rgba(10,58,92,0.2)'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: bottom;
  background-repeat: no-repeat;
}

/* ============================================================
   BONUS BADGE ANIMATION
============================================================ */
.bonus-badge {
  animation: badge-glow 3s ease-in-out infinite;
  position: relative;
}

.bonus-badge::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--brand-gold), var(--brand-emerald), var(--brand-gold));
  background-size: 200% 200%;
  animation: border-shine 4s linear infinite;
  z-index: -1;
  opacity: 0.6;
}

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(240,192,64,0.2), 0 0 40px rgba(13,122,78,0.1); }
  50%       { box-shadow: 0 0 40px rgba(240,192,64,0.4), 0 0 80px rgba(13,122,78,0.2); }
}

@keyframes border-shine {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================================
   CTA PULSE ANIMATION
============================================================ */
.cta-pulse {
  animation: cta-pulse 2.5s ease-in-out infinite;
}

@keyframes cta-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 30px rgba(240,192,64,0.3); }
  50%       { transform: scale(1.03); box-shadow: 0 12px 40px rgba(240,192,64,0.5); }
}

/* ============================================================
   SLOW PULSE (hero badge)
============================================================ */
.animate-pulse-slow {
  animation: pulse-slow 3s ease-in-out infinite;
}

@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* ============================================================
   GAMES MARQUEE
============================================================ */
.games-marquee-wrapper {
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.games-marquee {
  display: flex;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}

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

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

/* Duplicate for seamless loop – handled via CSS only */
/* We rely on the HTML having enough cards to fill 2x the viewport width */

/* ============================================================
   GAME CARDS
============================================================ */
.game-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(13,122,78,0.25);
}

/* ============================================================
   PROVIDER WORD CLOUD
============================================================ */
.provider-tag {
  display: inline-block;
  cursor: default;
  transition: color 0.2s, transform 0.2s;
  line-height: 1.4;
}

.provider-tag:hover {
  color: var(--brand-gold) !important;
  transform: scale(1.1);
}

/* ============================================================
   FAQ ACCORDION
============================================================ */
.faq-item {
  transition: box-shadow 0.2s;
}

.faq-item:hover {
  box-shadow: 0 4px 20px rgba(13,122,78,0.12);
}

.faq-trigger {
  cursor: pointer;
  border: none;
  background: none;
}

.faq-answer p {
  margin: 0;
}

/* ============================================================
   PROSE STYLING (single pages)
============================================================ */
.prose-casino {
  color: #d1d5db;
  font-size: 0.9375rem;
  line-height: 1.75;
  word-break: break-word;
}

.prose-casino h1,
.prose-casino h2,
.prose-casino h3,
.prose-casino h4 {
  color: #f0c040;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1em;
  margin-bottom: 0.75em;
}

.prose-casino h1 { font-size: 2rem; }
.prose-casino h2 { font-size: 1.5rem; }
.prose-casino h3 { font-size: 1.25rem; }
.prose-casino h4 { font-size: 1.1rem; }

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

.prose-casino a {
  color: var(--brand-emerald);
  text-decoration: underline;
  transition: color 0.2s;
}

.prose-casino a:hover {
  color: var(--brand-gold);
}

.prose-casino ul,
.prose-casino ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
  color: #d1d5db;
}

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

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

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

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

.prose-casino blockquote {
  border-left: 4px solid var(--brand-primary);
  padding-left: 1em;
  color: #9ca3af;
  font-style: italic;
  margin: 1.5em 0;
}

.prose-casino code {
  background: rgba(13,122,78,0.15);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
  color: var(--brand-emerald);
}

.prose-casino pre {
  background: rgba(4,15,28,0.8);
  border: 1px solid rgba(13,122,78,0.2);
  border-radius: 8px;
  padding: 1.25em;
  overflow-x: auto;
  margin-bottom: 1.5em;
}

.prose-casino pre code {
  background: none;
  padding: 0;
  font-size: 0.85em;
}

.prose-casino hr {
  border: none;
  border-top: 1px solid rgba(13,122,78,0.25);
  margin: 2em 0;
}

/* Table wrapper within prose */
.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;
}

/* General prose table styles */
.prose-casino table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: #d1d5db;
}

.prose-casino thead tr {
  background: rgba(13,122,78,0.25);
}

.prose-casino thead th {
  padding: 0.75em 1em;
  text-align: left;
  font-weight: 700;
  color: var(--brand-gold);
  border-bottom: 1px solid rgba(13,122,78,0.3);
}

.prose-casino tbody tr {
  border-bottom: 1px solid rgba(13,122,78,0.12);
  transition: background 0.15s;
}

.prose-casino tbody tr:hover {
  background: rgba(13,122,78,0.08);
}

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

/* ============================================================
   PARALLAX SECTION BACKGROUNDS
============================================================ */
.parallax-bg {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ============================================================
   SECTION DIVIDERS (SVG wave)
============================================================ */
.section-wave-top {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
}

.section-wave-bottom {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

/* ============================================================
   OCEAN RIPPLE BACKGROUND PATTERN
============================================================ */
.ocean-pattern {
  background-color: var(--brand-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='20' viewBox='0 0 100 20'%3E%3Cpath d='M0,10 Q12.5,0 25,10 Q37.5,20 50,10 Q62.5,0 75,10 Q87.5,20 100,10' fill='none' stroke='rgba(13,122,78,0.07)' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: 100px 20px;
}

/* ============================================================
   GOLD SHIMMER EFFECT
============================================================ */
.gold-shimmer {
  background: linear-gradient(90deg,
    var(--brand-secondary) 0%,
    var(--brand-gold) 50%,
    var(--brand-secondary) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}

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

/* ============================================================
   FLOATING ANIMATION (decorative elements)
============================================================ */
.float-anim {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* ============================================================
   STEP CONNECTOR
============================================================ */
.step-connector {
  background: linear-gradient(90deg, var(--brand-emerald), var(--brand-gold));
  height: 2px;
  flex: 1;
  opacity: 0.3;
}

/* ============================================================
   BUTTON BASE OVERRIDES
============================================================ */
button,
[type='button'],
[type='submit'] {
  cursor: pointer;
}

/* ============================================================
   STICKY HEADER SHADOW
============================================================ */
#site-header {
  box-shadow: 0 1px 20px rgba(0,0,0,0.5);
}

/* ============================================================
   MOBILE MENU TRANSITION
============================================================ */
#mobile-menu {
  border-top: 1px solid rgba(13,122,78,0.25);
}

/* ============================================================
   RESPONSIVE TYPOGRAPHY HELPERS
============================================================ */
@media (max-width: 640px) {
  .bonus-badge {
    padding: 1rem 1.25rem;
  }
  .game-card {
    width: 200px;
  }
}

/* ============================================================
   FOCUS VISIBLE (accessibility)
============================================================ */
:focus-visible {
  outline: 2px solid var(--brand-emerald);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   OVERFLOW TABLE FIX (global)
============================================================ */
table {
  word-break: normal;
  overflow-wrap: break-word;
}

.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}