:root {
  --bg: #2d2540;
  --surface: #3c344d;
  --surface-2: #483d61;
  --border: #3c3252;
  --text: #ffffff;
  --muted: #a7a3af;
  --accent: #ff6c1a;
  --accent-2: #e0c535;
  --radius: 0px;
  --font-heading: Kanit, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: Kanit, system-ui, -apple-system, "Segoe UI", sans-serif;
  --login-fill: #e0c535;
  --header-h: 68px;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex-shrink: 0; }
.icon-lg { width: 1.375em; height: 1.375em; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 12px;
}
h1 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 700; }
h2 { font-size: clamp(22px, 2.8vw, 28px); margin-top: 0; }
h3 { font-size: 18px; }
p { margin: 0 0 14px; color: var(--text); }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 6px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff;
  padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 22px; border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: filter 150ms ease, background-color 150ms ease, transform 160ms ease-out;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-secondary { background: var(--login-fill); color: #1a1526; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-block { width: 100%; }
.btn-lg { height: 48px; padding: 0 28px; font-size: 15px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.header-left { display: flex; align-items: center; gap: 30px; min-width: 0; }
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo img { height: 30px; width: auto; }
.logo-text { font-family: var(--font-heading); font-weight: 700; font-size: 20px; letter-spacing: .2px; }
.logo-text span { color: var(--accent); }

.main-nav { display: none; }
.main-nav ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 22px; }
.main-nav a {
  font-size: 14px; font-weight: 600; color: var(--muted);
  padding: 8px 0; border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--text); border-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-actions .btn { height: 40px; padding: 0 18px; }
.header-actions .header-cta { display: none; }
@media (min-width: 900px) {
  .header-actions .header-cta { display: inline-flex; }
}
.hamburger {
  display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); color: var(--text); cursor: pointer;
  position: relative;
}
.hamburger .icon-bars, .hamburger .icon-xmark {
  position: absolute; transition: opacity 150ms ease, transform 150ms ease;
}
.hamburger .icon-xmark { opacity: 0; transform: rotate(-45deg); }
.hamburger.is-open .icon-bars { opacity: 0; transform: rotate(45deg); }
.hamburger.is-open .icon-xmark { opacity: 1; transform: rotate(0deg); }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; background: var(--bg);
  z-index: 99; overflow-y: auto; border-top: 1px solid var(--border);
  visibility: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity 200ms ease-out, transform 200ms ease-out, visibility 200ms;
}
.mobile-menu.is-open { visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto; }
.mobile-menu .container { padding-top: 18px; padding-bottom: 24px; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li { border-bottom: 1px solid var(--border); }
.mobile-menu a {
  display: block; padding: 16px 2px; font-weight: 600; font-size: 16px;
  transition: color 150ms ease;
}
.mobile-menu a:hover { color: var(--accent); }

@media (min-width: 900px) {
  .main-nav { display: block; }
  .hamburger { display: none; }
  .mobile-menu { display: none !important; }
}

/* Sticky mobile CTA bar */
.mobile-cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; gap: 8px; padding: 10px 14px;
  background: var(--surface); border-top: 1px solid var(--border);
}
.mobile-cta-bar .btn { flex: 1; }
@media (min-width: 900px) {
  .mobile-cta-bar { display: none; }
}
body { padding-bottom: 74px; }
@media (min-width: 900px) {
  body { padding-bottom: 0; }
}

