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

:root {
  --top-bar-bg: #0B0D27;
  --surface-primary: #0A0E27;
  --emphasis-gradient: linear-gradient(90deg, #3E8AFC, #3887FC);
  --surface-alt: #3887FC;
  --emphasis-color: #FFFFFF;
  --paragraph-color: #FFFFFF;
  --rule-color: #3887FC;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--surface-primary);
  color: var(--paragraph-color);
  min-height: 100vh;
  line-height: 1.55;
}

main h1,
main h2,
main h3,
main h4 {
  color: var(--emphasis-color);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.shell {
  width: min(1180px, 92%);
  margin: 0 auto;
}

/* ==================== Masthead ==================== */

.top-shell {
  background: var(--top-bar-bg);
  border-bottom: 1px solid var(--rule-color);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.brand-anchor {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-anchor img {
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.header-auth {
  display: flex;
  gap: 10px;
  align-items: center;
}

.user-btn {
  padding: 10px 22px;
  border-radius: 2px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.user-btn:active {
  transform: translateY(1px);
}

.auth-btn--outline {
  background: transparent;
  color: var(--emphasis-color);
  border: 1px solid var(--rule-color);
}

.auth-btn--filled {
  background: var(--emphasis-gradient);
  color: var(--emphasis-color);
  border: none;
}

.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--rule-color);
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--emphasis-color);
  position: relative;
}

.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-burger span::before { top: -6px; }
.nav-burger span::after  { top:  6px; }

.chrome-nav {
  border-top: 1px solid var(--rule-color);
}

.primary-nav-list {
  list-style: none;
  display: flex;
  gap: 32px;
  justify-content: center;
  padding: 14px 0;
  flex-wrap: wrap;
}

.primary-nav-list a {
  color: var(--emphasis-color);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.primary-nav-list a:hover {
  border-bottom-color: var(--emphasis-color);
}

[data-goto] {
  cursor: pointer;
}

/* ==================== Stage (hero canvas + inline games + lede) ==================== */

.opening {
  background: var(--surface-primary);
}

.banner-frame {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: min(64vh, 560px);
  padding: 64px 0 72px;
  overflow: hidden;
}

.showcase-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 13, 11, 0.75) 0%, rgba(15, 13, 11, 0.55) 55%, rgba(15, 13, 11, 0.85) 100%);
  pointer-events: none;
}

.banner-frame > .shell {
  position: relative;
  z-index: 1;
}

.showcase-copy {
  max-width: 640px;
  margin: 0 auto 0 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: calc(min(64vh, 560px) - 136px);
}

.lead-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 22px;
  color: var(--emphasis-color);
}

.showcase-highlight {
  margin: 4px 0 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.banner-promo-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244, 236, 216, 0.65);
}

.banner-promo-value {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--emphasis-color);
}

.opener-usps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  margin-top: auto;
}

.opener-usps li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--emphasis-color);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.3;
  padding: 0;
  background: transparent;
  border: none;
}

.opener-usps li::before {
  content: "⭐";
  font-size: 1.25rem;
  line-height: 1;
  flex: 0 0 auto;
}

.opener-usps li:nth-child(1)::before { content: "🎁"; }
.opener-usps li:nth-child(2)::before { content: "🎰"; }
.opener-usps li:nth-child(3)::before { content: "🏆"; }
.opener-usps li:nth-child(4)::before { content: "💎"; }

.showcase-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.hero-btn:hover {
  transform: translateY(-1px);
}

.banner-btn--primary {
  background: var(--emphasis-gradient);
  color: var(--emphasis-color);
  border: none;
}

.banner-btn--secondary {
  background: transparent;
  color: var(--emphasis-color);
  border: 1px solid var(--emphasis-color);
}

/* ---------- Games rail inside stage ---------- */

.game-rail-block {
  padding: 48px 0 24px;
  background: var(--surface-primary);
}

.casino-shelf-head {
  margin-bottom: 22px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.titles-strip-caption {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--emphasis-color);
  border-bottom: 2px solid var(--emphasis-color);
  padding-bottom: 6px;
}

.games-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-color) transparent;
}

.games-rail::-webkit-scrollbar {
  height: 8px;
}

.games-rail::-webkit-scrollbar-track {
  background: transparent;
}

.games-rail::-webkit-scrollbar-thumb {
  background: var(--rule-color);
  border-radius: 4px;
}

/* Shared class from build.py — styled inside .games-rail */
.games-rail .lobby-tile {
  flex: 0 0 180px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  padding: 0;
  background: transparent;
  border: none;
}

