:root {
  --navy: #081734;
  --navy-2: #0e2250;
  --navy-3: #13295e;
  --gold: #fabf25;
  --purple: #6b3fa0;
  --text: #f2f4fa;
  --muted: #b9c3dc;
  --radius: 10px;
  --max: 1120px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); }
a:hover { text-decoration: none; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); text-transform: uppercase; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); text-transform: uppercase; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }

section { padding: 48px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* Header */
.site-header {
  background: #050f26;
  border-bottom: 1px solid rgba(250, 191, 37, 0.25);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.logo img { height: 40px; width: auto; }
.main-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.main-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--navy-3); color: var(--gold); }
.header-actions { display: flex; gap: 8px; }

/* Buttons */
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  border: 0;
  box-shadow: 0 6px 18px rgba(250, 191, 37, 0.25);
}
.btn:hover { background: #ffd158; color: var(--navy); }
.btn-small { min-height: 36px; padding: 8px 16px; font-size: 0.9rem; }
.btn-ghost { background: var(--navy-3); color: var(--text); box-shadow: none; }
.btn-ghost:hover { background: var(--purple); color: var(--text); }
.btn-sub { font-size: 0.8rem; font-weight: 500; opacity: 0.85; }

/* Hero */
.hero { border-top: 0; padding: 40px 0 24px; }
.hero .wrap {
  display: grid;
  gap: 24px;
  align-items: center;
}
.hero-text .intro { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.hero-art { text-align: center; }
.hero-art img { border-radius: var(--radius); margin-inline: auto; }
.hero-art img.hero-shot { max-width: 300px; width: 100%; height: auto; border: 3px solid var(--gold, #fabf25); border-radius: 28px; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }

/* Mobile app bar */
.app-bar { display: none; }
@media (max-width: 768px) {
  .app-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    padding: 8px 12px;
    background: #050f26;
    border-top: 1px solid rgba(250, 191, 37, 0.35);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.4);
  }
  .app-bar__icon { border-radius: 10px; flex: none; }
  .app-bar__text { flex: 1; display: flex; flex-direction: column; font-size: 14px; line-height: 1.25; color: var(--text); min-width: 0; }
  .app-bar__rating { color: var(--gold); font-size: 13px; }
  .app-bar__btn {
    flex: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy);
    font-weight: 800;
    text-decoration: none;
  }
  body { padding-bottom: 64px; }
}

/* Games and providers */
.game-grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.game-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--navy-2);
  border: 1px solid rgba(250, 191, 37, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: transform .15s, border-color .15s;
}
.game-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.game-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 0; }
.game-card__name { padding: 10px 12px 0; font-weight: 700; line-height: 1.3; }
.game-card__provider { padding: 2px 12px 12px; font-size: 0.85rem; color: var(--muted); }
.provider-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.provider-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--navy-3);
  border: 1px solid rgba(250, 191, 37, 0.3);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.provider-list a:hover { background: var(--purple); border-color: var(--gold); }
@media (min-width: 640px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .game-grid { grid-template-columns: repeat(4, 1fr); } }

/* Quick links (table of contents) */
.toc {
  margin: 24px 0 8px;
  padding: 20px 24px;
  background: var(--navy-2);
  border: 1px solid rgba(250, 191, 37, 0.25);
  border-radius: var(--radius);
}
.toc-title { margin: 0 0 12px; font-size: 1.1rem; font-weight: 800; text-transform: uppercase; color: var(--gold); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: grid; gap: 8px 24px; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--navy-3);
  color: var(--text);
  text-decoration: none;
}
.toc a::before {
  content: counter(toc);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  font-size: 0.85rem;
}
.toc a:hover { background: var(--purple); }
@media (min-width: 700px) { .toc ol { grid-template-columns: 1fr 1fr; } }

/* Lists, tables, FAQ */
.table-wrap { overflow-x: auto; margin: 0 0 1.5em; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--navy-2); }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
th { background: var(--navy-3); color: var(--gold); }

ol, ul { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }

.split { display: grid; gap: 24px; align-items: center; }
.split img { border-radius: var(--radius); }

.tiles img { border-radius: var(--radius); margin-bottom: 1em; }

.faq details {
  background: var(--navy-2);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.faq details p { margin-top: 10px; color: var(--muted); }

.cta-band {
  background: linear-gradient(120deg, var(--purple), var(--navy-3));
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.cta-band p { color: var(--text); }

/* Footer */
.site-footer { background: #050f26; padding: 36px 0 24px; border-top: 1px solid rgba(250, 191, 37, 0.25); }
.footer-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.footer-actions .btn { flex: 1 1 200px; max-width: 280px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.footer-nav a { color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.footer-note { color: var(--muted); font-size: 0.9rem; margin: 0; }
.age { display: inline-block; border: 2px solid var(--gold); color: var(--gold); border-radius: 50%; width: 40px; height: 40px; line-height: 36px; text-align: center; font-weight: 800; margin-right: 8px; vertical-align: middle; }

@media (min-width: 720px) {
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; }
  .split { grid-template-columns: 1fr 1fr; }
  section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .header-actions .btn { padding: 8px 12px; }
  .header-actions .btn-ghost { display: none; }
}

/* Mobile menu (burger), enabled by js/menu.js */
.nav-toggle, .nav-login { display: none; }
@media (max-width: 768px) {
  .site-header.has-menu .wrap { gap: 10px; }
  .site-header.has-menu .logo { margin-right: auto; }
  .site-header.has-menu .logo img { height: 32px; }
  .site-header.has-menu .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(250, 191, 37, 0.4);
    border-radius: 8px;
    background: var(--navy-3);
    cursor: pointer;
  }
  .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
  }
  .nav-toggle__bar { position: relative; }
  .nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bar::before { top: -7px; }
  .nav-toggle__bar::after { top: 7px; }
  .menu-open .nav-toggle__bar { background: transparent; }
  .menu-open .nav-toggle__bar::before { top: 0; transform: rotate(45deg); }
  .menu-open .nav-toggle__bar::after { top: 0; transform: rotate(-45deg); }

  .site-header.has-menu .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px 16px;
    background: #050f26;
    border-bottom: 1px solid rgba(250, 191, 37, 0.25);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
    overflow: visible;
  }
  .site-header.has-menu.menu-open .main-nav { display: flex; }
  .site-header.has-menu .main-nav a { padding: 12px; font-size: 1.05rem; }
  .site-header.has-menu .nav-login { display: inline-flex; color: var(--gold); }
}
@media (max-width: 480px) {
  .site-header.has-menu .header-actions .btn { padding: 8px 14px; }
}
@media (min-width: 481px) {
  .site-header .nav-login { display: none !important; }
}
