/* ==========================================================================
   AE888GM — Bảng màu & nền tảng giao diện
   Phong cách: capsule (viên thuốc), bo tròn mềm, trạng thái chọn dạng nền nhạt
   ========================================================================== */

:root {
  --bg: #f5f8fd;
  --surface: #ffffff;
  --surface-2: #f9fbff;
  --ink: #0e1a2b;
  --ink-2: #34435a;
  --muted: #64748b;
  --line: #e6ecf6;
  --line-2: #eef3fb;

  --primary: #2163e8;
  --primary-600: #1a54c9;
  --primary-soft: #eef5ff;
  --primary-soft-2: #f3f7ff;

  --green: #10b981;
  --green-soft: #e8f8f1;
  --gold: #f0a11a;
  --gold-soft: #fdf4e3;
  --violet: #7c5cff;
  --violet-soft: #f1edff;
  --rose: #f43f5e;
  --rose-soft: #ffeef1;

  --navy: #08182f;
  --navy-2: #0f2b52;

  --r-pill: 999px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(14, 26, 43, .04), 0 1px 3px rgba(14, 26, 43, .03);
  --shadow-md: 0 8px 24px -12px rgba(14, 26, 43, .16);
  --shadow-lg: 0 24px 60px -32px rgba(9, 30, 66, .28);

  --container: 1160px;
  --header-h: 68px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* ---------- Tiện ích bố cục ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section { padding: 58px 0; }
.section--tight { padding: 34px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-head__text { max-width: 640px; }
.section-title {
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.28;
  letter-spacing: -.02em;
  font-weight: 750;
}
.section-desc { margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.stack-8 > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--surface); color: var(--primary);
  padding: 10px 18px; border-radius: var(--r-pill); box-shadow: var(--shadow-md);
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Nút & viên thuốc ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 650; letter-spacing: -.01em;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-600); }
.btn--soft { background: var(--primary-soft); color: var(--primary); }
.btn--soft:hover { background: #e3eeff; }
.btn--ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn--ghost:hover { background: var(--primary-soft-2); border-color: #d7e4fb; color: var(--primary); }
.btn--light { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .22); }
.btn--light:hover { background: rgba(255, 255, 255, .18); }
.btn--sm { height: 34px; padding: 0 15px; font-size: 13px; }
.btn--lg { height: 48px; padding: 0 26px; font-size: 15px; }
.btn--block { width: 100%; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600; line-height: 1;
  background: var(--primary-soft); color: var(--primary);
}
.pill svg { width: 14px; height: 14px; }
.pill--green { background: var(--green-soft); color: #0b8a63; }
.pill--gold { background: var(--gold-soft); color: #a96a05; }
.pill--violet { background: var(--violet-soft); color: #5b3fd6; }
.pill--rose { background: var(--rose-soft); color: #d92c4b; }
.pill--line { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
.pill--onDark { background: rgba(255, 255, 255, .1); color: #dbe7ff; }

.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.site-header__inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #2f7bff, #1449c0);
  color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .02em;
  box-shadow: 0 6px 14px -8px rgba(33, 99, 232, .8);
}
.brand__name { font-weight: 800; font-size: 16.5px; letter-spacing: -.02em; }
.brand__name span { color: var(--primary); }
.brand__tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  color: var(--muted); text-transform: uppercase; line-height: 1;
  padding-left: 9px; margin-left: 2px; border-left: 1px solid var(--line);
}

.nav { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.nav a {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: background-color .16s ease, color .16s ease;
}
.nav a:hover { background: var(--primary-soft-2); color: var(--primary); }
.nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-burger {
  display: none; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  align-items: center; justify-content: center;
}
.header-burger svg { width: 20px; height: 20px; }

/* Menu mobile (drawer) */
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 14px 20px 20px; display: none;
  box-shadow: var(--shadow-md);
}
.mobile-nav.is-open { display: block; animation: dropIn .18s ease both; }
.mobile-nav a {
  display: flex; justify-content: space-between; align-items: center;
  height: 46px; padding: 0 16px; border-radius: var(--r-pill);
  font-weight: 620; color: var(--ink-2);
}
.mobile-nav a + a { margin-top: 4px; }
.mobile-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
.mobile-nav .btn { margin-top: 12px; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { padding: 26px 0 0; }
.hero__panel {
  position: relative; overflow: hidden;
  border-radius: 26px;
  padding: 46px 44px 42px;
  background:
    radial-gradient(120% 120% at 88% 12%, rgba(47, 123, 255, .38) 0%, rgba(47, 123, 255, 0) 58%),
    radial-gradient(90% 120% at 4% 96%, rgba(18, 185, 129, .22) 0%, rgba(18, 185, 129, 0) 60%),
    linear-gradient(140deg, #0a1c36 0%, #0d2547 48%, #12396f 100%);
  color: #fff;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center;
}
.hero__panel::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 80% at 70% 20%, #000 0%, transparent 78%);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 1; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.hero h1 {
  margin-top: 16px;
  font-size: clamp(28px, 4.1vw, 44px);
  line-height: 1.14; letter-spacing: -.035em; font-weight: 800;
}
.hero h1 em { font-style: normal; color: #8fc0ff; }
.hero__lead {
  margin-top: 14px; max-width: 470px;
  color: rgba(232, 240, 255, .78); font-size: 15px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero__stats {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px;
  padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12);
}
.hero__stat { padding-right: 18px; }
.hero__stat + .hero__stat { padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, .14); }
.hero__stat b { display: block; font-size: 19px; letter-spacing: -.02em; }
.hero__stat span { font-size: 12px; color: rgba(232, 240, 255, .62); }

.hero__visual { position: relative; z-index: 1; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-card {
  border-radius: 16px; overflow: hidden;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .13);
  backdrop-filter: blur(6px);
  padding: 14px;
  transition: transform .22s ease, background-color .22s ease;
}
.hero-card:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .11); }
.hero-card__art {
  height: 62px; border-radius: 11px; margin-bottom: 10px;
  display: grid; place-items: center; overflow: hidden;
}
.hero-card__art img { width: 48px; height: 48px; }
.hero-card b { font-size: 13.5px; display: block; }
.hero-card span { font-size: 11.5px; color: rgba(232, 240, 255, .6); }
.hero-card:nth-child(2), .hero-card:nth-child(3) { transform: translateY(14px); }
.hero-card:nth-child(2):hover, .hero-card:nth-child(3):hover { transform: translateY(11px); }

/* Dải lợi ích dưới hero */
.trust {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
}
.trust__item {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: var(--r-pill); background: var(--surface);
  border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.trust__item svg { width: 16px; height: 16px; color: var(--green); }

/* ---------- Thẻ / khối ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.card--pad { padding: 22px; }

/* ---------- Tabs capsule ---------- */
.tabs-wrap { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  overflow-x: auto; max-width: 100%;
}
.tabs button {
  height: 34px; padding: 0 15px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--muted);
  font-size: 13.5px; font-weight: 620; white-space: nowrap;
  transition: background-color .16s ease, color .16s ease;
}
.tabs button:hover { background: var(--primary-soft-2); color: var(--primary); }
.tabs button.is-active { background: var(--primary-soft); color: var(--primary); }

/* ---------- Lưới game ---------- */
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.game-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  display: flex; flex-direction: column;
}
.game-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d9e6fb; }
.game-card__art {
  position: relative; aspect-ratio: 16 / 10;
  display: grid; place-items: center; overflow: hidden;
}
.game-card__art img { width: 66%; max-width: 108px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .18)); transition: transform .3s ease; }
.game-card:hover .game-card__art img { transform: scale(1.06) rotate(-2deg); }
.game-card__badge {
  position: absolute; top: 10px; left: 10px;
  height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .01em;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  box-shadow: 0 4px 12px -6px rgba(8, 24, 47, .4);
}
.game-card__badge--hot { background: #fff1f2; color: #d92c4b; }
.game-card__badge--new { background: #ecfdf5; color: #0b8a63; }
.game-card__body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.game-card__title { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.game-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.game-card__meta span { font-size: 12px; color: var(--muted); }
.game-card__go {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); flex: none;
  transition: background-color .18s ease, transform .18s ease;
}
.game-card__go svg { width: 15px; height: 15px; }
.game-card:hover .game-card__go { background: var(--primary); color: #fff; }
.game-card.is-hidden { display: none; }

.art--green { background: radial-gradient(120% 120% at 20% 0%, #34d399 0%, #059669 55%, #065f46 100%); }
.art--blue { background: radial-gradient(120% 120% at 20% 0%, #60a5fa 0%, #2563eb 55%, #1e3a8a 100%); }
.art--gold { background: radial-gradient(120% 120% at 20% 0%, #fbbf24 0%, #d97706 55%, #92400e 100%); }
.art--violet { background: radial-gradient(120% 120% at 20% 0%, #a78bfa 0%, #7c3aed 55%, #4c1d95 100%); }
.art--rose { background: radial-gradient(120% 120% at 20% 0%, #fb7185 0%, #e11d48 55%, #881337 100%); }
.art--teal { background: radial-gradient(120% 120% at 20% 0%, #2dd4bf 0%, #0d9488 55%, #134e4a 100%); }
.art--navy { background: radial-gradient(120% 120% at 20% 0%, #3b82f6 0%, #1d4ed8 55%, #0f2a63 100%); }

/* ---------- Ưu đãi ---------- */
.promo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.promo {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface);
  padding: 20px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.promo:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.promo::before {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 160px; height: 160px; border-radius: 50%;
  background: var(--primary-soft); opacity: .8;
}
.promo > * { position: relative; z-index: 1; }
.promo__value { font-size: 27px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.promo__value small { font-size: 13px; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.promo__title { font-size: 15px; font-weight: 700; }
.promo__desc { font-size: 13.5px; color: var(--muted); }
.promo__foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.promo__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; font-weight: 700; letter-spacing: .06em;
  padding: 6px 11px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px dashed #cfdcf3; color: var(--ink-2);
}

/* ---------- Các bước ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: step; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; box-shadow: var(--shadow-sm);
  position: relative;
}
.step__num {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 12px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 13px; font-weight: 800;
}
.step h3 { font-size: 14.5px; font-weight: 700; }
.step p { margin-top: 6px; font-size: 13.5px; color: var(--muted); }

/* ---------- Bảng / danh sách ---------- */
.list-rows { display: grid; gap: 8px; }
.row-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 14px;
  transition: border-color .16s ease, background-color .16s ease;
}
.row-item:hover { border-color: #d7e4fb; background: var(--surface-2); }
.row-item__idx {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 750;
  background: var(--primary-soft); color: var(--primary);
}
.row-item__title { font-size: 14px; font-weight: 640; }
.row-item__sub { font-size: 12.5px; color: var(--muted); }
.row-item__end { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ---------- Tin tức ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.news-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-card__thumb { height: 132px; position: relative; display: grid; place-items: center; }
.news-card__thumb img { width: 54px; height: 54px; opacity: .95; }
.news-card__body { padding: 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.news-card__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.news-card__title { font-size: 15px; font-weight: 700; line-height: 1.42; letter-spacing: -.01em; }
.news-card__excerpt { font-size: 13.5px; color: var(--muted); }
.news-card__link { margin-top: auto; font-size: 13px; font-weight: 650; color: var(--primary); display: inline-flex; align-items: center; gap: 5px; }
.news-card__link svg { width: 14px; height: 14px; transition: transform .18s ease; }
.news-card:hover .news-card__link svg { transform: translateX(3px); }

/* ---------- CTA band ---------- */
.cta-band {
  border-radius: 24px; padding: 34px 36px;
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(33, 99, 232, .16) 0%, rgba(33, 99, 232, 0) 60%),
    var(--surface);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.cta-band h2 { font-size: clamp(20px, 2.2vw, 25px); letter-spacing: -.025em; font-weight: 780; }
.cta-band p { margin-top: 6px; color: var(--muted); font-size: 14px; max-width: 520px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 8px; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 18px; background: transparent; border: 0; text-align: left;
  font-size: 14.5px; font-weight: 650;
  transition: background-color .16s ease, color .16s ease;
}
.faq__q:hover { background: var(--surface-2); }
.faq__q[aria-expanded="true"] { color: var(--primary); background: var(--primary-soft-2); }
.faq__icon {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: var(--primary-soft); color: var(--primary);
  transition: transform .22s ease;
}
.faq__icon svg { width: 13px; height: 13px; }
.faq__q[aria-expanded="true"] .faq__icon { transform: rotate(45deg); }
.faq__a { display: none; padding: 0 18px 16px; color: var(--muted); font-size: 14px; }
.faq__item.is-open .faq__a { display: block; }

/* ---------- Nội dung bài viết ---------- */
.page-head {
  padding: 30px 0 6px;
}
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: #b7c2d4; }
.page-head h1 {
  margin-top: 12px;
  font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; letter-spacing: -.03em; font-weight: 800;
}
.page-head .lead { margin-top: 10px; max-width: 720px; color: var(--muted); font-size: 15px; }

.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 28px; box-shadow: var(--shadow-sm); }
.prose > * + * { margin-top: 15px; }
.prose h2 { font-size: 21px; letter-spacing: -.02em; font-weight: 760; margin-top: 30px; }
.prose h3 { font-size: 16.5px; font-weight: 700; margin-top: 22px; }
.prose p, .prose li { font-size: 14.8px; color: var(--ink-2); line-height: 1.78; }
.prose ul, .prose ol { padding-left: 2px; display: grid; gap: 8px; }
.prose ul li { position: relative; padding-left: 20px; }
.prose ul li::before {
  content: ""; position: absolute; left: 3px; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary); opacity: .55;
}
.prose ol { counter-reset: li; }
.prose ol li { position: relative; padding-left: 26px; counter-increment: li; }
.prose ol li::before {
  content: counter(li); position: absolute; left: 0; top: 3px;
  width: 19px; height: 19px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 750;
  background: var(--primary-soft); color: var(--primary);
}
.prose a { color: var(--primary); text-decoration: underline; text-decoration-color: #bcd3fb; text-underline-offset: 3px; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose blockquote {
  border-left: 3px solid var(--primary);
  background: var(--primary-soft-2); border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 14px 18px; font-size: 14.5px; color: var(--ink-2);
}
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.prose th, .prose td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-2); }
.prose th { background: var(--surface-2); font-weight: 700; font-size: 13px; color: var(--ink-2); }
.prose tr:last-child td { border-bottom: 0; }
.prose .note {
  background: var(--gold-soft); border: 1px solid #f7e3bb;
  border-radius: var(--r-md); padding: 14px 16px; font-size: 13.8px; color: #7a4f06;
}

.sidebar { display: grid; gap: 14px; position: sticky; top: calc(var(--header-h) + 16px); }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.side-card__title { font-size: 13px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.side-links { display: grid; gap: 4px; }
.side-links a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: background-color .16s ease, color .16s ease;
}
.side-links a:hover, .side-links a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
.side-links svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.side-links a:hover svg, .side-links a[aria-current="page"] svg { color: var(--primary); }
.toc { display: grid; gap: 2px; }
.toc a { display: block; padding: 7px 12px; border-radius: var(--r-pill); font-size: 13px; color: var(--ink-2); }
.toc a:hover { background: var(--primary-soft-2); color: var(--primary); }
.toc a.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 650; }

/* ---------- Biểu mẫu ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 15px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); color: var(--ink);
  font: inherit; font-size: 14px;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.field textarea { min-height: 120px; resize: vertical; border-radius: 14px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0; background: #fff; border-color: #9dc0f8;
  box-shadow: 0 0 0 4px rgba(33, 99, 232, .1);
}
.field .hint { font-size: 12px; color: var(--muted); }
.form-note { font-size: 12.5px; color: var(--muted); }
.form-status {
  display: none; align-items: center; gap: 8px;
  padding: 11px 15px; border-radius: var(--r-md);
  background: var(--green-soft); color: #0b7d5b; font-size: 13.5px; font-weight: 600;
}
.form-status.is-visible { display: flex; }

.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.contact-card__icon {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); margin-bottom: 12px;
}
.contact-card__icon svg { width: 18px; height: 18px; }
.contact-card h3 { font-size: 14px; font-weight: 700; }
.contact-card p { margin-top: 4px; font-size: 13.5px; color: var(--muted); word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 30px; background: var(--navy); color: rgba(226, 235, 250, .72); padding: 44px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 28px; }
.site-footer .brand__name { color: #fff; }
.site-footer .brand__name span { color: #7fb2ff; }
.site-footer .brand__tag { color: rgba(226, 235, 250, .4); border-color: rgba(255, 255, 255, .14); }
.footer-about { margin-top: 14px; font-size: 13.5px; line-height: 1.7; max-width: 300px; color: rgba(226, 235, 250, .6); }
.footer-col h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: rgba(255, 255, 255, .92); font-weight: 700; margin-bottom: 12px; }
.footer-col ul { display: grid; gap: 3px; }
.footer-col a { display: inline-flex; padding: 5px 0; font-size: 13.5px; color: rgba(226, 235, 250, .66); transition: color .16s ease; }
.footer-col a:hover { color: #fff; }
.footer-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.footer-tags span {
  font-size: 11.5px; padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
  color: rgba(226, 235, 250, .7);
}
.footer-bottom {
  margin-top: 34px; padding: 18px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 12.5px; color: rgba(226, 235, 250, .45);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 4px; }
.footer-bottom nav a { padding: 4px 10px; border-radius: var(--r-pill); }
.footer-bottom nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.footer-18 {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, .16); font-size: 11.5px; font-weight: 700; color: rgba(255, 255, 255, .8);
}

/* ---------- Nút lên đầu trang ---------- */
.to-top {
  position: fixed; right: 18px; bottom: 22px; z-index: 90;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--primary);
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 18px; height: 18px; }

/* ---------- Hoạt ảnh xuất hiện ---------- */
[data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Trang 404 ---------- */
.error-wrap { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 40px 0; }
.error-code {
  font-size: clamp(64px, 12vw, 120px); font-weight: 850; letter-spacing: -.05em; line-height: 1;
  background: linear-gradient(140deg, #2163e8, #7c5cff 60%, #12b981);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Thanh điều hướng đáy (mobile) ---------- */
.bottom-nav {
  display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 95;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 6px; box-shadow: 0 12px 30px -18px rgba(9, 30, 66, .5);
}
.bottom-nav__inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 0; border-radius: var(--r-pill);
  font-size: 10.5px; font-weight: 620; color: var(--muted);
}
.bottom-nav a svg { width: 19px; height: 19px; }
.bottom-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layout-2col { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .hero__panel { padding: 38px 32px 34px; }
}

@media (max-width: 900px) {
  .nav, .header-actions .btn { display: none; }
  .header-burger { display: inline-flex; }
  .hero__panel { grid-template-columns: 1fr; gap: 26px; }
  .hero__visual { max-width: 460px; }
  .hero__stat b { font-size: 17px; }
  .promo-grid, .news-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .section { padding: 42px 0; }
  .container { padding-inline: 16px; }
  .hero { padding-top: 16px; }
  .hero__panel { padding: 30px 22px 28px; border-radius: 20px; }
  .hero__stats { gap: 0; }
  .hero__stat { padding-right: 14px; }
  .hero__stat + .hero__stat { padding-left: 14px; }
  .game-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .promo-grid, .news-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .prose { padding: 20px 18px; }
  .cta-band { padding: 24px 20px; border-radius: 20px; }
  .site-footer { padding-top: 34px; padding-bottom: 100px; }
  .bottom-nav { display: block; }
  .to-top { bottom: 94px; }
  .tabs {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
    width: 100%; border-radius: 18px; overflow: visible;
  }
  .tabs button { height: 32px; padding: 0 6px; font-size: 12.5px; }
  .prose table { font-size: 13px; }
  .prose th, .prose td { padding: 9px 10px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head { padding-top: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .breadcrumb { font-size: 12px; }
}

@media (max-width: 420px) {
  .game-grid { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 auto; }
  .tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Hiệu ứng nút khối dẫn trang chủ ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__cta .btn {
    position: relative;
    overflow: hidden;
    animation: ae-in .55s cubic-bezier(.22, .7, .3, 1) backwards;
  }
  .hero__cta .btn:nth-child(2) { animation-delay: .16s; }

  @keyframes ae-in {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: none; }
  }

  /* vệt sáng chạy ngang như ánh đèn sân khấu */
  .hero__cta .btn::after {
    content: "";
    position: absolute;
    top: -70%;
    bottom: -70%;
    left: 0;
    width: 36%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .62), transparent);
    transform: translateX(-240%) skewX(-16deg);
    animation: ae-sweep 3.2s ease-in-out infinite;
    pointer-events: none;
  }
  .hero__cta .btn--light::after {
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .26), transparent);
    animation-delay: 1.3s;
  }
  .hero__cta .btn:hover::after { animation-duration: 1.8s; }

  @keyframes ae-sweep {
    0%, 30% { transform: translateX(-240%) skewX(-16deg); }
    72%, 100% { transform: translateX(560%) skewX(-16deg); }
  }

  /* nhịp tim: nút phồng nhẹ và quầng xanh lan rộng */
  .hero__cta .btn--primary {
    box-shadow: 0 8px 22px -12px rgba(33, 99, 232, .75);
    animation: ae-in .55s .06s cubic-bezier(.22, .7, .3, 1) backwards, ae-pulse 2.4s 1.1s ease-in-out infinite;
  }

  @keyframes ae-pulse {
    0%, 100% { scale: 1; box-shadow: 0 8px 22px -12px rgba(33, 99, 232, .75); }
    50% {
      scale: 1.035;
      box-shadow: 0 16px 42px -6px rgba(33, 99, 232, 1), 0 0 0 5px rgba(33, 99, 232, .14);
    }
  }
}