/* Hero */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: var(--bg);
  padding: 64px 0 44px;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(45,37,64,.55) 0%, rgba(45,37,64,.86) 72%, var(--bg) 100%);
}
.hero .container { position: relative; z-index: 1; max-width: 760px; }
.hero p { color: var(--text); font-size: 17px; opacity: .92; max-width: 620px; }
.page-hero {
  padding: 40px 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { margin-bottom: 6px; }
.page-hero p { color: var(--muted); margin: 0; max-width: 700px; }

/* Body flow */
main { display: block; }
.lobby-body { padding: 40px 0 60px; }
.lobby-body h2 { margin-top: 40px; margin-bottom: 16px; }
.lobby-body > .container > h2:first-child,
.lobby-body .block:first-child h2 { margin-top: 0; }
.block { margin-bottom: 6px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.block-link { font-size: 14px; color: var(--muted); font-weight: 600; transition: color 150ms ease; }
.block-link:hover { color: var(--accent); }

/* Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab-btn {
  background: transparent; border: none; color: var(--muted); font-family: var(--font-body);
  font-weight: 600; font-size: 14px; padding: 10px 16px; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color 150ms ease, border-color 150ms ease;
}
.tab-btn:hover { color: var(--text); }
.tab-btn[aria-selected="true"] { color: var(--text); border-color: var(--accent); }
.tab-panel[hidden] { display: none; }

/* Games grid */
.games-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (min-width: 620px) { .games-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .games-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
@media (min-width: 1180px) { .games-grid { grid-template-columns: repeat(6, 1fr); } }

.game-tile { display: block; background: var(--surface); border: 1px solid var(--border); }
.game-tile .thumb { display: block; position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface-2); }
.game-tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.game-tile .thumb.no-image { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; text-align: center; padding: 10px; }
.game-tile .meta { display: block; padding: 8px 10px 12px; }
.game-tile .name { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.25; }
.game-tile .provider { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.game-tile { transition: transform 160ms ease-out; }
.game-tile:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .game-tile .thumb img { transition: filter 200ms ease; }
  .game-tile:hover .thumb img { filter: brightness(1.06); }
}

.play-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 16, 30, .45); opacity: 0; transition: opacity 200ms ease;
}
.play-overlay .play-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: var(--accent); color: #fff;
}
.play-overlay .play-pill .icon { font-size: 15px; margin-left: 2px; }
@media (hover: hover) and (pointer: fine) {
  .game-tile:hover .play-overlay { opacity: 1; }
}
@media (hover: none) {
  .play-overlay {
    opacity: 1; align-items: flex-end; justify-content: center; padding-bottom: 12px;
    background: linear-gradient(to top, rgba(15, 12, 22, .55) 0%, rgba(15, 12, 22, 0) 45%);
  }
  .play-overlay .play-pill { width: 36px; height: 36px; }
  .play-overlay .play-pill .icon { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .play-overlay { transition: none; }
}

/* Tables / dl facts */
table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14.5px; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; background: var(--surface); }
td { background: var(--surface); }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); }
.table-wrap table { margin: 0; border: none; }
.cell-logo { width: 56px; }
.cell-logo img { width: 40px; height: 40px; object-fit: contain; background: var(--surface-2); }
.cell-logo .nameplate {
  width: 40px; height: 40px; background: var(--surface-2); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; text-align: center;
}

dl.facts-dl { display: grid; grid-template-columns: 1fr; border: 1px solid var(--border); margin: 6px 0 10px; }
dl.facts-dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
dl.facts-dl div:last-child { border-bottom: none; }
dl.facts-dl dt { color: var(--muted); font-weight: 600; font-size: 14px; }
dl.facts-dl dd { margin: 0; font-size: 14.5px; font-weight: 600; text-align: right; }

