:root {
  --bg: #07060f;
  --bg-2: #0e0b1c;
  --surface: #151129;
  --surface-2: #1d1837;
  --line: #2a2450;
  --text: #ece9ff;
  --muted: #a39cc8;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #f0abfc;
  --gold: #fbbf24;
  --danger: #fb7185;
  --ok: #34d399;
  --grad: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--pink));
  --radius: 16px;
  --font: 'Inter', 'Noto Sans Thai', 'Noto Sans Lao', system-ui, sans-serif;
  --font-head: 'Kanit', 'Inter', 'Noto Sans Lao', system-ui, sans-serif;
  color-scheme: dark;
}
html:lang(lo) { --font-head: 'Noto Sans Lao', 'Inter', system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(760px, 100% - 32px); }
.center { text-align: center; margin-top: 32px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 20px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform .15s, box-shadow .2s, background .2s, opacity .2s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn--pri { background: var(--grad); color: #0b0718; box-shadow: 0 8px 28px -8px rgba(139, 92, 246, .7); }
.btn--pri:hover { box-shadow: 0 10px 36px -6px rgba(34, 211, 238, .6); }
.btn--ghost { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: var(--violet); }
.btn--lg { padding: 14px 28px; font-size: 1.05rem; }
.btn--sm { padding: 6px 14px; font-size: .9rem; }
.btn--block { width: 100%; padding: 13px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* Maintenance banner */
.maint { background: #3b1d05; color: var(--gold); text-align: center; padding: 8px 16px; font-weight: 600; font-size: .95rem; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(7, 6, 15, .78); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(42, 36, 80, .6); }
.nav__in { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 1.3rem/1 'Kanit', 'Inter', sans-serif; letter-spacing: .02em; }
.brand b { color: var(--gold); }
.nav__links { display: flex; gap: 22px; margin-right: auto; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav__links a:hover { color: var(--text); }
.nav__right { display: flex; align-items: center; gap: 10px; }
.lang select { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; font-weight: 700; font-size: .85rem; cursor: pointer; }
.guest { display: flex; gap: 8px; }
.member { display: flex; align-items: center; gap: 12px; }
.member__info { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.member__name { font-weight: 700; font-size: .92rem; }
.member__bal { color: var(--muted); font-size: .82rem; }
.member__bal b { color: var(--gold); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 96px 0 88px; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background:
  radial-gradient(60% 50% at 75% 40%, rgba(139, 92, 246, .28), transparent 70%),
  radial-gradient(40% 40% at 15% 80%, rgba(34, 211, 238, .14), transparent 70%); }
.vortex { position: absolute; z-index: -1; right: -12%; top: 50%; width: min(760px, 90vw); aspect-ratio: 1; transform: translateY(-50%); }
.vortex i { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 20%, rgba(34, 211, 238, .55), rgba(139, 92, 246, .7), transparent 60%, rgba(240, 171, 252, .45), transparent 85%);
  -webkit-mask: radial-gradient(closest-side, transparent 62%, #000 63%, #000 70%, transparent 71%); mask: radial-gradient(closest-side, transparent 62%, #000 63%, #000 70%, transparent 71%);
  animation: spin 18s linear infinite; }
.vortex i:nth-child(2) { inset: 14%; animation-duration: 12s; animation-direction: reverse; opacity: .8; }
.vortex i:nth-child(3) { inset: 28%; animation-duration: 8s; opacity: .6; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vortex i { animation: none; } html { scroll-behavior: auto; } }

.hero__in { max-width: 720px; margin-left: max(16px, (100% - 1180px) / 2); }
.pill { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 6px 14px; border-radius: 999px; background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .3); color: var(--cyan); font-weight: 600; font-size: .9rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .2); }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 800; letter-spacing: -.01em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { color: var(--muted); font-size: 1.12rem; max-width: 560px; margin: 20px 0 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { list-style: none; padding: 0; margin: 48px 0 0; display: flex; flex-wrap: wrap; gap: 14px; }
.stats li { background: rgba(21, 17, 41, .7); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; min-width: 150px; display: flex; flex-direction: column; }
.stats b { font: 800 1.7rem/1.1 'Kanit', 'Inter', sans-serif; color: var(--gold); }
.stats span { color: var(--muted); font-size: .88rem; }

/* Sections */
.sec { padding: 88px 0; }
.sec--alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-block: 1px solid rgba(42, 36, 80, .5); }
.sec__head { text-align: center; margin-bottom: 36px; }
.sec__head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.sec__head p { color: var(--muted); margin: 10px 0 0; }

/* Games */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 24px; scrollbar-width: thin; justify-content: safe center; }
.tab { flex: none; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700; cursor: pointer; }
.tab[aria-selected='true'] { background: var(--grad); color: #0b0718; border-color: transparent; }
.tab small { opacity: .7; font-weight: 600; margin-left: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); border-color: var(--violet); box-shadow: 0 14px 30px -14px rgba(139, 92, 246, .7); }
.card__img { aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 40%, var(--surface-2), var(--bg-2)); display: grid; place-items: center; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__img .fallback { font: 800 1.4rem 'Kanit', sans-serif; color: var(--violet); }
.card__body { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.card__name { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__tag { flex: none; font-size: .68rem; font-weight: 700; color: var(--cyan); background: rgba(34, 211, 238, .1); padding: 2px 7px; border-radius: 6px; }
.state { text-align: center; color: var(--muted); margin: 16px 0 0; }
.state:empty { display: none; }
.skeleton { aspect-ratio: 4 / 3.8; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Features */
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.feat__ic { font-size: 1.6rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: rgba(139, 92, 246, .15); margin-bottom: 16px; }
.feat h3 { font-size: 1.2rem; margin-bottom: 8px; }
.feat p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px 26px; }
.steps__n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #0b0718; font: 800 1.2rem 'Kanit', sans-serif; margin-bottom: 16px; }
.steps h3 { font-size: 1.2rem; margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; font-size: .95rem; }

/* FAQ */
.qa { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
.qa summary { cursor: pointer; padding: 18px 22px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; color: var(--cyan); font-size: 1.3rem; line-height: 1; }
.qa[open] summary::after { content: '−'; }
.qa p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* Footer */
.foot { padding: 40px 0; border-top: 1px solid var(--line); }
.foot__in { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.foot__warn { color: var(--muted); font-size: .88rem; max-width: 640px; margin: 0; }
.age { display: inline-block; border: 2px solid var(--danger); color: var(--danger); border-radius: 50%; width: 34px; height: 34px; line-height: 30px; font-weight: 800; font-size: .8rem; margin-right: 4px; }
.foot__copy { color: #6f6897; font-size: .82rem; margin: 0; }

/* Modal */
.modal { border: 1px solid var(--line); border-radius: 20px; padding: 0; background: var(--bg-2); color: var(--text); width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(139, 92, 246, .2); }
.modal::backdrop { background: rgba(3, 2, 10, .72); backdrop-filter: blur(4px); }
.form { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px 24px 24px; }
.form h2 { font-size: 1.6rem; margin-bottom: 4px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--muted); flex: 1; min-width: 0; }
.form input, .form select { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font-size: 1rem; color: var(--text); }
.form input:focus, .form select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .25); }
.form input[aria-invalid='true'] { border-color: var(--danger); }
.form small { font-weight: 400; color: #7d76a6; font-size: .78rem; }
.form__row { display: flex; gap: 12px; }
.form__err { color: var(--danger); margin: 0; font-size: .9rem; min-height: 0; }
.form__err:empty { display: none; }
.form__alt { text-align: center; color: var(--muted); font-size: .9rem; margin: 0; }
.form__alt a { color: var(--cyan); font-weight: 700; }
.modal__x { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .06); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.modal__x:hover { background: rgba(255, 255, 255, .12); }
.captcha { display: flex; gap: 12px; align-items: flex-end; }
.captcha__img { flex: none; height: 50px; width: 150px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; }
.captcha__img img { width: 100%; height: 100%; object-fit: contain; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: var(--surface-2); border: 1px solid var(--violet); padding: 12px 20px; border-radius: 12px; font-weight: 600; box-shadow: 0 12px 40px -10px rgba(0, 0, 0, .7); max-width: calc(100% - 32px); }

/* Responsive */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__in { justify-content: space-between; }
  .feats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .vortex { right: -40%; opacity: .6; }
}
@media (max-width: 600px) {
  .nav__in { height: 60px; gap: 8px; }
  .brand span { font-size: 1.05rem; }
  .brand img { width: 30px; height: 30px; }
  .btn { padding: 8px 14px; font-size: .9rem; }
  .btn--lg { padding: 13px 22px; font-size: 1rem; }
  .brand span { display: none; }
  .guest .btn { padding: 7px 12px; font-size: .85rem; }
  .member__name { display: none; }
  .hero { padding: 64px 0 56px; }
  .hero__in { margin-left: 16px; margin-right: 16px; }
  .stats li { min-width: 0; flex: 1 1 40%; padding: 12px 14px; }
  .sec { padding: 64px 0; }
  .feats { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .form__row { flex-direction: column; }
  .captcha { flex-direction: column; align-items: stretch; }
  .captcha__img { width: 100%; height: 60px; }
}
