/* =============================================
   BitGuruz Casino — Custom CSS
   Baltic Nexus Dark Theme
   ============================================= */

/* --- Base Reset & Global --- */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  word-break: break-word;
  background-color: #060D14;
  color: #E8F4F8;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  word-break: break-word;
  line-height: 1.2;
}

p, li, td, th, span {
  word-break: break-word;
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0B1622;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00FF87, #00E5FF);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #00FF87;
}

/* --- CTA Button Animations --- */
.cta-primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cta-primary:hover::before {
  opacity: 1;
}
.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,255,135,0.5), 0 0 60px rgba(0,229,255,0.2);
}
.cta-primary:active {
  transform: translateY(0);
}

/* --- Nav Link Active State --- */
.nav-link {
  position: relative;
  text-decoration: none;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00FF87, #00E5FF);
  border-radius: 1px;
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

/* --- Hero Pattern Background --- */
.hero-pattern {
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 60px,
      rgba(0,255,135,0.03) 60px,
      rgba(0,255,135,0.03) 61px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 60px,
      rgba(0,229,255,0.03) 60px,
      rgba(0,229,255,0.03) 61px
    );
  background-size: 61px 61px;
}

/* --- Data Streams Animation --- */
.data-streams {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.data-streams::before,
.data-streams::after {
  content: '';
  position: absolute;
  width: 1px;
  top: -100%;
  animation: streamFall 8s linear infinite;
  opacity: 0.4;
}
.data-streams::before {
  left: 20%;
  height: 200px;
  background: linear-gradient(to bottom, transparent, #00FF87, transparent);
  animation-delay: 0s;
  animation-duration: 7s;
}
.data-streams::after {
  left: 70%;
  height: 150px;
  background: linear-gradient(to bottom, transparent, #00E5FF, transparent);
  animation-delay: 3s;
  animation-duration: 9s;
}
@keyframes streamFall {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translateY(200vh); opacity: 0; }
}

/* --- Gradient pill labels (section tags, hero badge) --- */
.badge-pill {
  display: inline-block;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #060D14;
  border-radius: 9999px;
  background: linear-gradient(135deg, #00FF87, #00E5FF);
  box-shadow: 0 2px 12px rgba(0, 255, 135, 0.35);
}

/* --- Bonus Badge Pulse --- */
.bonus-badge {
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% {
    box-shadow: 0 0 30px rgba(0,255,135,0.3), inset 0 0 30px rgba(0,229,255,0.05);
  }
  50% {
    box-shadow: 0 0 60px rgba(0,255,135,0.6), 0 0 100px rgba(0,229,255,0.2), inset 0 0 40px rgba(0,229,255,0.1);
  }
}

/* --- Game Cards --- */
.game-card {
  cursor: pointer;
}
.game-card img {
  display: block;
}

/* --- Provider Word Cloud Tags --- */
.provider-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-weight: 600;
  color: #00FF87;
  background: rgba(0,255,135,0.07);
  border: 1px solid rgba(0,255,135,0.15);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: default;
  line-height: 1.4;
}
.provider-tag:nth-child(even) {
  color: #00E5FF;
  background: rgba(0,229,255,0.07);
  border-color: rgba(0,229,255,0.15);
}
.provider-tag:hover {
  background: rgba(0,255,135,0.15);
  border-color: rgba(0,255,135,0.4);
  color: #fff;
}

/* --- Promo Cards --- */
.promo-card {
  cursor: default;
}

/* --- FAQ Accordion --- */
.faq-item {
  transition: border-color 0.2s ease;
}
.faq-item:hover {
  border-color: rgba(0,255,135,0.4);
}
.faq-trigger {
  cursor: pointer;
  background: transparent;
  border: none;
  outline: none;
}
.faq-trigger:focus {
  outline: 2px solid rgba(0,255,135,0.5);
  outline-offset: -2px;
}
.faq-answer {
  transition: all 0.3s ease;
}

/* --- Marquee Animation --- */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}

/* --- Parallax Scroll Effect (JS-free CSS approach) --- */
.parallax-hero {
  transform: translateZ(0);
  will-change: transform;
}

/* --- Float Animation --- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* --- Glow Pulse --- */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(0,255,135,0.4); }
  50% { box-shadow: 0 0 30px rgba(0,255,135,0.8), 0 0 60px rgba(0,229,255,0.4); }
}
.glow-pulse {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* --- Table Overflow Helper --- */
.overflow-x-auto {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

/* Prevent grid/flex children from forcing horizontal page scroll */
#apzvalga .grid > * {
  min-width: 0;
}

/* --- Homepage data tables (payment limits, bonus terms) --- */
.table-scroll-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.table-scroll-wrap .data-table {
  width: 100%;
  min-width: 20rem;
  border-collapse: collapse;
}

.table-scroll-wrap .data-table--wide {
  min-width: 44rem;
}

.data-table th,
.data-table td {
  word-break: normal;
  overflow-wrap: normal;
  white-space: nowrap;
  vertical-align: middle;
}

.data-table th:first-child,
.data-table td:first-child {
  white-space: normal;
  min-width: 6.5rem;
}

@media (max-width: 640px) {
  .table-scroll-wrap {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .table-scroll-wrap .data-table {
    font-size: 0.8125rem;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .data-table th,
  .data-table td {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .data-table:not(.data-table--wide) th,
  .data-table:not(.data-table--wide) td {
    white-space: normal;
  }

  /* Payment table: card layout, full width within viewport */
  .data-table--wide {
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .data-table--wide thead,
  .data-table--wide tbody {
    display: block;
    width: 100%;
  }

  .data-table--wide thead {
    display: none;
  }

  .data-table--wide tbody tr {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    background: #0F1F30 !important;
    border: 1px solid #1A3048;
    border-radius: 0.75rem;
    overflow: hidden;
  }

  .data-table--wide tbody tr:last-child {
    margin-bottom: 0;
  }

  .data-table--wide td {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.375rem 0;
    white-space: normal;
    border: none !important;
  }

  .data-table--wide td:not(:first-child) {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
  }

  .data-table--wide td:not(:first-child)::before {
    content: attr(data-label);
    flex: 1 1 0;
    min-width: 0;
    color: #7A9BB5;
    font-size: 0.8125rem;
    font-weight: 500;
    overflow-wrap: break-word;
  }

  .data-table--wide .data-table__value {
    flex: 0 1 auto;
    max-width: 55%;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .data-table--wide td:first-child {
    padding-top: 0;
    padding-bottom: 0.625rem;
    margin-bottom: 0.375rem;
    border-bottom: 1px solid #1A3048 !important;
  }
}

/* ============================================
   PROSE CASINO — Rich Content Styling
   ============================================ */
.prose-casino {
  color: #B8D4E8;
  max-width: 100%;
  font-size: 0.95rem;
  line-height: 1.75;
  word-break: break-word;
}
.prose-casino h1 {
  color: #E8F4F8;
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.2;
  background: linear-gradient(135deg, #00FF87, #00E5FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.prose-casino h2 {
  color: #E8F4F8;
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  border-left: 3px solid #00FF87;
  padding-left: 0.75rem;
}
.prose-casino h3 {
  color: #E8F4F8;
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.prose-casino h4 {
  color: #E8F4F8;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
.prose-casino p {
  margin-bottom: 1rem;
  color: #B8D4E8;
}
.prose-casino a {
  color: #00FF87;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.prose-casino a:hover {
  color: #00E5FF;
}
.prose-casino ul, .prose-casino ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: #B8D4E8;
}
.prose-casino ul {
  list-style-type: disc;
}
.prose-casino ol {
  list-style-type: decimal;
}
.prose-casino li {
  margin-bottom: 0.4rem;
}
.prose-casino strong {
  color: #E8F4F8;
  font-weight: 700;
}
.prose-casino em {
  color: #00E5FF;
  font-style: italic;
}
.prose-casino blockquote {
  border-left: 4px solid #00FF87;
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  background: rgba(0,255,135,0.05);
  border-radius: 0 0.5rem 0.5rem 0;
  color: #B8D4E8;
  font-style: italic;
}
.prose-casino code {
  background: rgba(0,229,255,0.1);
  color: #00E5FF;
  padding: 0.1em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}
.prose-casino pre {
  background: #0B1622;
  border: 1px solid #1A3048;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.prose-casino pre code {
  background: none;
  color: #00FF87;
  padding: 0;
}
.prose-casino hr {
  border: none;
  border-top: 1px solid #1A3048;
  margin: 2rem 0;
}

/* Prose Table Scroll Wrapper */
.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 Tables (direct) */
.prose-casino table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: #B8D4E8;
}
.prose-casino thead {
  background: linear-gradient(135deg, rgba(0,255,135,0.1), rgba(0,229,255,0.08));
}
.prose-casino th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: #E8F4F8;
  font-weight: 700;
  border-bottom: 2px solid #1A3048;
  white-space: nowrap;
}
.prose-casino td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #1A3048;
  vertical-align: top;
}
.prose-casino tr:last-child td {
  border-bottom: none;
}
.prose-casino tr:hover td {
  background: rgba(0,255,135,0.03);
}

/* Prose Images */
.prose-casino img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  border: 1px solid #1A3048;
}

/* --- Responsive Helpers --- */
@media (max-width: 640px) {
  .prose-casino h1 {
    font-size: 1.5rem;
  }
  .prose-casino h2 {
    font-size: 1.25rem;
  }
  .prose-casino h3 {
    font-size: 1.1rem;
  }
  .prose-casino table {
    font-size: 0.8rem;
  }
  .prose-casino th,
  .prose-casino td {
    padding: 0.5rem 0.6rem;
  }
}

/* --- Gradient Text Utility --- */
.gradient-text {
  background: linear-gradient(135deg, #00FF87, #00E5FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Card Hover Glow --- */
.card-glow:hover {
  box-shadow: 0 0 0 1px rgba(0,255,135,0.3), 0 8px 30px rgba(0,255,135,0.1);
}

/* --- Section Divider --- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,135,0.3), rgba(0,229,255,0.3), transparent);
  margin: 0;
  border: none;
}

/* --- Sticky Header Shadow on Scroll --- */
header {
  transition: box-shadow 0.3s ease;
}

/* --- Focus Styles for Accessibility --- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #00FF87;
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Ensure tables inside markdown are scrollable --- */
.prose-casino > table,
.prose-casino div > table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}