/* ===== Hi88 · VŨ TRỤ GAME — Design System ===== */
/* Tokens */
:root {
  --bg: #0a0820;
  --bg2: #100e28;
  --surface: #16133a;
  --surface2: #1e1a48;
  --text: #e8e4f5;
  --text2: #a9a3c8;
  --muted: #6e6794;
  --cyan: #00e5ff;
  --magenta: #ff2d95;
  --lime: #a8ff60;
  --amber: #ffb830;
  --purple: #b465ff;
  --cyan-glow: 0 0 18px rgba(0,229,255,.25);
  --magenta-glow: 0 0 18px rgba(255,45,149,.25);
  --line: rgba(168,163,200,.1);
  --line2: rgba(168,163,200,.18);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 100px;
  --sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --dock-h: 58px;
  --shell: 1200px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 15px/1.65 var(--sans);
  color: var(--text);
  background:
    radial-gradient(1.2px 1.2px at 15% 20%, var(--cyan) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 35%, var(--magenta) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 50% 70%, var(--purple) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 85%, var(--lime) 0%, transparent 100%),
    radial-gradient(1.2px 1.2px at 75% 10%, var(--amber) 0%, transparent 100%),
    linear-gradient(175deg, var(--bg) 0%, var(--bg2) 100%);
  background-size: 400px 400px, 350px 350px, 500px 500px, 300px 300px, 450px 450px, 100% 100%;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,h6,p,ul,ol,figure { margin: 0; }
ul, ol { padding: 0; }
a { color: var(--cyan); text-decoration: none; transition: color .18s; }
a:hover { color: var(--magenta); }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
caption { text-align: left; font-size: 12px; color: var(--muted); padding: 8px 0; }

/* Skip link */
.skip-link {
  position: absolute; left: 8px; top: -50px; z-index: 999;
  padding: 8px 14px; border-radius: var(--r-sm);
  background: var(--cyan); color: var(--bg); font-weight: 700;
  transition: top .2s;
}
.skip-link:focus { top: 8px; }

/* Visually hidden */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Shell */
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 24px; }

/* Sections */
.sec { padding: 72px 0; }
.sec--tight { padding: 48px 0; }
.sec--panel { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Headings */
.head { margin-bottom: 36px; }
.head__kicker {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 8px; font-weight: 600;
}
.head__kicker span { white-space: nowrap; }
.head__kicker::after { content: ''; flex: 1; height: 1px; background: var(--line2); }
.head h2 {
  font-size: clamp(26px, 4vw, 42px); font-weight: 800;
  line-height: 1.15; letter-spacing: -.015em;
}
.head h2 em { font-style: normal; color: var(--cyan); }
.head p { margin-top: 10px; font-size: 14px; color: var(--text2); max-width: 62ch; line-height: 1.7; }
.head--center { text-align: center; }
.head--center .head__kicker { justify-content: center; }
.head--center p { margin-inline: auto; }
.head__action { margin-top: 16px; }

/* Eyebrow */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); font-weight: 600; margin-bottom: 12px;
}
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--cyan); border-radius: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 22px; border-radius: var(--r-pill);
  font: 600 13px var(--sans); border: 1.5px solid transparent;
  cursor: pointer; transition: transform .14s, box-shadow .18s, border-color .18s, background .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--cyan { background: var(--cyan); color: #0a0820; }
.btn--cyan:hover { box-shadow: var(--cyan-glow); color: #0a0820; }
.btn--magenta { background: var(--magenta); color: #fff; }
.btn--magenta:hover { box-shadow: var(--magenta-glow); color: #fff; }
.btn--ghost { border-color: var(--cyan); color: var(--cyan); background: transparent; }
.btn--ghost:hover { background: rgba(0,229,255,.08); }
.btn--sm { padding: 8px 16px; font-size: 12px; }
.btn--block { width: 100%; }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-pill);
  font: 600 11.5px var(--sans); color: var(--text2);
  border: 1px solid var(--line2); background: transparent;
  cursor: pointer; transition: border-color .18s, color .18s, background .18s;
}
.chip:hover { border-color: var(--cyan); color: var(--cyan); }
.chip[aria-pressed="true"] {
  background: rgba(0,229,255,.12); border-color: var(--cyan); color: var(--cyan);
}
.chip__dot {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto;
}

/* Badges */
.badge {
  display: inline-block; padding: 4px 10px; border-radius: var(--r-sm);
  font: 700 10px var(--sans); letter-spacing: .06em; text-transform: uppercase;
  background: rgba(0,229,255,.12); color: var(--cyan);
}
.badge--muted { background: var(--line); color: var(--muted); }

/* Tag list */
.tag-18 {
  display: inline-block; padding: 3px 8px; border-radius: 4px;
  border: 1px solid var(--amber); color: var(--amber);
  font: 700 10px var(--mono);
}

/* Grid helpers */
.stack { display: grid; gap: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.muted { color: var(--muted); }
.gold { color: var(--amber); }

/* ===== Ticker ===== */
.ticker {
  background: var(--bg2); border-bottom: 1px solid var(--line);
  padding: 6px 0; font-size: 11px; color: var(--muted);
}
.ticker__inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ticker__set { display: inline-flex; align-items: center; gap: 6px; }
.ticker__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); animation: pulse 2s infinite; }
.ticker__mid { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--cyan); }
.ticker a { color: var(--cyan); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ===== Header / Mast ===== */
.mast {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,8,32,.88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.mast__inner { display: flex; align-items: center; gap: 20px; }
.nav { display: flex; gap: 18px; font-size: 13px; font-weight: 500; }
.nav a { color: var(--text2); transition: color .18s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--cyan); }
.nav--l { flex: 0 0 auto; }
.nav--r { flex: 0 0 auto; }
.mast__right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -.02em;
}
.brand:hover { color: var(--cyan); }
.brand__seal {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  font: 700 12px var(--mono); color: #fff;
}
.brand__text { line-height: 1.1; }
.brand__text b { display: block; font-size: 16px; }
.brand__text i { font-style: normal; font-size: 9px; font-weight: 400; color: var(--muted); letter-spacing: .04em; }
.mast__pin {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--cyan); font-weight: 600;
  padding: 5px 10px; border: 1px solid rgba(0,229,255,.3); border-radius: var(--r-pill);
}
.mast__pin[hidden] { display: none; }

