/* Ngao Khi Anh Hung - giao dien web.
   Bo cuc: menu doc ben trai (dien thoai: thanh day), noi dung la cac khung giay co vien vang tren nen tranh co phong. */
:root {
  color-scheme: dark;
  --bg: #1d0a0d;
  --paper: #fcf4e2; --paper-2: #f3e4c4;
  --line: rgba(122, 74, 18, .2); --line-strong: rgba(122, 74, 18, .45);
  --gold: #b8862a; --gold-hi: #f2cd72; --gold-line: #c99a3e;
  --ink: #2b1310; --ink-2: #3f1c16;
  --ember: #b5231a;
  --text: #24130d; --muted: #6e5a48;
  --on-bg: #f6e4bd; --on-bg-muted: #cdb79c;
  --good: #1f8a4c; --warn: #b8740e; --bad: #b5231a;
  --kim: #b48a1c; --moc: #3f9a3a; --thuy: #1e7fc0; --hoa: #d6432a; --tho: #96652a;
  --f-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --f-body: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --f-ui: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --frame: 0 0 0 1px #6b3f0e, inset 0 0 0 4px rgba(252,244,226,.9), inset 0 0 0 5px rgba(201,154,62,.55), 0 16px 34px -14px rgba(0,0,0,.7);
  --parch: linear-gradient(180deg, #fdf7e8, #f3e3c3);
  --wood: linear-gradient(180deg, #3d100d, #1d0806);
  --redbtn: linear-gradient(180deg, #a32317, #5e0f0a);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--text); font: 15px/1.6 var(--f-body);
  background:
    radial-gradient(45% 14% at 62% 0%, rgba(255,96,30,.32), transparent 70%),
    radial-gradient(90% 32% at 50% 100%, rgba(236,214,226,.28), transparent 72%),
    linear-gradient(180deg, #160608 0%, #2a0d11 38%, #43242c 78%, #5f4a55 100%) fixed;
  background-color: var(--bg);
  min-height: 100vh;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: #160608; }
img { max-width: 100%; }
a { color: var(--ember); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
[hidden] { display: none !important; }
.num { font-family: var(--f-ui); font-variant-numeric: tabular-nums; }
.ui { font-family: var(--f-ui); letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }

/* Tranh nen hai ben */
.art { position: fixed; top: 0; height: 100vh; z-index: 0; background-size: cover; background-repeat: no-repeat; pointer-events: none; }
.art-l { left: 0; width: 31vh; background-image: url(img/bg_left.jpg); background-position: left center; -webkit-mask-image: linear-gradient(90deg, #000 58%, transparent); mask-image: linear-gradient(90deg, #000 58%, transparent); }
.art-r { right: 0; width: 24.5vh; background-image: url(img/bg_right.jpg); background-position: right center; -webkit-mask-image: linear-gradient(270deg, #000 58%, transparent); mask-image: linear-gradient(270deg, #000 58%, transparent); }

/* Khung trang */
.shell {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 24px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 16px 60px; max-width: 1320px; margin: 0 auto;
}
.main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* Menu */
.rail {
  position: sticky; top: calc(16px + env(safe-area-inset-top, 0px)); align-self: start;
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding-block: 16px;
  background: var(--wood); border: 2px solid var(--gold-line); border-radius: 4px;
  box-shadow: 0 0 0 1px #4a2207, inset 0 0 0 3px rgba(242,205,114,.18), 0 14px 30px -10px rgba(0,0,0,.7);
}
.rail::after { content: ""; position: absolute; left: 50%; bottom: -46px; width: 10px; height: 44px; transform: translateX(-50%); background: linear-gradient(90deg, transparent 4px, var(--gold-line) 4px 6px, transparent 6px) top / 100% 16px no-repeat, linear-gradient(180deg, #c42a1c, #7a120c) bottom / 10px 28px no-repeat; border-radius: 0 0 4px 4px; }
.emblem { width: 48px; height: 48px; margin-bottom: 12px; display: block; }
.nav-btn {
  width: 68px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; border-radius: 3px; color: #a7a39b; text-decoration: none;
  font: 600 11px/1.2 var(--f-ui); letter-spacing: .03em; text-align: center;
}
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn:hover { color: #f1ece2; }
.nav-btn[aria-current="page"] { color: var(--gold-hi); background: var(--redbtn); box-shadow: inset 0 0 0 1px rgba(242,205,114,.35); }
.nav-sep { width: 36px; height: 1px; background: rgba(241,236,226,.15); margin-block: 10px 8px; }

/* Thanh tren */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; text-decoration: none; }
.brand b { font: italic 800 32px/1 var(--f-display); text-transform: uppercase; letter-spacing: .01em; background: linear-gradient(180deg, #fff3c2 0%, #f0c056 52%, #a8661c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #2a0d0b); }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-chip { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--gold-line); padding: 5px 14px 5px 5px; color: var(--text); text-decoration: none; box-shadow: 0 6px 16px -8px rgba(0,0,0,.6); }
.user-chip small { color: var(--muted); }
.user-chip { padding: 8px 16px 8px 12px; font-weight: 600; } .user-chip svg { width: 18px; height: 18px; flex: none; color: var(--gold); }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; font: 700 13px/1 var(--f-ui); background: var(--paper-2); box-shadow: inset 0 0 0 2px var(--c, var(--gold)); color: var(--c, var(--gold)); flex: none; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }

/* Thong bao */
.toast { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); top: calc(16px + env(safe-area-inset-top, 0px)); width: min(560px, calc(100% - 32px)); display: flex; gap: 12px; align-items: flex-start; background: var(--ink); border-left: 4px solid var(--gold-hi); color: #f1ece2; padding: 14px 16px; font-size: 14px; box-shadow: 0 16px 40px -16px rgba(0,0,0,.6); }
.toast.error { border-left-color: #ff7a5c; }
.toast b { display: block; color: var(--gold-hi); font: 700 12px var(--f-ui); letter-spacing: .06em; text-transform: uppercase; }
.toast.error b { color: #ffb19f; }
.toast span { flex: 1; }
.toast button { border: 0; background: transparent; color: #a7a39b; font-size: 20px; line-height: 1; padding: 0 4px; }

/* Khung giay co */
.panel, .card { position: relative; background: var(--parch); border: 2px solid var(--gold-line); border-radius: 3px; padding: 20px; box-shadow: var(--frame); color: var(--text); }
.panel::after, .card::after {
  content: ""; position: absolute; inset: 9px; pointer-events: none;
  background:
    linear-gradient(var(--gold-line), var(--gold-line)) top left / 18px 2px, linear-gradient(var(--gold-line), var(--gold-line)) top left / 2px 18px,
    linear-gradient(var(--gold-line), var(--gold-line)) top right / 18px 2px, linear-gradient(var(--gold-line), var(--gold-line)) top right / 2px 18px,
    linear-gradient(var(--gold-line), var(--gold-line)) bottom left / 18px 2px, linear-gradient(var(--gold-line), var(--gold-line)) bottom left / 2px 18px,
    linear-gradient(var(--gold-line), var(--gold-line)) bottom right / 18px 2px, linear-gradient(var(--gold-line), var(--gold-line)) bottom right / 2px 18px;
  background-repeat: no-repeat;
}
.panel > *, .card > * { position: relative; z-index: 1; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-h h2, .card > h2, .page-title h1, .auth-intro h2 { font: italic 800 26px/1.05 var(--f-display); text-transform: uppercase; color: var(--ink); letter-spacing: .01em; display: flex; align-items: center; gap: 10px; }
.panel-h h2::before, .card > h2::before { content: ""; width: 6px; height: .9em; background: var(--ember); transform: skewX(-14deg); flex: none; }
.card > h2 { margin-bottom: 14px; }
.panel-h .ui { color: var(--muted); }
.link { background: none; border: 0; color: var(--ember); font: 600 13px var(--f-ui); letter-spacing: .04em; padding: 0; text-transform: uppercase; text-decoration: none; }
.link:hover { color: var(--ink); }
.page-title { display: flex; flex-direction: column; gap: 6px; }
.page-title h1 { font-size: 48px; color: var(--on-bg); text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.page-title p { margin: 0; color: var(--on-bg-muted); }
.page-title .link { color: var(--gold-hi); align-self: flex-start; }

/* Nut */
.btn, .game-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: 700 14px/1.1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
.btn:hover, .game-btn:hover { background: var(--ink); color: var(--gold-hi); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.play { background: var(--wood); border-color: var(--gold-line); color: var(--gold-hi); padding: 15px 32px; font-size: 16px; box-shadow: 0 0 0 1px rgba(242,205,114,.3), 0 10px 22px -10px rgba(0,0,0,.6); }
.btn.play:hover { background: linear-gradient(180deg, #b3261a, #7d130d); color: #fff4d0; }
.btn.small { padding: 8px 16px; font-size: 12px; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 14px; }
.btn.play.zalo { background: linear-gradient(180deg, #1a7cff, #0450c4); border-color: #9cc8ff; color: #fff; box-shadow: 0 0 0 1px rgba(156,200,255,.35), 0 10px 22px -10px rgba(0,40,120,.7); }
.btn.play.zalo:hover { background: linear-gradient(180deg, #3b91ff, #0a5fe0); color: #fff; }
.btn.play.zalo.soon { cursor: default; filter: saturate(.55); opacity: .85; }
.btn.play.zalo.soon:hover { background: linear-gradient(180deg, #1a7cff, #0450c4); }
.btn.play.zalo small { margin-left: 2px; padding: 2px 6px; border-radius: 3px; background: rgba(255,255,255,.18); font-size: 10px; letter-spacing: .04em; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.pill { display: inline-block; font: 700 10px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; margin-bottom: 6px; background: var(--gold); color: #fff; transform: skewX(-12deg); }
.pill.upd { background: var(--thuy); }
.pill.ev { background: var(--ember); }

/* Trang chu: hero */
.hero { position: relative; overflow: hidden; border: 2px solid var(--gold-line); border-radius: 3px; background: linear-gradient(115deg, #fdf7e8 0%, #f6e8ca 60%, #efd9ad 100%); box-shadow: var(--frame); }
.hero::before { content: ""; position: absolute; right: -12%; bottom: -30%; width: 26%; height: 140%; background: linear-gradient(180deg, #b3261a, #7d130d); transform: skewX(-18deg); }
.hero::after { content: ""; position: absolute; right: 17%; bottom: -30%; width: 2%; height: 140%; background: linear-gradient(180deg, #f2cd72, #b8862a); transform: skewX(-18deg); }
.hero canvas.fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero-in { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; padding: 36px clamp(20px, 4vw, 52px); align-items: center; }
.hero-left { display: flex; flex-direction: column; align-items: center; text-align: center; }
.eyebrow { color: var(--ember); font-weight: 600; }
.hero h1.logo { margin: 8px 0 0; line-height: 0; width: 100%; }
.hero h1.logo img { display: block; width: min(100%, 660px); height: auto; margin: 0 auto; }
.hero-left p { max-width: 44ch; color: var(--ink-2); margin: 14px auto 18px; font-weight: 500; }
.keyart { position: relative; z-index: 2; margin: 0; }
.ka-frame { position: relative; overflow: hidden; aspect-ratio: 746 / 544; max-width: 100%; border: 3px solid #e9b64a; border-radius: 6px; background: #1a0c08; box-shadow: 0 0 0 1px #6b3a0a, 0 0 0 5px rgba(233,182,74,.35), 0 0 34px -4px rgba(255,110,20,.75), 0 22px 44px -18px rgba(90,20,0,.7); }
.ka-frame::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(255,214,130,.55); border-radius: 3px; pointer-events: none; z-index: 5; }
.ka-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 62% 38%; animation: kaZoom 16s ease-in-out infinite alternate; }
@keyframes kaZoom { from { transform: scale(1.02); } to { transform: scale(1.09) translate(-1.2%, .8%); } }
.ka-dragon { position: absolute; left: 62%; top: 4%; width: 40%; height: 46%; background: radial-gradient(closest-side, rgba(255,190,70,.55), rgba(255,90,20,.18) 60%, transparent); mix-blend-mode: screen; animation: kaBreath 3.4s ease-in-out infinite; }
@keyframes kaBreath { 0%, 100% { opacity: .35; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.06); } }
.ka-glow { position: absolute; inset: 0; background: radial-gradient(70% 38% at 50% 104%, rgba(255,120,20,.7), transparent 70%), radial-gradient(40% 30% at 10% 70%, rgba(255,80,20,.35), transparent 70%); mix-blend-mode: screen; animation: kaFlick 1.8s steps(6) infinite alternate; }
@keyframes kaFlick { 0% { opacity: .55; } 30% { opacity: .9; } 55% { opacity: .65; } 80% { opacity: 1; } 100% { opacity: .7; } }
.ka-sweep { position: absolute; inset: -20% -60%; background: linear-gradient(105deg, transparent 44%, rgba(255,236,170,.38) 50%, transparent 56%); mix-blend-mode: screen; animation: kaSweep 6.5s ease-in-out infinite; }
@keyframes kaSweep { 0%, 55% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
.ka-embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ka-c { position: absolute; width: 26px; height: 26px; z-index: 6; border: 3px solid #f3cd6c; filter: drop-shadow(0 0 4px rgba(255,150,40,.8)); }
.ka-c.tl { top: 3px; left: 3px; border-right: 0; border-bottom: 0; }
.ka-c.tr { top: 3px; right: 3px; border-left: 0; border-bottom: 0; }
.ka-c.bl { bottom: 3px; left: 3px; border-right: 0; border-top: 0; }
.ka-c.br { bottom: 3px; right: 3px; border-left: 0; border-top: 0; }

/* Trang chu: tin moi + top level */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.news { display: flex; flex-direction: column; }
.news-item { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; padding-block: 14px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.news-item:first-child { border-top: 0; padding-top: 0; }
.news-item:hover h3 { color: var(--ember); }
.news-date { text-align: center; background: var(--wood); padding: 8px 4px; align-self: start; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); }
.news-date b { display: block; font: 700 24px/1 var(--f-ui); color: var(--gold-hi); }
.news-date small { font: 600 11px var(--f-ui); color: #a7a39b; letter-spacing: .06em; }
.news-item h3 { font: 700 16px/1.35 var(--f-body); }
.news-item p { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 65ch; }
.empty { text-align: center; color: var(--muted); padding: 22px; }
.mini-top { display: flex; flex-direction: column; gap: 8px; }
.mini-row { display: grid; grid-template-columns: 26px 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
/* Hinh nhan vat that thay o chu cai: khung san khau nho vien vang, nhan vat dung giua, ve pixel net */
.char-av { position: relative; flex: none; display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
  border: 1.5px solid var(--gold-line); border-radius: 6px; background: radial-gradient(70% 55% at 50% 88%, rgba(255,190,90,.45), transparent 70%), linear-gradient(180deg, #4a1712, #1f0907);
  box-shadow: inset 0 0 0 1px rgba(242,205,114,.25), 0 4px 10px -6px rgba(0,0,0,.6); }
.char-av img { display: block; width: auto; max-width: none; image-rendering: pixelated; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.char-av-sm { width: 44px; height: 50px; } .char-av-sm img { max-height: 46px; margin-bottom: 1px; }
.char-av-md { width: 34px; height: 34px; border-radius: 50%; align-items: flex-start; } .char-av-md img { height: 58px; margin-top: 1px; }
.char-av-lg { width: 84px; height: 96px; border-width: 2px; border-radius: 10px; } .char-av-lg img { max-height: 88px; margin-bottom: 3px; }
.char-av.none { display: none; }
.mini-row .char-av.none { display: block; visibility: hidden; }
.mini-row .rk { font: italic 800 20px var(--f-display); color: var(--muted); text-align: center; }
.mini-row:first-child .rk { color: var(--ember); }
.mini-row .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.mini-row .name small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.mini-row .lv { font-family: var(--f-ui); color: var(--gold); font-weight: 700; }

/* Bang xep hang */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 8px 6px; scrollbar-width: thin; }
.tab { flex: none; border: 2px solid var(--gold-line); background: var(--paper); color: var(--ink); padding: 9px 16px; font: 700 13px/1 var(--f-ui); letter-spacing: .05em; text-transform: uppercase; transform: skewX(-12deg); text-decoration: none; }
.tab:hover { background: var(--paper-2); }
.tab[aria-current="page"] { background: var(--redbtn); color: var(--gold-hi); border-color: var(--gold-hi); }
.rank-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rank-tools h1 { font: italic 800 44px/1 var(--f-display); text-transform: uppercase; color: var(--on-bg); text-shadow: 0 2px 0 rgba(0,0,0,.4); display: flex; align-items: center; gap: 10px; }
.rank-tools h1::before { content: ""; width: 6px; height: .9em; background: var(--ember); transform: skewX(-14deg); }
.search { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 2px solid var(--gold-line); padding: 0 12px; min-width: 0; width: min(290px, 100%); }
.search input { border: 0; background: transparent; padding: 10px 0; width: 100%; outline: none; color: var(--text); }
.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; padding-top: 6px; }
.pod { position: relative; text-align: center; background: var(--parch); border: 2px solid var(--gold-line); padding: 26px 12px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%); min-width: 0; }
.pod.p1 { padding-block: 38px 24px; background: radial-gradient(90% 70% at 50% 0%, rgba(242,205,114,.25), transparent 70%), var(--wood); border-color: var(--gold-hi); color: #f1ece2; }
.pod.empty-pod { opacity: .55; }
.pod .medal { font: italic 800 34px/1 var(--f-display); position: absolute; top: 8px; left: 12px; color: var(--muted); }
.p1 .medal { color: var(--gold-hi); font-size: 44px; }
.p2 .medal { color: #8c8f98; }
.p3 .medal { color: #a5683b; }
.pod .avatar { width: 58px; height: 58px; font-size: 20px; box-shadow: inset 0 0 0 3px var(--c, var(--gold)); }
.p1 .avatar { width: 74px; height: 74px; font-size: 26px; background: var(--ink-2); --c: var(--gold-hi); }
.pod-char { display: flex; align-items: flex-end; justify-content: center; height: 150px; width: 100%; position: relative; }
.pod-char::after { content: ""; position: absolute; bottom: -4px; left: 50%; width: 90px; height: 14px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(0,0,0,.35), transparent); z-index: 0; }
.pod-char img { position: relative; z-index: 1; max-height: 150px; width: auto; image-rendering: pixelated; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.p1 .pod-char { height: 190px; }
.p1 .pod-char img { max-height: 190px; filter: drop-shadow(0 0 14px rgba(255,200,80,.55)); }
.p1 .pod-char::after { background: radial-gradient(closest-side, rgba(255,190,60,.45), transparent); }
.pod-char.none { height: 40px; }
.row-char { display: inline-flex; align-items: flex-end; justify-content: center; width: 40px; height: 48px; flex: none; }
.row-char img { max-height: 48px; width: auto; image-rendering: pixelated; }
.pod .pname { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .pval { font: 700 22px/1 var(--f-ui); color: var(--ember); font-variant-numeric: tabular-nums; }
.p1 .pval { color: var(--gold-hi); font-size: 26px; }
.pod small { color: var(--muted); font-size: 12px; }
.p1 small { color: #a7a39b; }
.table-wrap { overflow-x: auto; }
table.nka { width: 100%; border-collapse: collapse; min-width: 480px; }
table.nka th { text-align: left; font: 700 11px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--ink); }
table.nka td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.nka td.rk { font: italic 800 18px var(--f-display); color: var(--muted); width: 56px; }
table.nka tbody tr:hover td { background: #fbf6ea; }
table.nka .r { text-align: right; }
table.nka .who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
table.nka .reward { color: var(--muted); font-size: 13px; }
.rank-note { color: var(--on-bg-muted); font-size: 13px; margin: 0; }

/* Tai khoan */
.seg-row { display: flex; justify-content: flex-end; }
.acc-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.acc-head .avatar { width: 64px; height: 64px; font-size: 24px; }
.acc-head h2 { font: italic 800 38px/1 var(--f-display); text-transform: uppercase; color: var(--ink); }
.acc-head small { color: var(--muted); }
.acc-head .btn { margin-left: auto; }
.wallet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.action.action-main { grid-column: 1 / -1; background: radial-gradient(120% 140% at 0% 0%, #c43a1c, #8a1a0e 55%, #5c0e08); border-color: #ffd36b; color: #fff1c4; }
.action.action-main small { color: #ffd98a; }
.action.action-main svg { color: #ffd36b; }
.stat { background: var(--paper-2); padding: 10px 12px; border-left: 3px solid var(--gold); }
.stat b { display: block; font: 700 22px/1.1 var(--f-ui); color: var(--ink); font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 12px; }
.acc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.action { display: flex; gap: 12px; align-items: flex-start; background: var(--parch); border: 1px solid var(--gold-line); padding: 14px; color: var(--text); text-decoration: none; }
.action:hover { border-color: var(--ember); box-shadow: 0 0 0 1px var(--gold-hi), 0 8px 18px -10px rgba(0,0,0,.6); }
.action svg { width: 22px; height: 22px; color: var(--ember); flex: none; margin-top: 2px; }
.action b { display: block; font-weight: 700; }
.action small { color: var(--muted); font-size: 13px; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.st-on { color: var(--bad); } .st-off { color: var(--good); }
.milestones { position: relative; margin: 26px 10px 8px; height: 8px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.milestones .fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--ember), var(--gold-hi)); }
.ms { position: absolute; top: 50%; width: 16px; height: 16px; background: var(--paper); border: 2px solid var(--line-strong); transform: translate(-50%, -50%) rotate(45deg); }
.ms.got { background: var(--ink); border-color: var(--gold-hi); }
.ms span { position: absolute; top: 22px; left: 50%; transform: translateX(-50%) rotate(-45deg) translate(6px, 2px); font: 600 11px var(--f-ui); color: var(--muted); white-space: nowrap; }
.ms-note { margin: 34px 0 0; color: var(--muted); font-size: 14px; }
.ms-note b { color: var(--ember); }

/* Dang nhap / dang ky */
.auth-wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; align-items: start; padding: 8px; }
.auth-intro h2 { font-size: 40px; margin-bottom: 12px; }
.auth-intro p { margin: 0 0 14px; color: var(--ink-2); max-width: 46ch; }
.auth-intro ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.auth-intro li { display: flex; gap: 10px; align-items: baseline; }
.auth-intro li::before { content: ""; width: 8px; height: 8px; flex: none; background: var(--ember); transform: rotate(45deg) translateY(-1px); }
.auth-card { background: rgba(255,255,255,.45); border: 1px solid var(--gold-line); padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.auth-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid var(--gold-line); }
.auth-tabs button { border: 0; background: transparent; padding: 11px 6px; font: 700 13px/1.2 var(--f-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.auth-tabs button:hover { color: var(--ink); }
.auth-tabs button[aria-selected="true"] { background: var(--redbtn); color: var(--gold-hi); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form .btn.play { margin-top: 4px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { color: var(--muted); font-size: 13px; font-weight: 500; }
.field input, .field select, .field textarea { background: var(--paper); border: 2px solid var(--line-strong); padding: 10px 12px; outline: none; color: var(--text); width: 100%; }
.field input:focus, .field select:focus { border-color: var(--ink); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.check input { width: 16px; height: 16px; accent-color: var(--ember); }
.auth-alt { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.auth-alt .link { text-transform: none; letter-spacing: 0; font-size: 14px; }
.auth-hint { margin: 0; font-size: 14px; color: var(--ink-2); }
.captcha { display: flex; gap: 8px; align-items: center; }
.captcha img { height: 48px; width: 170px; flex: none; object-fit: cover; border: 1px solid var(--line-strong); background: var(--paper-2); }
.captcha input { flex: 1; min-width: 0; }
.cap-re { width: 48px; height: 48px; flex: none; border: 1px solid var(--line-strong); background: var(--paper); font-size: 20px; color: var(--ink); }
.cap-re:hover { border-color: var(--ember); }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; opacity: 0 !important; }

/* Tai game */
.dl-steps ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.dl-steps li { counter-increment: s; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; }
.dl-steps li::before { content: counter(s); grid-row: span 2; width: 40px; height: 40px; display: grid; place-items: center; font: italic 800 24px/1 var(--f-display); color: var(--gold-hi); background: var(--redbtn); border: 1px solid var(--gold-line); }
.dl-steps li b { font-weight: 700; }
.dl-steps li span { color: var(--muted); font-size: 14px; }
.dl-list { display: flex; flex-direction: column; }
.dl-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); }
.dl-row:first-child { border-top: 0; }
.dl-ic { width: 44px; height: 44px; display: grid; place-items: center; font: 700 11px/1 var(--f-ui); letter-spacing: .04em; color: var(--gold-hi); background: var(--wood); border: 1px solid var(--gold-line); }
.dl-ic.apk { background: linear-gradient(180deg, #2f6b2c, #163a14); }
.dl-name b { display: block; font-weight: 700; }
.dl-name small { color: var(--muted); font-family: var(--f-ui); font-size: 12px; }
.dl-tag { display: inline-block; margin-left: 8px; font: 700 10px/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; padding: 4px 6px; background: var(--ember); color: #fff; vertical-align: 2px; }
.dl-size { color: var(--muted); font-family: var(--f-ui); font-size: 13px; white-space: nowrap; }
.dl-soon { font: 700 11px var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; border: 1px dashed var(--line-strong); }
.dl-ios { display: flex; gap: 14px; align-items: flex-start; }
.dl-ios svg { width: 26px; height: 26px; color: var(--ember); flex: none; }
.dl-ios b { display: block; }
.dl-ios span { color: var(--muted); font-size: 14px; }

/* ===== Nap tien (ban demo da chot 08/11) ===== */
.np { position: relative; max-width: 980px; width: 100%; margin: 0 auto; }
.np-hero { position: relative; height: 250px; border: 3px solid #d9a440; border-bottom: 0; border-radius: 8px 8px 0 0; overflow: hidden; box-shadow: 0 0 0 2px #6b3a0a, 0 0 40px -8px rgba(255,120,20,.6); }
.np-hero-img { position: absolute; inset: -10px; background: url(img/keyart.jpg) center 28% / cover; animation: npDrift 18s ease-in-out infinite alternate; }
@keyframes npDrift { from { transform: scale(1.04); } to { transform: scale(1.12) translate(-2%, 1%); } }
.np-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,6,8,.25) 0%, transparent 35%, rgba(60,10,6,.35) 70%, #fbf1dc 100%); }
.np-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.np-tag { position: absolute; z-index: 3; top: 16px; left: 18px; font: italic 800 26px/1 var(--f-display); text-transform: uppercase; color: var(--gold-hi); background: linear-gradient(180deg, #b3261a, #6b0f08); border: 2px solid var(--gold-line); padding: 7px 26px 7px 18px; clip-path: polygon(0 0, 100% 0, 90% 50%, 100% 100%, 0 100%); text-shadow: 0 2px 0 #3a0806; }
.np-frame { position: relative; margin-top: -2px; padding: 0 clamp(16px, 4vw, 44px) 34px; border: 3px solid #d9a440; border-top: 0; border-radius: 0 0 8px 8px; color: var(--text);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 220' preserveAspectRatio='none'%3E%3Cpath d='M0 220 L0 150 L60 120 L110 140 L180 80 L240 130 L300 100 L360 140 L430 70 L500 125 L560 95 L630 135 L700 85 L760 120 L800 105 L800 220Z' fill='%237a4a20' fill-opacity='.07'/%3E%3Cpath d='M0 220 L0 180 L90 150 L150 170 L230 130 L320 175 L400 140 L480 180 L560 150 L650 178 L720 150 L800 170 L800 220Z' fill='%237a4a20' fill-opacity='.08'/%3E%3C/svg%3E") bottom / 100% 240px no-repeat,
    radial-gradient(120% 60% at 50% 0%, #fdf6e4 0%, transparent 60%),
    repeating-radial-gradient(circle at 30% 40%, rgba(122,74,18,.018) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #fbf1dc 0%, #f1dfba 100%);
  box-shadow: 0 0 0 2px #6b3a0a, 0 0 40px -8px rgba(255,120,20,.55), 0 26px 50px -20px rgba(0,0,0,.85); }
.np-ribbon { position: relative; z-index: 5; width: min(600px, 100%); margin: -46px auto 0; text-align: center; }
.np-ribbon h1 { position: relative; margin: 0; padding: 16px 50px; font: italic 800 clamp(26px, 4.4vw, 42px)/1.1 "Playfair Display", Georgia, serif; color: transparent; background: linear-gradient(180deg, #fff6cf 0%, #f6cf62 55%, #c98a22 100%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 2px 0 #4a0a05); }
.np-ribbon::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #d0331f 0%, #8c160f 55%, #5e0d08 100%); clip-path: polygon(0 50%, 6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%); }
.np-ribbon::after { content: ""; position: absolute; inset: -6px -14px; z-index: -2; background: linear-gradient(180deg, #ffe08a, #9a6414); clip-path: polygon(0 50%, 6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%); }
.np-shine { position: absolute; inset: 0; z-index: 0; clip-path: polygon(0 50%, 6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%); overflow: hidden; }
.np-shine::before { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; left: -40%; background: linear-gradient(105deg, transparent, rgba(255,240,190,.45), transparent); animation: npSweep 4.5s ease-in-out infinite; }
@keyframes npSweep { 0%, 60% { left: -40%; } 100% { left: 120%; } }
.np-event { text-align: center; margin: 18px auto 0; padding: 10px 14px; border: 2px solid var(--ember); background: rgba(181,35,26,.08); color: var(--ember); font-weight: 700; }
.np-moc { margin: 22px 0 30px; padding: 18px 22px 20px; border-radius: 8px; background: radial-gradient(90% 140% at 0% 0%, rgba(255,180,60,.18), transparent 60%), linear-gradient(180deg, #2f0d09, #1a0605); border: 2px solid var(--gold-line); box-shadow: inset 0 0 0 1px rgba(255,211,107,.25), 0 14px 26px -16px rgba(0,0,0,.8); color: #f1ece2; }
.np-moc-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.np-lbl { font: 700 12px/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: #cdb79c; }
.np-moc-sum { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.np-moc-sum b { font: 800 36px/1 var(--f-ui); color: #ffd36b; text-shadow: 0 0 16px rgba(255,190,60,.45); font-variant-numeric: tabular-nums; }
.np-moc-sum span { font: 600 16px var(--f-ui); color: #cdb79c; }
.np-moc-next { font-size: 14px; color: #e8d6b8; text-align: right; }
.np-moc-next b { color: #ffd36b; }
.np-bar { position: relative; height: 12px; margin: 0 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,211,107,.3); border-radius: 99px; }
.np-fill, .np-pre { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 99px; }
.np-fill { background: linear-gradient(90deg, #b5231a, #f08a2a, #ffd36b); box-shadow: 0 0 12px rgba(255,160,40,.7); z-index: 1; }
.np-pre { background: repeating-linear-gradient(135deg, rgba(255,211,107,.55) 0 6px, rgba(255,211,107,.2) 6px 12px); transition: width .3s; }
.np-ms { position: absolute; top: 50%; z-index: 2; width: 20px; height: 20px; transform: translate(-50%, -50%) rotate(45deg); background: #2f0d09; border: 2px solid rgba(255,211,107,.5); }
.np-ms.got { background: #ffd36b; border-color: #fff4c8; box-shadow: 0 0 12px rgba(255,200,80,.9); }
.np-ms.soon { border-color: #ffd36b; animation: npTw 1.6s ease-in-out infinite; }
@keyframes npTw { 50% { box-shadow: 0 0 14px rgba(255,200,80,.9); } }
.np-mlabels { position: relative; height: 18px; margin: 14px 10px 0; }
.np-mlabels span { position: absolute; transform: translateX(-50%); font: 700 12px/1 var(--f-ui); color: #a99580; white-space: nowrap; }
.np-mlabels span.got { color: #ffd36b; }
.np-mlabels span:last-child { transform: translateX(-100%); }
.np-step { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.np-step-h { display: flex; align-items: center; gap: 12px; }
.np-step-n { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font: 800 18px/1 var(--f-ui); color: #fff1c4; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: radial-gradient(circle, #c22a1d 0 50%, #ffd36b 52% 60%, #6b0f08 62%); }
.np-step-h h2 { margin: 0; font: italic 800 24px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; color: #5a1408; }
.np-step-h::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, rgba(201,154,62,.6), transparent); order: 2; }
.np-step-h .np-hint { order: 3; font-size: 13px; color: var(--muted); }
.np-method { position: relative; overflow: hidden; display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 14px; padding: 16px 18px; border: 2px solid #ffd36b; border-radius: 6px; background: radial-gradient(120% 140% at 20% 0%, #d8442a, #9a1a12 50%, #5c0d08); box-shadow: 0 0 0 2px #7a1a08, 0 0 22px rgba(255,170,40,.75), inset 0 0 14px rgba(255,200,90,.35); }
.np-method svg { width: 96px; height: 70px; filter: drop-shadow(0 6px 6px rgba(80,40,0,.3)); }
.np-method b { display: block; font: 800 22px/1.15 var(--f-body); color: #fff1c4; }
.np-method small { display: block; margin-top: 4px; font: 600 13px/1.3 var(--f-ui); color: #ffd98a; }
.np-check { position: absolute; top: 10px; right: 12px; width: 26px; height: 26px; border-radius: 50%; background: #ffd36b; display: grid; place-items: center; }
.np-check::after { content: ""; width: 10px; height: 6px; border-left: 3px solid #6b0f08; border-bottom: 3px solid #6b0f08; transform: rotate(-45deg) translate(1px, -1px); }
.np-method::after { content: ""; position: absolute; top: 0; bottom: 0; width: 35%; left: -45%; background: linear-gradient(105deg, transparent, rgba(255,230,160,.35), transparent); animation: npSweep 3.2s ease-in-out infinite; }
.np-spark { position: absolute; width: 6px; height: 6px; background: #fff6cf; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: npTwk 2.4s ease-in-out infinite; }
.np-spark.s1 { left: 30px; top: 18px; } .np-spark.s2 { left: 92px; top: 30px; animation-delay: .8s; } .np-spark.s3 { left: 60px; bottom: 16px; animation-delay: 1.5s; }
@keyframes npTwk { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1.4); } }
.np-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.np-amt { position: relative; padding: 14px 10px 12px; border: 2px solid #4a0f08; border-radius: 6px; background: linear-gradient(180deg, #7d1a10, #4a0b06); color: #ffe9a6; text-align: center; box-shadow: inset 0 1px 0 rgba(255,200,120,.35), 0 4px 0 #2a0503; transition: transform .12s, filter .15s; }
.np-amt:hover { filter: brightness(1.15); transform: translateY(-1px); }
.np-amt b { display: block; font: 800 26px/1 var(--f-ui); }
.np-amt small { display: block; margin-top: 6px; font: 600 12px/1 var(--f-ui); color: #e6b98a; }
.np-amt[aria-pressed="true"] { background: radial-gradient(120% 140% at 50% 0%, #e0622a, #a3231a 55%, #6b0f08); color: #fff4c8; box-shadow: inset 0 0 0 2px #ffd36b, 0 0 18px rgba(255,170,40,.85); }
.np-amt[aria-pressed="true"] small { color: #ffe29a; }
.np-hot { position: absolute; top: -9px; right: 8px; font: 700 10px/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: #3a0d08; background: #ffd36b; padding: 4px 6px; }
.np-custom { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.np-custom label { font-weight: 600; color: var(--muted); }
.np-stepper { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; border: 3px solid #c99a3e; border-radius: 6px; box-shadow: 0 0 0 2px #6b3a0a; overflow: hidden; background: linear-gradient(180deg, #fffaf0, #f6e6c4); }
.np-stepper button { border: 0; background: linear-gradient(180deg, #7d1a10, #4a0b06); color: #ffe9a6; font: 800 24px/1 var(--f-ui); }
.np-stepper button:hover { filter: brightness(1.2); }
.np-stepper input { min-width: 0; height: 56px; border: 0; background: transparent; text-align: center; font: 800 28px/1 var(--f-ui); color: #3a0d08; outline: none; -moz-appearance: textfield; }
.np-stepper input::-webkit-inner-spin-button, .np-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }
.np-vnd { font: 700 16px var(--f-ui); color: var(--ink); }
.np-err { margin: 0; color: var(--ember); font-weight: 600; font-size: 14px; }
.np-receipt { position: relative; display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px 22px; border-radius: 8px; background: radial-gradient(90% 140% at 0% 50%, rgba(255,180,60,.22), transparent 60%), linear-gradient(180deg, #2f0d09, #1a0605); border: 2px solid var(--gold-line); box-shadow: inset 0 0 0 1px rgba(255,211,107,.25), 0 14px 26px -16px rgba(0,0,0,.8); color: #f1ece2; }
.np-receipt svg { width: 110px; height: 80px; filter: drop-shadow(0 0 14px rgba(255,190,60,.55)); animation: npBob 3s ease-in-out infinite; }
@keyframes npBob { 50% { transform: translateY(-4px); } }
.np-big { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.np-big b { font: 800 46px/1 var(--f-ui); color: #ffd36b; text-shadow: 0 0 18px rgba(255,190,60,.5); font-variant-numeric: tabular-nums; }
.np-big span { font: 700 18px/1.2 var(--f-body); color: #fff1c4; }
.np-plus { margin-top: 8px; font-size: 14px; color: #e8d6b8; }
.np-plus b { color: #ffb17a; }
.np-unlock { margin-top: 8px; display: inline-block; font: 700 13px/1.3 var(--f-ui); color: #3a0d08; background: linear-gradient(90deg, #ffd36b, #f2a93a); padding: 5px 10px; }
.np-pay { text-align: right; padding-left: 18px; border-left: 1px dashed rgba(255,211,107,.35); }
.np-pay b { display: block; font: 800 28px/1 var(--f-ui); color: #fff; margin-top: 6px; font-variant-numeric: tabular-nums; }
.np-pay small { display: block; margin-top: 6px; color: #cdb79c; font-size: 12px; }
.np-warn { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border: 2px dashed rgba(181,35,26,.55); border-radius: 6px; background: rgba(181,35,26,.06); font-weight: 600; color: var(--ink); }
.np-warn svg { width: 30px; height: 30px; flex: none; }
.np-warn b { color: var(--ember); }
.np-cta-wrap { display: flex; justify-content: center; margin-top: 8px; }
.np-wings { position: relative; display: inline-block; }
.np-wings::before, .np-wings::after { content: ""; position: absolute; top: 50%; width: 80px; height: 54px; transform: translateY(-50%); background: linear-gradient(180deg, #ffe08a, #b8741a); }
.np-wings::before { right: calc(100% - 6px); clip-path: polygon(100% 15%, 0 0, 35% 50%, 0 100%, 100% 85%); }
.np-wings::after { left: calc(100% - 6px); clip-path: polygon(0 15%, 100% 0, 65% 50%, 100% 100%, 0 85%); }
.np-cta { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 14px; padding: 18px 60px; border: 3px solid #ffd36b; border-radius: 10px; background: radial-gradient(120% 160% at 50% 0%, #ee5530, #a3171a 55%, #5c0a07); color: #fff1c4; font: 800 30px/1 var(--f-ui); letter-spacing: .05em; text-transform: uppercase; text-shadow: 0 2px 0 #4a0805; box-shadow: 0 0 0 2px #5e0d08, 0 0 28px rgba(255,140,30,.75), inset 0 1px 0 rgba(255,220,150,.5); animation: npPulse 2.4s ease-in-out infinite; }
.np-cta svg { width: 36px; height: 36px; }
.np-cta::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; left: -40%; background: linear-gradient(105deg, transparent, rgba(255,240,190,.55), transparent); animation: npSweep 2.8s ease-in-out infinite; }
.np-cta:hover { filter: brightness(1.1); }
.np-cta[disabled] { opacity: .55; cursor: not-allowed; animation: none; }
@keyframes npPulse { 50% { box-shadow: 0 0 0 2px #5e0d08, 0 0 42px rgba(255,160,40,.95), inset 0 1px 0 rgba(255,220,150,.5); } }
.np-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.np-how div { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid #c99a3e; border-radius: 6px; background: rgba(255,250,238,.7); font-size: 14px; }
.np-how svg { width: 34px; height: 34px; flex: none; color: var(--ember); }
.np-how b { display: block; color: var(--ink); }
.np-how span { color: var(--muted); }
.np-note { margin-top: 18px; text-align: center; font-weight: 600; }
.np-history { margin-top: 22px; }
.st { display: inline-block; font: 700 11px/1 var(--f-ui); letter-spacing: .04em; padding: 5px 8px; text-transform: uppercase; }
.st.ok { background: rgba(31,138,76,.14); color: #1f8a4c; } .st.wait { background: rgba(184,116,14,.16); color: #9a5f08; } .st.exp { background: rgba(110,90,72,.15); color: var(--muted); } .st.bad { background: rgba(181,35,26,.12); color: var(--ember); }
.qr-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10,3,4,.8); }
.qr-box { position: relative; width: min(440px, 100%); max-height: 94vh; overflow: auto; text-align: center; padding: 0 20px 22px; background: linear-gradient(180deg, #fdf7e8, #f3e3c3); border: 3px solid #d9a440; border-radius: 8px; box-shadow: 0 0 0 2px #6b3a0a, 0 0 40px rgba(255,140,30,.55); }
.qr-head { margin: 0 -20px 16px; padding: 14px; background: linear-gradient(180deg, #c22a1d, #6b0f08); color: var(--gold-hi); font: italic 800 26px/1 var(--f-display); text-transform: uppercase; display: flex; gap: 10px; justify-content: center; align-items: center; border-radius: 5px 5px 0 0; }
.qr-dot { width: 11px; height: 11px; border-radius: 50%; background: #3fd07e; animation: qrDot 1.6s infinite; }
@keyframes qrDot { 0% { box-shadow: 0 0 0 0 rgba(63,208,126,.7); } 70% { box-shadow: 0 0 0 10px rgba(63,208,126,0); } }
.qr-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; color: #ffe9a6; font-size: 26px; z-index: 2; }
.qr-frame { display: inline-block; padding: 12px; background: #fff; border: 3px solid #8a4700; }
.qr-frame img { display: block; width: 260px; max-width: 66vw; height: auto; }
.qr-box p { margin: 8px 0; }
.qr-code { font: 800 18px var(--f-ui); color: var(--ember); letter-spacing: .08em; }
.qr-small { font-size: 13px; color: var(--muted); }
.qr-btns { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
@media (max-width: 760px) {
  .np-hero { height: 190px; }
  .np-tag { font-size: 20px; }
  .np-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .np-custom { grid-template-columns: minmax(0, 1fr); }
  .np-receipt { grid-template-columns: 70px minmax(0, 1fr); }
  .np-receipt svg { width: 70px; height: 52px; }
  .np-big b { font-size: 36px; }
  .np-pay { grid-column: 1 / -1; text-align: left; padding-left: 0; border-left: 0; border-top: 1px dashed rgba(255,211,107,.35); padding-top: 12px; display: flex; justify-content: space-between; align-items: baseline; }
  .np-cta { padding: 16px 30px; font-size: 22px; }
  .np-wings::before, .np-wings::after { width: 40px; height: 34px; }
  .np-how { grid-template-columns: minmax(0, 1fr); }
  .np-step-h .np-hint { display: none; }
  .np-moc-sum b { font-size: 28px; }
  .np-mlabels span { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .np *, .np *::before, .np *::after { animation: none !important; } }

/* ===== Quan tri: trang tong quan ===== */
.adm-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.adm-title h1 { font: italic 800 48px/1 var(--f-display); text-transform: uppercase; color: var(--on-bg); text-shadow: 0 2px 0 rgba(0,0,0,.4); display: flex; align-items: center; gap: 12px; }
.adm-title h1::before { content: ""; width: 7px; height: .85em; background: var(--ember); transform: skewX(-14deg); }
.adm-title .ui { color: var(--on-bg-muted); }
.adm-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.adm-sum .stat { background: var(--parch); border: 1px solid var(--gold-line); border-left: 4px solid var(--ember); padding: 14px 16px; box-shadow: 0 10px 20px -14px rgba(0,0,0,.7); text-decoration: none; }
.adm-sum .stat b { font-size: 26px; }
.adm-group h2 { font: italic 800 24px/1 var(--f-display); text-transform: uppercase; color: var(--on-bg); text-shadow: 0 2px 0 rgba(0,0,0,.4); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.adm-group h2::before { content: ""; width: 6px; height: .9em; background: var(--ember); transform: skewX(-14deg); }
.adm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.adm-tool { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 18px 16px; min-height: 104px; background: var(--parch); border: 1px solid var(--gold-line); color: var(--text); text-decoration: none; box-shadow: 0 10px 20px -14px rgba(0,0,0,.7); }
.adm-tool:hover { border-color: var(--ember); box-shadow: 0 0 0 1px var(--gold-hi), 0 12px 22px -12px rgba(0,0,0,.8); }
.adm-tool svg { width: 24px; height: 24px; color: var(--ember); flex: none; margin-top: 1px; }
.adm-tool b { display: block; font-weight: 700; font-size: 16px; padding-right: 64px; }
.adm-tool small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.adm-tool .badge { position: absolute; top: 14px; right: 12px; font: 700 11px/1 var(--f-ui); padding: 5px 7px; background: var(--ember); color: #fff; }
.adm-tool.adm-danger { border: 2px solid #b5231a; background: var(--parch); }
.adm-tool.adm-danger svg, .adm-tool.adm-danger b { color: #b5231a; }
.adm-back, .adm-title .ui { color: var(--gold-hi) !important; text-shadow: 0 1px 3px #000, 0 0 10px rgba(0,0,0,.8); }
@media (max-width: 1100px) { .adm-grid, .adm-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .adm-grid { grid-template-columns: minmax(0, 1fr); } .adm-title h1 { font-size: 38px; } }

/* ===== Trang cu (nap tien, giftcode, moc nap, lich su, admin...) trong khung moi ===== */
.card-body { position: relative; }
.card.wide { width: 100%; }
.btn-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.info-box { background: rgba(255,255,255,.45); border: 1px solid var(--gold-line); padding: 16px; }
.info-box h3 { font: italic 800 20px/1.1 var(--f-display); text-transform: uppercase; color: var(--ink); margin: 0 0 10px; }
.info-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.info-line b { color: var(--muted); font-weight: 500; }
.notice { padding: 12px 14px; border-left: 4px solid var(--gold); background: rgba(255,255,255,.5); margin: 10px 0; }
.notice.error { border-left-color: var(--bad); }
.notice.success { border-left-color: var(--good); }
.main table:not(.nka) { border-collapse: collapse; width: 100%; }
.main table:not(.nka) th { text-align: left; font: 700 12px/1.2 var(--f-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 9px 10px; border-bottom: 2px solid var(--ink); }
.main table:not(.nka) td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.auto-table-scroll { overflow-x: auto; }
.card input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]), .card select, .card textarea { background: var(--paper); border: 2px solid var(--line-strong); padding: 9px 11px; color: var(--text); max-width: 100%; }
.card button:not(.btn):not(.link), .card input[type=submit] { border: 2px solid var(--ink); background: var(--wood); color: var(--gold-hi); padding: 9px 16px; font: 700 13px var(--f-ui); letter-spacing: .04em; text-transform: uppercase; }
.footer { text-align: center; color: var(--on-bg-muted); font-size: 13px; padding: 10px; }

@media (max-width: 1100px) {
  .art-r { display: none; }
  .art-l { width: 100%; opacity: .3; -webkit-mask-image: none; mask-image: none; background-position: center top; }
  .hero-in, .home-grid, .acc-grid { grid-template-columns: minmax(0, 1fr); }
  .wallet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) { .auth-wrap { grid-template-columns: minmax(0, 1fr); gap: 18px; } .dl-steps ol { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .rail {
    position: fixed; z-index: 15; top: auto; left: 0; right: 0; bottom: 0; flex-direction: row; justify-content: space-around; border-radius: 0; border-width: 2px 0 0;
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  }
  .rail::after, .emblem, .nav-sep { display: none; }
  .nav-btn { width: auto; flex: 1; min-width: 0; padding: 8px 2px; font-size: 10px; }
  .hero-in { padding: 24px 16px; }
  .hero::before, .hero::after { opacity: .18; }
  .podium { gap: 8px; }
  .pod { padding-inline: 6px; }
  .pod .avatar { width: 46px; height: 46px; font-size: 16px; }
  .p1 .avatar { width: 56px; height: 56px; }
  .pod .medal { font-size: 26px; left: 8px; }
  .pod .pval { font-size: 17px; }
  .brand b { font-size: 26px; }
  .user-chip small { display: none; }
  .rank-tools h1, .page-title h1 { font-size: 36px; }
  .actions { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .captcha { flex-wrap: wrap; }
  .captcha input { flex-basis: 100%; }
  .dl-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .dl-size { grid-column: 2; grid-row: 2; }
  .dl-row .btn, .dl-row .dl-soon { grid-column: 3; grid-row: 1 / span 2; }
  .wallet { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .ka-img, .ka-dragon, .ka-glow, .ka-sweep { animation: none; } }

/* admin.php cu: bo be rong co dinh de khong tran khung moi */
.main .admin-wrap { width: 100% !important; max-width: none !important; margin: 0 !important; }


/* ===== Bang xep hang: bo khung bục, nhan vat dung giua tren be sang (08/11) ===== */
.podium { align-items: end; gap: 10px; padding-top: 10px; }
.pod, .pod.p1 { background: none !important; border: 0 !important; clip-path: none !important; box-shadow: none !important; padding: 0 4px 6px !important; color: var(--on-bg) !important; gap: 4px; }
.pod .pod-char { order: 1; }
.pod .medal { order: 2; position: static; display: grid; place-items: center; width: 30px; height: 30px; margin-top: 2px; font: italic 800 18px/1 var(--f-display) !important; color: #fff1c4 !important; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: radial-gradient(circle, #8a8f99 0 55%, #e6e8ee 57% 64%, #4a4f58 66%); }
.pod.p1 .medal { width: 36px; height: 36px; font-size: 22px !important; background: radial-gradient(circle, #c22a1d 0 52%, #ffd36b 54% 62%, #6b0f08 64%); }
.pod.p3 .medal { background: radial-gradient(circle, #a5683b 0 55%, #f0c08a 57% 64%, #5a3410 66%); }
.pod .avatar { order: 1; }
.pod .pname { order: 3; color: #fff1c4; text-shadow: 0 2px 4px rgba(0,0,0,.8); }
.pod .pval { order: 4; color: var(--gold-hi) !important; text-shadow: 0 0 10px rgba(255,190,60,.45); }
.pod small { order: 5; color: var(--on-bg-muted) !important; }
.pod-char::after { bottom: -6px; width: 110px; height: 18px; background: radial-gradient(closest-side, rgba(255,200,90,.35), rgba(0,0,0,.25) 60%, transparent) !important; }
.pod.p1 .pod-char::after { width: 140px; background: radial-gradient(closest-side, rgba(255,210,100,.6), rgba(255,140,40,.2) 60%, transparent) !important; }
.pod.empty-pod { opacity: .45; }
.pod.empty-pod .avatar { width: 46px; height: 46px; background: rgba(255,255,255,.08); color: var(--on-bg-muted); box-shadow: inset 0 0 0 2px rgba(242,205,114,.4); }
@media (max-width: 560px) {
  .podium { gap: 4px; }
  .pod-char { height: 96px !important; }
  .pod-char img { max-height: 96px !important; }
  .p1 .pod-char { height: 128px !important; }
  .p1 .pod-char img { max-height: 128px !important; }
  .pod-char::after { width: 70px; }
  .pod.p1 .pod-char::after { width: 90px; }
  .pod .pname { font-size: 13px; }
  .pod .pval, .p1 .pval { font-size: 16px !important; }
  .pod small { font-size: 11px; }
  .pod .medal { width: 24px; height: 24px; font-size: 14px !important; }
  .pod.p1 .medal { width: 28px; height: 28px; font-size: 17px !important; }
  .pod.empty-pod .avatar { width: 36px; height: 36px; font-size: 14px; }
  .table-wrap table.nka:has(#rankBody) { min-width: 0; }
}

.podium { width: 100%; max-width: 720px; margin-inline: auto; }