/* Logo strips */
.logo-strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 14px; margin: 14px 0 18px;
}
.logo-strip .mark {
  display: flex; align-items: center; justify-content: center; height: 64px; padding: 12px 18px;
  background: var(--surface); border: 1px solid var(--border);
}
.logo-strip .mark img { max-height: 32px; max-width: 100%; width: auto; object-fit: contain; }
.logo-strip .mark.text-mark { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.logo-strip .mark.icon-mark { gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.logo-strip .mark.icon-mark .icon { font-size: 17px; color: var(--text); }

/* Bonus cards */
.bonus-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .bonus-cards { grid-template-columns: repeat(3, 1fr); } }
.bonus-card { background: var(--surface); border: 1px solid var(--border); padding: 22px 20px; display: flex; flex-direction: column; }
.bonus-card .tag {
  align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent-2); border: 1px solid var(--border); padding: 4px 9px; margin-bottom: 12px;
}
.bonus-card h3 { margin-bottom: 8px; font-size: 17px; }
.bonus-card .amount { font-family: var(--font-heading); font-size: 22px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.bonus-card .code { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.bonus-card .code strong { color: var(--text); }
.bonus-card .btn { margin-top: auto; }

/* App section */
.app-block { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: center; }
@media (min-width: 760px) { .app-block { grid-template-columns: 240px 1fr; } }
.app-visual { background: var(--surface); border: 1px solid var(--border); padding: 16px; }
.app-visual img { width: 100%; height: auto; }

/* Phone-frame fallback (used when no real app screenshot is available) */
.phone-frame {
  width: 100%; max-width: 220px; margin: 0 auto; aspect-ratio: 9 / 18.5;
  background: #16121f; border: 1px solid var(--border); padding: 10px 8px;
}
.phone-frame .phone-screen {
  height: 100%; width: 100%;
  background: linear-gradient(160deg, var(--bg) 0%, var(--surface-2) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 22px 16px;
}
.phone-frame .phone-notch { width: 46px; height: 5px; background: #000; margin: 0 auto 4px; }
.phone-frame .phone-logo { width: 78%; height: auto; }
.phone-frame .phone-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; }
.phone-frame .phone-tiles span { display: block; aspect-ratio: 3/4; background: var(--surface); border: 1px solid var(--border); }
.phone-frame .phone-tiles span:nth-child(1) { background: var(--accent); opacity: .85; }
.phone-frame .phone-tiles span:nth-child(4) { background: var(--accent-2); opacity: .75; }
.phone-frame .phone-cta {
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted);
}
.store-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; }
.store-badge {
  display: flex; align-items: center; gap: 10px; background: #16121f; border: 1px solid var(--border);
  color: #fff; padding: 8px 16px; min-width: 168px;
}
.store-badge .icon { font-size: 24px; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.2; }
.store-badge small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.store-badge strong { font-size: 15px; font-weight: 600; }

/* FAQ */
.faq-list { border: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); background: var(--surface); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; color: var(--accent); font-size: 20px; font-weight: 700; flex-shrink: 0;
  display: inline-block; transition: transform 200ms ease-out;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 18px 18px; color: var(--muted); }

/* Generic surface panel (forms, etc.) */
.panel { background: var(--surface); border: 1px solid var(--border); padding: 26px 24px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.form-row input, .form-row textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 12px 14px; font-family: var(--font-body); font-size: 14.5px;
}
.form-row input, .form-row textarea { transition: border-color 150ms ease; }
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.form-check input { width: 16px; height: 16px; margin-top: 3px; flex-shrink: 0; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.form-note a { color: var(--accent-2); }

.two-col { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1.1fr .9fr; } }

.steps-ol { counter-reset: step; list-style: none; padding: 0; }
.steps-ol li {
  counter-increment: step; position: relative; padding-left: 40px; margin-bottom: 14px; font-size: 15px;
}
.steps-ol li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 26px; height: 26px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center;
}

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 40px 0 24px; }
.footer-top { display: grid; grid-template-columns: 1fr; gap: 28px; margin-bottom: 26px; }
@media (min-width: 760px) { .footer-top { grid-template-columns: 1.4fr repeat(2, 1fr); } }
.footer-brand .logo { margin-bottom: 10px; }
.footer-brand p { color: var(--muted); font-size: 13.5px; max-width: 340px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { font-size: 14px; color: var(--text); transition: color 150ms ease; }
.footer-col a:hover { color: var(--accent); }
.trust-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 20px 0; border-top: 1px solid var(--border); }
.trust-row img { height: 34px; width: auto; }
.footer-bottom {
  padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center;
}
.footer-legal { font-size: 12.5px; color: var(--muted); max-width: 780px; }
.footer-copy { font-size: 12.5px; color: var(--muted); }
.age-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border: 1px solid var(--border); font-weight: 700; font-size: 12px; flex-shrink: 0;
}

/* 404 */
.error-page { padding: 90px 0; text-align: center; }
.error-page .code { font-family: var(--font-heading); font-size: 84px; font-weight: 700; color: var(--accent); line-height: 1; }
.error-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:active,
  .game-tile, .game-tile:active,
  .mobile-menu, .hamburger .icon-bars, .hamburger .icon-xmark {
    transform: none !important;
  }
  .mobile-menu { transition: opacity 150ms ease, visibility 150ms; }
}

/* Utility */
.muted { color: var(--muted); }
.center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