.games-rail .title-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--rule-color);
}

.games-rail .title-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.games-rail .lobby-tile:hover .title-card-media img {
  transform: scale(1.04);
}

.games-rail .reel-card-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 13, 11, 0.7);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.games-rail .reel-card-mask .casino-card-cta {
  padding: 8px 22px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emphasis-color);
  background: var(--emphasis-gradient);
  border: none;
}

@media (hover: hover) {
  .games-rail .lobby-tile:hover .reel-card-mask {
    opacity: 1;
  }
}

.games-rail .reel-card-name {
  font-size: 0.78rem;
  color: var(--paragraph-color);
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.35;
  word-break: break-word;
}

/* ---------- Lede (hero-intro) — placed after games, outside image area ---------- */

.intro-band {
  padding: 24px 0 60px;
  background: var(--surface-primary);
}

.intro-band-inner {
  max-width: 820px;
}

.intro-band-inner p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--paragraph-color);
  margin-bottom: 16px;
}

.intro-band-inner p:last-child {
  margin-bottom: 0;
}

/* ==================== Column (long-form content) ==================== */

.content-band {
  padding: 40px 0 80px;
}

.readme-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.02rem;
}

.readme-body h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: 44px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-color);
}

.readme-body h2:first-child {
  margin-top: 0;
}

.readme-body h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  margin: 32px 0 10px;
}

.readme-body p {
  margin-bottom: 18px;
  line-height: 1.75;
}

.readme-body ul,
.readme-body ol {
  margin: 0 0 20px 22px;
  display: grid;
  gap: 8px;
  line-height: 1.65;
}

.readme-body ul {
  list-style: square;
}

.readme-body img {
  width: 100%;
  max-width: 100%;
  margin: 20px 0;
  display: block;
}

/* Shared classes from build.py */
.table-wrapper {
  overflow-x: auto;
  margin: 0 0 24px;
  border: 1px solid var(--rule-color);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--emphasis-color);
  font-size: 0.94rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-color);
}

.data-table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: rgba(244, 236, 216, 0.04);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ==================== Register (FAQ) ==================== */

.queries-section {
  padding: 0 0 80px;
}

.queries-inner {
  max-width: 820px;
  margin: 0 auto;
}

/* Shared class from build.py */
.queries-inner .faq-item {
  padding: 20px 0;
  border-top: 1px solid var(--rule-color);
}

.queries-inner .faq-item:first-child {
  border-top: 2px solid var(--emphasis-color);
}

.queries-inner .faq-item:last-child {
  border-bottom: 1px solid var(--rule-color);
}

.queries-inner .faq-item h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--emphasis-color);
}

.queries-inner .faq-item p {
  color: var(--paragraph-color);
  line-height: 1.7;
}

/* ==================== Colophon (footer) ==================== */

.endnote-band {
  background: var(--top-bar-bg);
  border-top: 1px solid var(--rule-color);
  padding: 44px 0;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.bottom-shell-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.bottom-shell-logo img {
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.footer-age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid var(--emphasis-color);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--emphasis-color);
  letter-spacing: 0.06em;
}

.footer-block-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-block-links a {
  color: var(--emphasis-color);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.footer-block-links a:hover {
  text-decoration: underline;
}

.footer-block-note {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-foot-disclaimer,
.footer-block-copyright {
  font-size: 0.76rem;
  color: var(--paragraph-color);
  line-height: 1.6;
}

/* ==================== Responsive ==================== */

@media (max-width: 900px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 720px) {
  .site-bar-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-burger {
    display: inline-flex;
    order: 2;
    margin-left: auto;
  }

  .header-auth {
    width: 100%;
    order: 3;
    justify-content: space-between;
  }

  .user-btn {
    flex: 1;
    padding: 12px;
  }

  .chrome-nav {
    display: none;
  }

  .top-shell.menu-open .chrome-nav {
    display: block;
  }

  .primary-nav-list {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .banner-frame {
    min-height: 480px;
    padding: 48px 0 56px;
  }

  .opener-usps {
    gap: 12px 20px;
    margin-bottom: 22px;
  }

  .opener-usps li {
    font-size: 0.88rem;
  }

  .opener-usps li::before {
    font-size: 1.1rem;
  }

  .game-rail-block {
    padding: 36px 0 20px;
  }

  .games-rail .lobby-tile {
    flex: 0 0 140px;
  }

  .intro-band {
    padding: 20px 0 40px;
  }

  .content-band {
    padding: 32px 0 60px;
  }

  .readme-body {
    font-size: 0.98rem;
  }
}