/* Burger */
.burger {
  display: none; border: 1px solid var(--line2); border-radius: var(--r-sm);
  background: transparent; color: var(--text); width: 38px; height: 38px;
  place-items: center; cursor: pointer;
}

/* ===== Full-screen mobile menu ===== */
.menu {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,8,32,.96); backdrop-filter: blur(20px);
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  padding: 40px;
}
.menu.is-open { display: flex; }
.menu__top { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 320px; }
.menu__close { background: none; border: 0; color: var(--text); cursor: pointer; width: 38px; height: 38px; display: grid; place-items: center; }
.menu__list { display: grid; gap: 18px; text-align: center; }
.menu__list a {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 600; color: var(--text);
}
.menu__list a:hover, .menu__list a[aria-current="page"] { color: var(--cyan); }
.menu__list a span { font-family: var(--mono); font-size: 12px; color: var(--muted); width: 20px; }
.menu__meta { margin-top: 20px; text-align: center; font-size: 11px; color: var(--muted); max-width: 280px; }

/* ===== Footer ===== */
.foot { padding: 64px 0 30px; border-top: 1px solid var(--line); margin-top: 48px; }
.foot__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 32px; }
.foot__about { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.7; max-width: 280px; }
.foot__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: 10px; color: var(--muted); }
.foot__col h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--cyan); margin-bottom: 14px; }
.foot__col ul { list-style: none; display: grid; gap: 8px; }
.foot__col a { font-size: 13px; color: var(--text2); }
.foot__col a:hover { color: var(--cyan); }
.foot__orn { text-align: center; color: var(--line2); font-size: 14px; margin: 28px 0; }
.foot__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.foot__bottom nav { display: flex; gap: 14px; }
.foot__bottom a { color: var(--muted); }
.foot__bottom a:hover { color: var(--cyan); }
.foot__legal { margin-top: 20px; font-size: 11px; color: var(--muted); line-height: 1.7; max-width: 700px; }

/* ===== Dock (mobile) ===== */
.dock {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 80; height: var(--dock-h);
  background: rgba(10,8,32,.92); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.dock a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 9px; color: var(--muted); transition: color .18s;
}
.dock a[aria-current="page"] { color: var(--cyan); }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: calc(var(--dock-h) + 16px); left: 50%; transform: translate(-50%, 20px);
  z-index: 300; padding: 10px 20px; border-radius: var(--r-pill);
  background: var(--surface2); border: 1px solid var(--cyan);
  font-size: 12.5px; color: var(--text); white-space: nowrap;
  opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
  box-shadow: var(--cyan-glow);
}
.toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ===== Forms ===== */
.field { display: grid; gap: 6px; }
.field > label { font: 600 10px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 42px; padding: 10px 13px;
  border: 1px solid var(--line2); border-radius: var(--r-sm);
  background: var(--bg); color: var(--text); font-size: 14px;
  transition: border-color .18s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--cyan); outline: none;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field select { appearance: none; cursor: pointer; }
.field__hint { font-size: 11px; color: var(--muted); line-height: 1.5; }
.check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12.5px; color: var(--text2); cursor: pointer; line-height: 1.5;
}
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--cyan); }
.form-status { display: none; font-size: 13px; color: var(--lime); margin-top: 8px; }
.form-status.is-visible { display: block; }

/* ===== Crumbs ===== */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-bottom: 16px; }
.crumb a { color: var(--text2); }
.crumb a:hover { color: var(--cyan); }
.crumb span[aria-current] { color: var(--muted); }

/* ===== Reveal ===== */
[data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ===== Frame ===== */
.frame {
  border: 1px solid var(--line2); border-radius: var(--r-lg);
  background: linear-gradient(170deg, var(--surface), var(--bg2));
  overflow: hidden;
}

/* ===== To-top ===== */
.to-top {
  position: fixed; bottom: calc(var(--dock-h) + 16px); right: 20px; z-index: 70;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line2); background: var(--surface);
  color: var(--cyan); display: grid; place-items: center;
  cursor: pointer; opacity: .7; transition: opacity .18s, transform .18s;
}
.to-top:hover { opacity: 1; transform: translateY(-2px); }

/* ===== Table base ===== */
.table-wrap { overflow-x: auto; }
.table { font-size: 13px; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan); font-weight: 600; }
.table td { color: var(--text2); }
.table tr:hover td { background: rgba(0,229,255,.03); }

/* ===== Link arrow ===== */
.link-arrow {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600; color: var(--cyan);
}
.link-arrow:hover { color: var(--magenta); gap: 8px; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 940px) {
  .nav--l, .nav--r { display: none; }
  .burger { display: grid; }
  .dock { display: flex; }
  .toast { bottom: calc(var(--dock-h) + 16px); }
  .to-top { bottom: calc(var(--dock-h) + 16px); }
  .foot { padding-bottom: calc(30px + var(--dock-h)); }
  .sec { padding: 48px 0; }
}
@media (max-width: 720px) {
  .shell { padding: 0 16px; }
  .head h2 { font-size: clamp(22px, 6vw, 34px); }
}
@media (max-width: 520px) {
  .foot__grid { grid-template-columns: 1fr; gap: 28px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
