:root {
  color-scheme: light;
  --bg: #F2F3F7;
  --bg-bar: rgba(242, 243, 247, 0.85);
  --well: #EAECEF;
  --ink: #171C26;
  --text: #4B5364;
  --muted: #5A6374;
  --line: rgba(23, 28, 38, 0.07);
  --rim: rgba(255, 255, 255, 0.78);
  --neu-inset: inset 6px 6px 16px rgba(168, 177, 196, 0.46), inset -6px -6px 16px rgba(255, 255, 255, 0.95);
  --neu-raised-sm: 3px 3px 7px rgba(168, 177, 196, 0.40), -2px -2px 6px rgba(255, 255, 255, 0.92);
  --blue: #2F6FDE;
  --soon-fg: #2458B8;
  --soon-bg: rgba(47, 111, 222, 0.09);
  --soon-bd: rgba(47, 111, 222, 0.20);
  --sans: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #162032;
  --bg-bar: rgba(22, 32, 50, 0.85);
  --well: #121A2A;
  --ink: #EEF4FC;
  --text: #B0C0D8;
  --muted: #7D91B0;
  --line: rgba(140, 178, 240, 0.08);
  --rim: rgba(140, 178, 240, 0.09);
  --neu-inset: inset 5px 5px 13px rgba(6, 10, 19, 0.72), inset -4px -4px 10px rgba(44, 66, 102, 0.28);
  --neu-raised-sm: 3px 3px 7px rgba(6, 10, 19, 0.52), -2px -2px 5px rgba(44, 66, 102, 0.22);
  --blue: #6AA3FF;
  --soon-fg: #96BFFF;
  --soon-bg: rgba(106, 163, 255, 0.12);
  --soon-bd: rgba(106, 163, 255, 0.24);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

body [lang="en"] { display: none; }   /* body: the script sets <html lang="en"> too, which the bare rule hid (blank page in English) */
html[data-lang="en"] [lang="vi"] { display: none; }
html[data-lang="en"] [lang="en"] { display: inline; }
html[data-lang="vi"] [lang="vi"] { display: inline; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: var(--bg-bar);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.brand img { height: 26px; width: auto; }
.brand span { font-size: 12px; letter-spacing: 0.12em; }

.prefs { display: flex; align-items: center; gap: 8px; }
.seg {
  display: inline-flex;
  border-radius: 999px;
  box-shadow: var(--neu-inset);
  padding: 3px;
  background: var(--well);
}
.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--neu-raised-sm);
}
.theme-btn {
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--well);
  color: var(--ink);
  box-shadow: var(--neu-inset);
  cursor: pointer;
  display: grid;
  place-items: center;
}
html[data-theme="light"] .ic-moon,
html[data-theme="dark"] .ic-sun { display: none; }

main { flex: 1; display: flex; align-items: center; padding: 48px 0 64px; }

.hero-well {
  background: var(--well);
  box-shadow: var(--neu-inset);
  border-radius: 28px;
  padding: 48px 40px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 12px;
}
h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 18px;
  letter-spacing: -0.03em;
}
.pill {
  display: inline-block;
  margin: 0 0 22px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--soon-fg);
  background: var(--soon-bg);
  border: 1px solid var(--soon-bd);
}
.lead {
  font-size: 17px;
  line-height: 1.65;
  margin: 0 0 20px;
  color: var(--text);
}
.sub { margin: 0; font-size: 14px; }
.sub a { font-weight: 600; }

footer {
  padding: 20px 0 32px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
footer p { margin: 0; }

@media (max-width: 640px) {
  .hero-well { padding: 36px 22px; border-radius: 22px; }
  .brand span { display: none; }
}

/* portal: game cards */
main { display: block; }
.intro { text-align: center; margin: 0 0 32px; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.game { background: var(--well); box-shadow: var(--neu-inset); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; }
.game .art { display: block; height: 200px; padding: 20px; background: #101a2c; }
.game .art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.game .body { padding: 24px; display: flex; flex-direction: column; flex: 1; text-align: left; }
.game h2 { margin: 0 0 10px; color: var(--ink); font-size: 22px; letter-spacing: -0.01em; }
.game .pill { align-self: flex-start; margin: 0 0 12px; }
.game .desc { margin: 0 0 20px; line-height: 1.6; flex: 1; }
.play { display: block; text-align: center; padding: 14px 18px; border-radius: 16px; background: var(--blue); color: #fff; font-weight: 700; font-size: 17px; }
html[data-theme="dark"] .play { color: #0B1424; }
.play:hover { text-decoration: none; filter: brightness(1.08); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.note { margin: 28px 0 12px; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.6; }
.sub { text-align: center; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html[data-lang] .vh { display: block; }
