/* Tân AI Academy – giao diện tối cao cấp: kính mờ, viền HUD bao góc, nút khối 3D dập nổi */
:root {
  --bg: #050918; --bg2: #0a1230; --glass: rgba(16, 25, 60, .72); --glass2: rgba(26, 40, 92, .55);
  --line: rgba(120, 165, 255, .18); --line2: rgba(120, 165, 255, .32);
  --fg: #eef3ff; --mute: #9db0da; --dim: #6c7fa8;
  --gold: #ffd25e; --gold2: #f5a524; --cy: #3ce3ff; --vi: #8b5cf6; --ok: #22c55e; --bad: #ef4444;
  --r: 20px; --ui: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --serif: 'Playfair Display', Georgia, serif;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: radial-gradient(1200px 700px at 50% -10%, #1a2d78 0%, #0a1233 45%, var(--bg) 75%) fixed, var(--bg); color: var(--fg); font: 400 15px/1.55 var(--ui); overflow-x: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--cy); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 90; pointer-events: none; }
#root { position: relative; z-index: 1; }
.orb { position: fixed; border-radius: 50%; filter: blur(70px); opacity: .45; z-index: 0; pointer-events: none; animation: orb 18s ease-in-out infinite alternate; }
.orb.o1 { width: 420px; height: 420px; background: #3b5bff; top: -120px; left: -140px; }
.orb.o2 { width: 380px; height: 380px; background: #8b2cf6; bottom: -140px; right: -120px; animation-delay: -6s; opacity: .32; }
.orb.o3 { width: 260px; height: 260px; background: #00c8ff; top: 40%; left: 60%; animation-delay: -11s; opacity: .18; }
@keyframes orb { to { transform: translate(60px, 40px) scale(1.15); } }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.22em; }

/* ---------------------------------------------------------------- nút 3D */
.b3d {
  --t: #fff0a8; --m: #ffc93d; --b: #f09a14; --edge: #9a5a06; --rim: #6b3d02; --tx: #3b2200; --cb: rgba(255,255,255,.85);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 50px; padding: 12px 22px 13px; border: 0; border-radius: 16px;
  font: 800 15px/1.1 var(--ui); letter-spacing: .02em; color: var(--tx); text-decoration: none; text-shadow: 0 1px 0 rgba(255,255,255,.45);
  background: linear-gradient(180deg, var(--t) 0%, var(--m) 48%, var(--b) 100%);
  box-shadow: 0 0 0 2px var(--rim), inset 0 2px 0 rgba(255,255,255,.7), inset 0 -4px 0 rgba(0,0,0,.2), 0 7px 0 var(--edge), 0 7px 0 2px var(--rim), 0 14px 26px rgba(0,0,0,.55);
  transform: translateY(0); transition: transform .09s ease, box-shadow .09s ease, filter .15s; user-select: none; -webkit-user-select: none;
  margin-bottom: 7px; overflow: visible; isolation: isolate;
}
.b3d::before { content: ''; position: absolute; left: 7px; right: 7px; top: 3px; height: 46%; border-radius: 12px 12px 30px 30px / 12px 12px 14px 14px; background: linear-gradient(rgba(255,255,255,.62), rgba(255,255,255,.04)); pointer-events: none; z-index: -1; }
.b3d::after { content: ''; position: absolute; inset: 5px; border-radius: 9px; pointer-events: none; opacity: .75;
  background:
    linear-gradient(var(--cb), var(--cb)) left top / 9px 2px no-repeat, linear-gradient(var(--cb), var(--cb)) left top / 2px 9px no-repeat,
    linear-gradient(var(--cb), var(--cb)) right top / 9px 2px no-repeat, linear-gradient(var(--cb), var(--cb)) right top / 2px 9px no-repeat,
    linear-gradient(var(--cb), var(--cb)) left bottom / 9px 2px no-repeat, linear-gradient(var(--cb), var(--cb)) left bottom / 2px 9px no-repeat,
    linear-gradient(var(--cb), var(--cb)) right bottom / 9px 2px no-repeat, linear-gradient(var(--cb), var(--cb)) right bottom / 2px 9px no-repeat; }
.b3d:hover:not(:disabled) { filter: brightness(1.08) saturate(1.05); }
.b3d:active:not(:disabled), .b3d.is-press { transform: translateY(6px); box-shadow: 0 0 0 2px var(--rim), inset 0 2px 0 rgba(255,255,255,.55), inset 0 -2px 0 rgba(0,0,0,.2), 0 1px 0 var(--edge), 0 1px 0 2px var(--rim), 0 4px 10px rgba(0,0,0,.5); }
.b3d:disabled { filter: grayscale(.85) brightness(.7); cursor: not-allowed; }
.b3d.cyan { --t: #b8f7ff; --m: #3ad8ff; --b: #1495e0; --edge: #0b5a99; --rim: #063a66; --tx: #032642; }
.b3d.violet { --t: #e2d4ff; --m: #a57bff; --b: #7440f0; --edge: #4a1fb0; --rim: #2e127a; --tx: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.3); --cb: rgba(255,255,255,.7); }
.b3d.green { --t: #c9ffd9; --m: #3fe07f; --b: #12a650; --edge: #0b6b33; --rim: #064221; --tx: #03301a; }
.b3d.red { --t: #ffd0d0; --m: #ff6b6b; --b: #df2c3a; --edge: #8f1520; --rim: #5c0a12; --tx: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.3); --cb: rgba(255,255,255,.7); }
.b3d.steel { --t: #4a5d93; --m: #2a3a6e; --b: #1a2652; --edge: #0d1532; --rim: #070c20; --tx: #e8efff; text-shadow: 0 1px 0 rgba(0,0,0,.45); --cb: rgba(160,200,255,.55); }
.b3d.ghost { --t: #1d2b5e; --m: #152150; --b: #0f1940; --edge: #080f29; --rim: #2a3c7c; --tx: #cfe0ff; text-shadow: none; --cb: rgba(120,200,255,.5); }
.b3d.lg { min-height: 60px; padding: 15px 28px 16px; font-size: 17px; border-radius: 18px; }
.b3d.xl { min-height: 66px; padding: 17px 30px; font-size: 19px; border-radius: 20px; letter-spacing: .04em; }
.b3d.sm { min-height: 40px; padding: 8px 14px 9px; font-size: 13px; border-radius: 12px; }
.b3d.sm::after { inset: 4px; }
.b3d.block { display: flex; width: 100%; }
.b3d.sq { width: 48px; min-height: 48px; padding: 0; }
.b3d.sq.sm { width: 40px; min-height: 40px; }
.b3d.shine { overflow: hidden; }
.b3d.shine > .sh { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.b3d.shine > .sh::before { content: ''; position: absolute; top: -20%; bottom: -20%; width: 34%; left: -50%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.75), transparent); transform: skewX(-22deg); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 55% { left: -50%; } 100% { left: 140%; } }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row > .b3d { flex: 1 1 140px; }

/* ---------------------------------------------------------------- panel HUD */
.panel { position: relative; background: linear-gradient(160deg, rgba(30,46,104,.72), rgba(12,19,48,.78)); border: 1px solid var(--line2); border-radius: var(--r); padding: 18px; box-shadow: 0 18px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.hud::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; --hc: var(--cy);
  background:
    linear-gradient(var(--hc), var(--hc)) left top / 22px 2px no-repeat, linear-gradient(var(--hc), var(--hc)) left top / 2px 22px no-repeat,
    linear-gradient(var(--hc), var(--hc)) right top / 22px 2px no-repeat, linear-gradient(var(--hc), var(--hc)) right top / 2px 22px no-repeat,
    linear-gradient(var(--hc), var(--hc)) left bottom / 22px 2px no-repeat, linear-gradient(var(--hc), var(--hc)) left bottom / 2px 22px no-repeat,
    linear-gradient(var(--hc), var(--hc)) right bottom / 22px 2px no-repeat, linear-gradient(var(--hc), var(--hc)) right bottom / 2px 22px no-repeat;
  filter: drop-shadow(0 0 4px var(--hc)); }
.hud.gold::before { --hc: var(--gold); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 700 12px/1.3 var(--ui); letter-spacing: .04em; background: rgba(60,227,255,.12); color: #9eefff; border: 1px solid rgba(60,227,255,.35); }
.chip.gold { background: rgba(255,210,94,.12); color: var(--gold); border-color: rgba(255,210,94,.4); }
.chip.green { background: rgba(34,197,94,.14); color: #6ff0a0; border-color: rgba(34,197,94,.45); }
.chip.dim { background: rgba(255,255,255,.06); color: var(--mute); border-color: var(--line); }
.muted { color: var(--mute); }
.gold-text { background: linear-gradient(180deg, #fff3c0, #ffd25e 45%, #e7961a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cy-text { background: linear-gradient(90deg, #7df4ff, #6aa0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.h-display { font: 900 34px/1.08 var(--ui); letter-spacing: -.01em; }
.sec-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; font: 800 13px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: #a8c4ff; }
.sec-title::before { content: ''; width: 22px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--cy), transparent); }
.bar3d { position: relative; height: 12px; border-radius: 999px; background: #0a1230; box-shadow: inset 0 2px 4px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.08); overflow: hidden; }
.bar3d > i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(180deg, #a9f5ff, #33c8ff 50%, #1474d6); box-shadow: 0 0 12px rgba(60,227,255,.6), inset 0 1px 0 rgba(255,255,255,.6); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.bar3d.gold > i { background: linear-gradient(180deg, #fff2b0, #ffcd45 50%, #e08a0c); box-shadow: 0 0 12px rgba(255,200,80,.55), inset 0 1px 0 rgba(255,255,255,.6); }
.tile3d { --c1: #5b8cff; --c2: #8b5cf6; width: 58px; height: 58px; flex: none; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--c1), var(--c2)); box-shadow: inset 0 2px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(0,0,0,.25), 0 5px 0 rgba(0,0,0,.35), 0 10px 22px rgba(0,0,0,.45); position: relative; }
.tile3d::after { content: ''; position: absolute; left: 6px; right: 6px; top: 3px; height: 45%; border-radius: 14px 14px 20px 20px; background: linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,0)); }
.tile3d .ic { width: 28px; height: 28px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); position: relative; z-index: 1; }
.tile3d.lg { width: 84px; height: 84px; border-radius: 24px; }
.tile3d.lg .ic { width: 42px; height: 42px; }

/* ---------------------------------------------------------------- khung app */
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: calc(var(--sat) + 72px) 16px calc(var(--sab) + 104px); }
.app.nonav { padding-bottom: calc(var(--sab) + 36px); }
.app.noshell { padding-top: calc(var(--sat) + 16px); padding-bottom: calc(var(--sab) + 24px); }
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; padding: calc(var(--sat) + 10px) 16px 10px; background: linear-gradient(180deg, rgba(5,9,24,.92), rgba(5,9,24,.6)); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); min-width: 0; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 4px 12px rgba(0,0,0,.5), 0 0 0 1px rgba(255,210,94,.4); }
.brand b { display: block; font: 900 16px/1.1 var(--ui); letter-spacing: .02em; white-space: nowrap; }
.brand small { display: block; font: 600 10.5px/1.2 var(--ui); color: var(--gold); letter-spacing: .05em; white-space: nowrap; }
.topbar .sp { flex: 1; }
.xp-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; white-space: nowrap; border-radius: 999px; background: linear-gradient(180deg, rgba(255,210,94,.18), rgba(255,160,30,.08)); border: 1px solid rgba(255,210,94,.45); color: var(--gold); font: 800 13px/1 var(--ui); }
.icon-btn { width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line2); background: linear-gradient(180deg, #213168, #121c44); color: #cfe0ff; display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 4px 0 #070c20, 0 6px 14px rgba(0,0,0,.4); transition: transform .08s; }
.icon-btn:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 0 #070c20; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 8px 12px calc(var(--sab) + 10px); background: linear-gradient(0deg, rgba(5,9,24,.96), rgba(5,9,24,.75)); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.nav-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px 6px; border-radius: 14px; text-decoration: none; color: var(--dim); font: 700 11px/1.1 var(--ui); transition: color .2s, transform .1s; position: relative; }
.nav a .ic { width: 24px; height: 24px; }
.nav a.on { color: #10204a; background: linear-gradient(180deg, #bff6ff, #45d6ff 55%, #1d9ae6); box-shadow: inset 0 2px 0 rgba(255,255,255,.7), 0 4px 0 #0b5a99, 0 0 0 1px #063a66, 0 10px 20px rgba(30,160,255,.35); transform: translateY(-3px); }
.nav a:active { transform: translateY(1px); }
.screen { animation: enter .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.back-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.back-row h2 { font: 800 18px/1.2 var(--ui); flex: 1; min-width: 0; }
.foot-note { margin: 34px 0 6px; text-align: center; font-size: 12px; color: var(--dim); }
.foot-note b { color: var(--gold); }

/* ---------------------------------------------------------------- home */
.hello { display: flex; gap: 14px; align-items: center; }
.avatar { width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 900 26px/1 var(--serif); color: #3b2200; background: radial-gradient(circle at 35% 30%, #fff6c8, #ffc93d 50%, #c07a0a); box-shadow: 0 0 0 3px #6b3d02, inset 0 -4px 0 rgba(0,0,0,.25), inset 0 3px 0 rgba(255,255,255,.6), 0 8px 18px rgba(0,0,0,.5), 0 0 24px rgba(255,200,80,.35); }
.avatar.lg { width: 96px; height: 96px; font-size: 40px; }
.hello h1 { font: 800 21px/1.2 var(--ui); }
.hello .lvl { margin-top: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.stat { text-align: center; padding: 12px 6px; border-radius: 16px; background: rgba(8,14,38,.6); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.stat b { display: block; font: 900 22px/1.1 var(--ui); }
.stat span { font-size: 11.5px; color: var(--mute); }
.ring-wrap { display: flex; gap: 18px; align-items: center; }
.ring { position: relative; width: 112px; height: 112px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); filter: drop-shadow(0 0 10px rgba(60,227,255,.35)); }
.ring .rv { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .rv b { font: 900 26px/1 var(--ui); display: block; }
.ring .rv small { font-size: 11px; color: var(--mute); }
.mgrid { display: grid; gap: 12px; }
.mcard { position: relative; display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 20px; text-decoration: none; color: var(--fg); background: linear-gradient(160deg, rgba(32,48,108,.7), rgba(12,19,48,.82)); border: 1px solid var(--line2); box-shadow: 0 6px 0 rgba(4,8,22,.9), 0 14px 28px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08); transition: transform .12s, box-shadow .12s; }
.mcard:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(4,8,22,.9), 0 6px 14px rgba(0,0,0,.4); }
.mcard .mi { flex: 1; min-width: 0; }
.mcard h3 { font: 800 15px/1.3 var(--ui); margin: 3px 0 8px; }
.mcard .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--mute); margin-top: 6px; }
.mcard .done-badge { position: absolute; top: -8px; right: -6px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #3b2200; background: radial-gradient(circle at 35% 30%, #fff6c8, #ffc93d 55%, #c07a0a); box-shadow: 0 0 0 2px #6b3d02, 0 4px 10px rgba(0,0,0,.5); }
.mcard .done-badge .ic { width: 18px; height: 18px; stroke-width: 3; }
.final-card { position: relative; overflow: hidden; padding: 20px; border-radius: 22px; background: radial-gradient(500px 220px at 85% 0%, rgba(255,200,80,.25), transparent), linear-gradient(150deg, #2a2160, #121a46 60%, #0b1130); border: 1px solid rgba(255,210,94,.45); box-shadow: 0 8px 0 rgba(30,18,0,.6), 0 18px 34px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.12); }
.final-card .trophy { position: absolute; right: -8px; top: -6px; width: 120px; opacity: .95; filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)); }
.final-card h3 { font: 900 19px/1.25 var(--ui); max-width: 72%; }
.final-card p { margin: 6px 0 14px; color: #d8cfae; font-size: 13.5px; max-width: 72%; }

/* ---------------------------------------------------------------- lộ trình */
.path { position: relative; margin: 10px auto 0; width: 100%; max-width: 360px; }
.path svg.link { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.node { position: absolute; width: 86px; margin-left: -43px; text-align: center; text-decoration: none; color: var(--fg); }
.node .nb { width: 78px; height: 78px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; position: relative; color: #e8efff; background: radial-gradient(circle at 35% 28%, #5a6ea8, #2a3a6e 55%, #172150); box-shadow: 0 0 0 3px #070c20, inset 0 3px 0 rgba(255,255,255,.35), inset 0 -5px 0 rgba(0,0,0,.3), 0 8px 0 #0a1130, 0 8px 0 3px #070c20, 0 16px 26px rgba(0,0,0,.55); transition: transform .1s; }
.node:active .nb { transform: translateY(6px); box-shadow: 0 0 0 3px #070c20, inset 0 3px 0 rgba(255,255,255,.35), 0 2px 0 #0a1130, 0 2px 0 3px #070c20; }
.node .nb .ic { width: 34px; height: 34px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.node.done .nb { color: #3b2200; background: radial-gradient(circle at 35% 28%, #fff6c8, #ffc93d 55%, #c07a0a); box-shadow: 0 0 0 3px #6b3d02, inset 0 3px 0 rgba(255,255,255,.6), inset 0 -5px 0 rgba(0,0,0,.2), 0 8px 0 #8a4f04, 0 8px 0 3px #6b3d02, 0 16px 26px rgba(0,0,0,.5), 0 0 26px rgba(255,200,80,.35); }
.node.cur .nb { color: #032642; background: radial-gradient(circle at 35% 28%, #d4fbff, #3ad8ff 55%, #1474d6); box-shadow: 0 0 0 3px #063a66, inset 0 3px 0 rgba(255,255,255,.7), inset 0 -5px 0 rgba(0,0,0,.2), 0 8px 0 #0b5a99, 0 8px 0 3px #063a66, 0 16px 26px rgba(0,0,0,.5); }
.node.cur .nb::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 3px solid rgba(60,227,255,.6); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.node .nl { margin-top: 14px; font: 700 12px/1.25 var(--ui); color: #cfdcff; text-shadow: 0 2px 6px #000; }
.node .nl small { display: block; color: var(--gold); font-weight: 800; letter-spacing: .08em; }
.node.trophy-node .nb { width: 96px; height: 96px; }
.node .star-badge { position: absolute; bottom: -6px; right: -4px; background: #0b1130; border: 2px solid var(--gold); color: var(--gold); border-radius: 999px; font: 800 10px/1 var(--ui); padding: 4px 6px; }

/* ---------------------------------------------------------------- module */
.mhero { position: relative; overflow: hidden; border-radius: 24px; padding: 22px 18px 20px; background: radial-gradient(400px 200px at 90% -20%, rgba(255,255,255,.22), transparent), linear-gradient(140deg, var(--c1), var(--c2)); box-shadow: 0 8px 0 rgba(0,0,0,.35), 0 20px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.35); }
.mhero::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.06) 0 2px, transparent 2px 14px); pointer-events: none; }
.mhero .tile3d { background: rgba(255,255,255,.18); box-shadow: inset 0 2px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(0,0,0,.15), 0 6px 0 rgba(0,0,0,.25), 0 10px 20px rgba(0,0,0,.3); }
.mhero h1 { font: 900 23px/1.2 var(--ui); margin: 14px 0 6px; text-shadow: 0 2px 10px rgba(0,0,0,.35); position: relative; z-index: 1; }
.mhero p { margin: 0; color: rgba(255,255,255,.9); font-size: 14px; position: relative; z-index: 1; }
.mhero .chip { background: rgba(0,0,0,.25); color: #fff; border-color: rgba(255,255,255,.35); }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.act { position: relative; text-align: left; padding: 16px 14px 14px; border-radius: 20px; border: 0; color: var(--fg); text-decoration: none; display: block;
  background: linear-gradient(170deg, #26387a, #141f4c); box-shadow: 0 0 0 1.5px #33478f, inset 0 2px 0 rgba(255,255,255,.14), inset 0 -4px 0 rgba(0,0,0,.25), 0 7px 0 #0a112e, 0 7px 0 1.5px #070c20, 0 14px 24px rgba(0,0,0,.45); transition: transform .09s, box-shadow .09s; margin-bottom: 7px; }
.act:active { transform: translateY(6px); box-shadow: 0 0 0 1.5px #33478f, inset 0 2px 0 rgba(255,255,255,.14), 0 1px 0 #0a112e, 0 1px 0 1.5px #070c20; }
.act .ai { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 10px; color: #fff; box-shadow: inset 0 2px 0 rgba(255,255,255,.45), inset 0 -3px 0 rgba(0,0,0,.25), 0 4px 10px rgba(0,0,0,.35); }
.act .ai .ic { width: 24px; height: 24px; }
.act b { display: block; font: 800 15px/1.2 var(--ui); }
.act small { display: block; margin-top: 4px; color: var(--mute); font-size: 12px; }
.act.locked { opacity: .55; }
.act .tag { position: absolute; top: 12px; right: 12px; }
.lesson-list { display: grid; gap: 10px; }
.li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(10,17,44,.7); border: 1px solid var(--line); text-decoration: none; color: var(--fg); transition: transform .1s, background .2s; }
.li:active { transform: scale(.98); }
.li .n { width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center; font: 800 14px/1 var(--ui); background: #1b2960; border: 1px solid var(--line2); }
.li.done .n { background: linear-gradient(180deg, #5df59a, #16a34a); color: #032b14; border: 0; }
.li span { flex: 1; font-weight: 600; font-size: 14px; }

/* ---------------------------------------------------------------- bài giảng */
.lesson h1 { font: 900 24px/1.25 var(--ui); margin: 6px 0 16px; }
.lesson .body p { margin: 0 0 14px; font-size: 15.5px; line-height: 1.7; color: #dfe7ff; }
.lesson .body b { color: #fff; }
.lesson .body h4 { margin: 20px 0 10px; font: 800 14px/1.2 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--cy); }
.lesson .body ul { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 9px; }
.lesson .body li { position: relative; padding: 11px 12px 11px 40px; border-radius: 14px; background: rgba(12,20,52,.72); border: 1px solid var(--line); line-height: 1.55; font-size: 14.5px; color: #dbe4ff; }
.lesson .body li::before { content: ''; position: absolute; left: 14px; top: 17px; width: 12px; height: 12px; border-radius: 4px; transform: rotate(45deg); background: linear-gradient(135deg, #8ff3ff, #3b82f6); box-shadow: 0 0 10px rgba(60,227,255,.6); }
.tip { position: relative; display: flex; gap: 12px; margin: 6px 0 16px; padding: 14px; border-radius: 16px; background: linear-gradient(150deg, rgba(255,210,94,.16), rgba(255,150,20,.06)); border: 1px solid rgba(255,210,94,.45); color: #fbeac0; font-size: 14.5px; }
.tip .ti { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #3b2200; background: linear-gradient(180deg, #fff0a8, #ffc93d 50%, #f09a14); box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 3px 0 #9a5a06; }
.tip b.tl { display: block; color: var(--gold); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 3px; }
.prompt { position: relative; margin: 6px 0 16px; padding: 14px 14px 12px; border-radius: 16px; background: #050a1c; border: 1px solid rgba(60,227,255,.35); box-shadow: inset 0 0 30px rgba(60,227,255,.06); }
.prompt .pl { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font: 800 11px/1 var(--ui); letter-spacing: .16em; color: var(--cy); text-transform: uppercase; }
.prompt pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 500 13.5px/1.6 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: #cdeeff; }
.copy-btn { border: 1px solid rgba(60,227,255,.4); background: rgba(60,227,255,.1); color: #9eefff; border-radius: 9px; padding: 5px 10px; font: 700 11px/1 var(--ui); letter-spacing: .04em; display: inline-flex; gap: 5px; align-items: center; }
.dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 12px; }
.dots i { width: 26px; height: 6px; border-radius: 3px; background: #1d2a5a; }
.dots i.on { background: linear-gradient(90deg, #7df4ff, #3b82f6); box-shadow: 0 0 8px rgba(60,227,255,.6); }
.dots i.ok { background: #22c55e; }
.sticky-bottom { position: sticky; bottom: calc(var(--sab) + 92px); margin-top: 20px; padding-top: 10px; }

/* ---------------------------------------------------------------- flashcard */
.fc-stage { perspective: 1400px; height: 300px; margin: 10px 0 18px; position: relative; }
.fc { position: absolute; inset: 0; cursor: pointer; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3,1.3,.5,1); touch-action: pan-y; }
.fc.flip { transform: rotateY(180deg); }
.fc .face { position: absolute; inset: 0; border-radius: 26px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px; text-align: center; overflow: hidden; }
.fc .front { background: radial-gradient(400px 220px at 50% 0%, rgba(255,255,255,.22), transparent), linear-gradient(150deg, var(--c1), var(--c2)); box-shadow: 0 10px 0 rgba(0,0,0,.35), 0 26px 40px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.4); }
.fc .back { transform: rotateY(180deg); background: linear-gradient(160deg, #1e2d6a, #0d1640); border: 2px solid rgba(255,210,94,.55); box-shadow: 0 10px 0 rgba(0,0,0,.35), 0 26px 40px rgba(0,0,0,.5), inset 0 0 40px rgba(255,210,94,.08); }
.fc .front::after, .fc .back::after { content: ''; position: absolute; inset: 14px; border-radius: 16px; border: 1.5px dashed rgba(255,255,255,.28); pointer-events: none; }
.fc .term { font: 900 30px/1.2 var(--ui); text-shadow: 0 3px 12px rgba(0,0,0,.35); }
.fc .def { font: 600 19px/1.5 var(--ui); color: #f4f0dc; }
.fc .hint { position: absolute; bottom: 24px; font: 700 12px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.fc .idx { position: absolute; top: 24px; font: 800 12px/1 var(--ui); letter-spacing: .14em; opacity: .85; }
.fc.known-fly { transition: transform .45s ease-in, opacity .45s; opacity: 0; }

/* ---------------------------------------------------------------- bài thi */
.exam-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.timer { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; font: 800 15px/1 ui-monospace, Menlo, monospace; background: #0a1230; border: 1px solid var(--line2); box-shadow: inset 0 2px 4px rgba(0,0,0,.6); color: #bfe9ff; }
.timer.warn { color: #ffb4b4; border-color: rgba(239,68,68,.6); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { box-shadow: 0 0 16px rgba(239,68,68,.6), inset 0 2px 4px rgba(0,0,0,.6); } }
.segs { display: flex; gap: 4px; flex: 1; }
.segs i { flex: 1; height: 8px; border-radius: 4px; background: #1a2554; box-shadow: inset 0 1px 2px rgba(0,0,0,.6); }
.segs i.cur { background: linear-gradient(90deg, #7df4ff, #3b82f6); box-shadow: 0 0 8px rgba(60,227,255,.7); }
.segs i.ok { background: linear-gradient(180deg, #6ff0a0, #16a34a); }
.segs i.no { background: linear-gradient(180deg, #ff8a8a, #dc2626); }
.qcard { padding: 20px 18px; }
.qtype { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.qtext { font: 800 19px/1.45 var(--ui); margin: 0 0 18px; }
.qtext .blank { display: inline-block; min-width: 90px; padding: 0 10px; border-bottom: 3px dashed var(--cy); color: var(--cy); text-align: center; }
.qtext .blank.ok { color: #6ff0a0; border-color: #22c55e; }
.qtext .blank.no { color: #ff9a9a; border-color: #ef4444; }
.scenario { display: flex; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; background: rgba(139,92,246,.14); border: 1px solid rgba(167,139,250,.45); color: #e4dbff; font-size: 14.5px; }
.opts { display: grid; gap: 12px; }
.opt { --t: #34488a; --m: #22336e; --b: #172452; --edge: #0b1333; --rim: #070c20; position: relative; width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 13px 14px 14px; border: 0; border-radius: 16px; color: #eef3ff; font: 600 15px/1.4 var(--ui);
  background: linear-gradient(180deg, var(--t), var(--m) 50%, var(--b)); box-shadow: 0 0 0 1.5px var(--rim), inset 0 2px 0 rgba(255,255,255,.18), inset 0 -3px 0 rgba(0,0,0,.25), 0 6px 0 var(--edge), 0 6px 0 1.5px var(--rim), 0 12px 20px rgba(0,0,0,.4); margin-bottom: 6px; transition: transform .08s, box-shadow .08s, filter .2s; }
.opt:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 1.5px var(--rim), inset 0 2px 0 rgba(255,255,255,.18), 0 1px 0 var(--edge), 0 1px 0 1.5px var(--rim); }
.opt .k { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; font: 900 15px/1 var(--ui); color: #032642; background: linear-gradient(180deg, #c8f8ff, #45d6ff 55%, #1d9ae6); box-shadow: inset 0 2px 0 rgba(255,255,255,.7), 0 3px 0 #0b5a99; }
.opt.sel { --t: #2f7fd8; --m: #1d5fbf; --b: #144596; --edge: #0a2c66; filter: brightness(1.1); }
.opt.sel .k { background: linear-gradient(180deg, #fff0a8, #ffc93d 55%, #f09a14); color: #3b2200; box-shadow: inset 0 2px 0 rgba(255,255,255,.7), 0 3px 0 #9a5a06; }
.opt.ok { --t: #4ee28f; --m: #1fb862; --b: #138a47; --edge: #0b5a2d; --rim: #053d1e; color: #fff; }
.opt.ok .k { background: #fff; color: #138a47; box-shadow: 0 3px 0 #0b5a2d; }
.opt.no { --t: #ff7b7b; --m: #e33b3b; --b: #b81d27; --edge: #7a0f17; --rim: #4d070d; color: #fff; animation: shake .4s; }
.opt.no .k { background: #fff; color: #b81d27; box-shadow: 0 3px 0 #7a0f17; }
.opt:disabled { cursor: default; }
.opt.fade { filter: saturate(.4) brightness(.7); }
.opt .chk { margin-left: auto; width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(255,255,255,.4); display: grid; place-items: center; flex: none; }
.opt.sel .chk { background: var(--gold); border-color: var(--gold); color: #3b2200; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.tf { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tf .b3d { min-height: 86px; font-size: 22px; letter-spacing: .1em; flex-direction: column; gap: 4px; }
.tf .b3d .ic { width: 30px; height: 30px; }
.tf .b3d.picked-ok { animation: pop .4s; }
@keyframes pop { 50% { transform: scale(1.06); } }
.ord-slots { display: grid; gap: 8px; margin-bottom: 14px; }
.slot { min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; border: 2px dashed rgba(120,165,255,.35); color: var(--dim); font-size: 14px; }
.slot .sn { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font: 900 13px/1 var(--ui); background: #1a2554; color: #9db0da; flex: none; }
.slot.filled { border-style: solid; border-color: rgba(60,227,255,.55); background: rgba(60,227,255,.08); color: #eef3ff; cursor: pointer; }
.slot.filled .sn { background: linear-gradient(180deg, #c8f8ff, #45d6ff); color: #032642; }
.slot.ok { border-color: #22c55e; background: rgba(34,197,94,.12); }
.slot.no { border-color: #ef4444; background: rgba(239,68,68,.12); }
.pool { display: flex; flex-wrap: wrap; gap: 10px; }
.pool .opt { width: auto; flex: 1 1 100%; }
.pool .opt.used { visibility: hidden; height: 0; padding: 0; margin: 0; box-shadow: none; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.match .col { display: grid; gap: 10px; align-content: start; }
.match .opt { font-size: 13.5px; padding: 11px 10px 12px; min-height: 64px; gap: 8px; }
.match .opt .pk { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 900 11px/1 var(--ui); background: rgba(255,255,255,.12); }
.match .opt.paired { --t: var(--pc1); --m: var(--pc2); --b: var(--pc3); color: #fff; }
.match .opt.paired .pk { background: #fff; color: #111; }
.match .opt.pick { outline: 3px solid var(--gold); outline-offset: 2px; }
.feedback { margin-top: 18px; padding: 14px 16px; border-radius: 16px; display: flex; gap: 12px; animation: enter .35s both; }
.feedback.ok { background: linear-gradient(150deg, rgba(34,197,94,.22), rgba(34,197,94,.06)); border: 1px solid rgba(34,197,94,.55); }
.feedback.no { background: linear-gradient(150deg, rgba(239,68,68,.22), rgba(239,68,68,.06)); border: 1px solid rgba(239,68,68,.55); }
.feedback .fi { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.feedback.ok .fi { background: linear-gradient(180deg, #5df59a, #16a34a); box-shadow: 0 3px 0 #0b5a2d; }
.feedback.no .fi { background: linear-gradient(180deg, #ff8a8a, #dc2626); box-shadow: 0 3px 0 #7a0f17; }
.feedback b { display: block; font-size: 16px; margin-bottom: 2px; }
.feedback p { margin: 0; font-size: 14px; color: #dfe7ff; }
.exam-intro .rules { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.rule { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(8,14,38,.6); border: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.rule b { display: block; color: #fff; font-size: 16px; }
.rule .ic { width: 26px; height: 26px; color: var(--cy); }
.qtypes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.result { text-align: center; }
.score-ring { position: relative; width: 190px; height: 190px; margin: 6px auto 10px; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .sv { position: absolute; inset: 0; display: grid; place-items: center; }
.score-ring .sv b { font: 900 52px/1 var(--ui); display: block; }
.score-ring .sv small { color: var(--mute); font-size: 13px; }
.stars { display: flex; justify-content: center; gap: 10px; margin: 6px 0 10px; }
.stars svg { width: 46px; height: 46px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.stars svg.on { animation: starIn .5s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); } }
.review { text-align: left; display: grid; gap: 8px; margin-top: 10px; }
.review .rv { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(8,14,38,.6); border: 1px solid var(--line); font-size: 13.5px; }
.review .rv .ic { width: 20px; height: 20px; margin-top: 2px; }
.review .rv.ok .ic { color: #4ade80; }
.review .rv.no .ic { color: #f87171; }
.review .rv small { display: block; color: var(--mute); margin-top: 2px; }
details.panel > summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.panel > summary::-webkit-details-marker { display: none; }

/* ---------------------------------------------------------------- chứng chỉ */
.cert-frame { position: relative; border-radius: 14px; padding: 8px; background: linear-gradient(135deg, #8a5a12, #fff0b3 30%, #c58f2e 55%, #fde39a 80%, #8a5a12); box-shadow: 0 20px 50px rgba(0,0,0,.6), 0 0 40px rgba(255,200,80,.25); transform-style: preserve-3d; transition: transform .3s; }
.cert-frame img, .cert-frame canvas { width: 100%; height: auto; border-radius: 8px; display: block; }
.cert-frame .loading { aspect-ratio: 1.414; display: grid; place-items: center; background: #f7efdc; border-radius: 8px; color: #6b5a3a; font-weight: 700; }
.cert-frame .glare { position: absolute; inset: 8px; border-radius: 8px; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 45%, transparent 60%); background-size: 250% 100%; animation: glare 4.5s ease-in-out infinite; mix-blend-mode: overlay; }
@keyframes glare { 0% { background-position: 120% 0; } 60%, 100% { background-position: -60% 0; } }
.cert-title { text-align: center; margin: 4px 0 16px; }
.cert-title h1 { font: 900 26px/1.2 var(--ui); }
.cert-title p { margin: 6px 0 0; color: var(--mute); font-size: 14px; }
.cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ccard { position: relative; text-decoration: none; color: var(--fg); border-radius: 16px; padding: 8px 8px 10px; background: linear-gradient(170deg, #22336f, #111a44); border: 1px solid var(--line2); box-shadow: 0 6px 0 #070c20, 0 12px 20px rgba(0,0,0,.45); transition: transform .1s; }
.ccard:active { transform: translateY(4px); box-shadow: 0 2px 0 #070c20; }
.ccard .th { aspect-ratio: 1.414; border-radius: 10px; overflow: hidden; background: #0a1230; display: grid; place-items: center; position: relative; }
.ccard .th img { width: 100%; height: 100%; object-fit: cover; }
.ccard .th .lk { color: var(--dim); display: grid; place-items: center; gap: 4px; font-size: 11px; text-align: center; padding: 6px; }
.ccard .th .lk .ic { width: 26px; height: 26px; }
.ccard b { display: block; font: 800 12.5px/1.3 var(--ui); margin-top: 8px; }
.ccard small { color: var(--mute); font-size: 11px; }
.ccard.earned { border-color: rgba(255,210,94,.5); }
.ccard.final { grid-column: 1 / -1; }
.save-tip { margin-top: 12px; font-size: 12.5px; color: var(--mute); text-align: center; }

/* ---------------------------------------------------------------- vinh danh */
.honor { position: fixed; inset: 0; z-index: 80; overflow-y: auto; background: radial-gradient(900px 600px at 50% 30%, #2a2a7a 0%, #0c0f33 55%, #03040c 100%); display: flex; flex-direction: column; align-items: center; padding: calc(var(--sat) + 30px) 18px calc(var(--sab) + 30px); text-align: center; }
.honor .rays { position: absolute; left: 50%; top: 32%; width: 1400px; height: 1400px; margin: -700px 0 0 -700px; background: repeating-conic-gradient(from 0deg, rgba(255,210,94,.09) 0deg 7deg, transparent 7deg 18deg); border-radius: 50%; mask: radial-gradient(circle, #000 0%, transparent 62%); -webkit-mask: radial-gradient(circle, #000 0%, transparent 62%); animation: spin 40s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.honor .in { position: relative; z-index: 1; max-width: 520px; width: 100%; }
.honor .trophy-big { width: 190px; margin: 0 auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,.6)) drop-shadow(0 0 40px rgba(255,200,80,.45)); animation: trophyIn 1s cubic-bezier(.3,1.5,.5,1) both, float 4s ease-in-out 1s infinite; }
@keyframes trophyIn { from { transform: scale(.2) translateY(80px) rotate(-12deg); opacity: 0; } }
@keyframes float { 50% { transform: translateY(-10px); } }
.honor .kicker { margin-top: 10px; font: 800 13px/1 var(--ui); letter-spacing: .4em; color: var(--gold); animation: enter .8s .4s both; }
.honor h1 { font: 900 44px/1.05 var(--serif); margin: 10px 0 6px; animation: enter .8s .55s both; }
.honor .hname { font: 400 56px/1.15 'Great Vibes', cursive; margin: 6px 0 4px; animation: nameIn 1.2s .8s both; background: linear-gradient(90deg, #b07a1a, #fff3c0, #ffd25e, #fff3c0, #b07a1a); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: nameIn 1.2s .8s both, sheen 4s linear 2s infinite; padding: 0 10px; }
@keyframes nameIn { from { opacity: 0; transform: scale(.7); filter: blur(8px); } }
@keyframes sheen { to { background-position: -200% 0; } }
.honor p.sub { color: #d7d2ff; margin: 6px auto 18px; max-width: 420px; animation: enter .8s 1.1s both; }
.honor .hstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 22px; animation: enter .8s 1.3s both; }
.honor .hstats div { padding: 12px 6px; border-radius: 16px; background: rgba(255,210,94,.08); border: 1px solid rgba(255,210,94,.35); }
.honor .hstats b { display: block; font: 900 24px/1.1 var(--ui); color: var(--gold); }
.honor .hstats span { font-size: 11.5px; color: #cfc6a6; }
.honor .btns { display: grid; gap: 10px; animation: enter .8s 1.5s both; }
.honor .credit { margin-top: 18px; font-size: 12px; color: #a59fd0; }

/* ---------------------------------------------------------------- hồ sơ / cài đặt */
.row { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .rt { flex: 1; min-width: 0; }
.row .rt b { display: block; font-size: 15px; }
.row .rt small { color: var(--mute); font-size: 12.5px; }
.row .ri { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: #1b2960; color: var(--cy); border: 1px solid var(--line2); }
.switch { position: relative; width: 60px; height: 34px; flex: none; border: 0; border-radius: 999px; padding: 0; background: #0a1230; box-shadow: inset 0 3px 6px rgba(0,0,0,.7), 0 0 0 1.5px #2a3c7c; transition: background .25s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #c9d6f5 60%, #8a9cc8); box-shadow: 0 3px 0 #4a5a85, 0 4px 8px rgba(0,0,0,.5); transition: left .25s cubic-bezier(.3,1.5,.5,1); }
.switch.on { background: linear-gradient(180deg, #1fb862, #138a47); box-shadow: inset 0 3px 6px rgba(0,0,0,.4), 0 0 0 1.5px #0b5a2d, 0 0 14px rgba(34,197,94,.4); }
.switch.on::after { left: 29px; }

/* ---------------------------------------------------------------- onboarding */
.welcome { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; justify-content: center; }
.logo3d { width: 128px; height: 128px; margin: 0 auto 18px; border-radius: 32px; box-shadow: 0 0 0 3px rgba(255,210,94,.6), 0 14px 0 #06091c, 0 24px 40px rgba(0,0,0,.6), 0 0 50px rgba(80,140,255,.45); animation: logoIn 1s cubic-bezier(.3,1.5,.5,1) both, float 5s ease-in-out 1s infinite; }
@keyframes logoIn { from { transform: rotateY(90deg) scale(.6); opacity: 0; } }
.welcome h1 { text-align: center; font: 900 30px/1.15 var(--ui); }
.welcome .by { text-align: center; margin: 8px 0 22px; color: var(--mute); }
.welcome .by b { color: var(--gold); }
.field label { display: block; font: 800 13px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: #a8c4ff; margin-bottom: 10px; }
.input3d { width: 100%; min-height: 58px; padding: 14px 16px; border-radius: 16px; border: 0; outline: 0; font: 700 18px/1.2 var(--ui); color: #fff; background: #070d26; box-shadow: inset 0 3px 8px rgba(0,0,0,.8), 0 0 0 1.5px #2a3c7c, 0 1px 0 rgba(255,255,255,.08); transition: box-shadow .2s; }
.input3d:focus { box-shadow: inset 0 3px 8px rgba(0,0,0,.8), 0 0 0 2px var(--cy), 0 0 20px rgba(60,227,255,.35); }
.mini-cert { margin: 18px 0; border-radius: 12px; padding: 18px 14px 16px; text-align: center; color: #0e1d45; background: radial-gradient(circle, #fffdf6, #efe2c2); box-shadow: 0 0 0 4px #0e1d45, 0 0 0 6px #d4a23c, 0 14px 30px rgba(0,0,0,.5); position: relative; }
.mini-cert small { display: block; font: 800 10px/1 var(--ui); letter-spacing: .3em; color: #8a5a12; }
.mini-cert .mc-t { font: 900 22px/1.2 var(--serif); margin: 6px 0 2px; background: linear-gradient(180deg, #c8932f, #8a5a12); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mini-cert .mc-n { font: 400 38px/1.25 'Great Vibes', cursive; min-height: 48px; word-break: break-word; }
.mini-cert .mc-s { font: 600 11px/1.3 var(--ui); color: #5b4a2a; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 18px; font-size: 14px; color: #cfdcff; cursor: pointer; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; background: #070d26; box-shadow: inset 0 2px 5px rgba(0,0,0,.8), 0 0 0 1.5px #2a3c7c; color: transparent; }
.check input:checked + .box { background: linear-gradient(180deg, #fff0a8, #ffc93d 55%, #f09a14); color: #3b2200; box-shadow: 0 0 0 1.5px #6b3d02, 0 3px 0 #9a5a06; }
.check input:focus-visible + .box { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------------------------------------------------------------- toast / modal */
#toast { position: fixed; left: 50%; bottom: calc(var(--sab) + 104px); transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 14px; background: rgba(14,22,56,.96); border: 1px solid var(--line2); box-shadow: 0 12px 30px rgba(0,0,0,.6); font-weight: 600; font-size: 14px; display: flex; gap: 10px; align-items: center; animation: toastIn .35s cubic-bezier(.3,1.4,.5,1) both; }
.toast.gold { border-color: rgba(255,210,94,.6); }
.toast .ic { color: var(--gold); }
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }
.modal-bg { position: fixed; inset: 0; z-index: 95; background: rgba(2,4,14,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(100%, 420px); animation: enter .3s both; }
.modal h3 { font: 900 20px/1.25 var(--ui); margin-bottom: 8px; }
.modal p { margin: 0 0 18px; color: #cfdcff; }
.viewer { position: fixed; inset: 0; z-index: 96; background: rgba(0,0,0,.92); display: flex; flex-direction: column; padding: calc(var(--sat) + 12px) 12px calc(var(--sab) + 12px); }
.viewer .vi { flex: 1; overflow: auto; display: grid; place-items: center; }
.viewer img { max-width: none; width: 100%; height: auto; border-radius: 6px; }

/* ---------------------------------------------------------------- landing */
.land { position: relative; z-index: 1; }
.lnav { position: sticky; top: 0; z-index: 30; padding: calc(var(--sat) + 10px) 16px 10px; background: linear-gradient(180deg, rgba(5,9,24,.9), rgba(5,9,24,.55)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.lnav .in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.lnav .sp { flex: 1; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 56px 16px 40px; }
#cai-dat { scroll-margin-top: 70px; }
.hero h1 { font: 900 clamp(34px, 5.4vw, 60px)/1.05 var(--ui); letter-spacing: -.02em; margin: 16px 0 16px; }
.hero p.lead { font-size: clamp(16px, 1.6vw, 19px); color: #c9d6f7; max-width: 560px; margin: 0 0 26px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .hstat { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 30px; }
.hero .hstat div b { display: block; font: 900 28px/1 var(--ui); }
.hero .hstat div span { font-size: 13px; color: var(--mute); }
.phone { position: relative; width: 290px; height: 590px; margin: 0 auto; border-radius: 48px; padding: 12px; background: linear-gradient(145deg, #3a4670, #10162e 40%, #2a3458); box-shadow: 0 0 0 2px #556089, 0 40px 80px rgba(0,0,0,.7), 0 0 80px rgba(80,140,255,.3), inset 0 0 0 2px #0a0f22; transform: rotateY(-14deg) rotateX(6deg); transform-style: preserve-3d; animation: phoneFloat 6s ease-in-out infinite; }
@keyframes phoneFloat { 50% { transform: rotateY(-8deg) rotateX(4deg) translateY(-12px); } }
.phone .scr { position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: radial-gradient(500px 300px at 50% -10%, #1f3590, #0a1233 55%, #050918); padding: 44px 14px 14px; }
.phone .notch { position: absolute; top: 12px; left: 50%; width: 96px; height: 26px; margin-left: -48px; border-radius: 20px; background: #000; z-index: 2; }
.phone .pm { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; margin-bottom: 9px; background: linear-gradient(160deg, rgba(32,48,108,.85), rgba(12,19,48,.9)); border: 1px solid var(--line2); box-shadow: 0 4px 0 rgba(4,8,22,.9); font-size: 11.5px; font-weight: 700; }
.phone .pm .tile3d { width: 36px; height: 36px; border-radius: 11px; }
.phone .pm .tile3d .ic { width: 18px; height: 18px; }
.phone .pm .bar3d { height: 6px; margin-top: 6px; }
.float-badge { position: absolute; z-index: 3; padding: 10px 14px; border-radius: 16px; font: 800 13px/1.2 var(--ui); display: flex; gap: 8px; align-items: center; background: rgba(14,22,56,.92); border: 1px solid rgba(255,210,94,.5); box-shadow: 0 16px 30px rgba(0,0,0,.5); animation: float 5s ease-in-out infinite; }
.float-badge .ic { color: var(--gold); width: 22px; height: 22px; }
.lsec { padding: 54px 0; }
.lsec h2 { font: 900 clamp(26px, 3.6vw, 40px)/1.15 var(--ui); text-align: center; margin: 12px 0 10px; }
.lsec .sub { text-align: center; color: var(--mute); max-width: 640px; margin: 0 auto 30px; }
.center { text-align: center; }
.tabs { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.tabs .b3d { flex: 0 1 auto; }
.install-box { max-width: 860px; margin: 0 auto; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 18px; }
.step { position: relative; padding: 18px 14px 16px; border-radius: 18px; background: rgba(10,17,44,.75); border: 1px solid var(--line2); text-align: center; }
.step .sn { position: absolute; top: -14px; left: 50%; margin-left: -16px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 900 15px/1 var(--ui); color: #3b2200; background: radial-gradient(circle at 35% 30%, #fff6c8, #ffc93d 55%, #c07a0a); box-shadow: 0 0 0 2px #6b3d02, 0 4px 8px rgba(0,0,0,.5); }
.step .ill { height: 112px; margin: 8px auto 12px; border-radius: 14px; background: #0b1336; border: 1px solid var(--line); display: grid; place-items: center; position: relative; overflow: hidden; }
.step > b { display: block; font-size: 15px; margin-bottom: 4px; }
.step p { margin: 0; font-size: 13.5px; color: var(--mute); }
.step p .kbd { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 6px; background: #1d2b5e; color: #fff; font-weight: 700; font-size: 12.5px; vertical-align: 1px; }
.step p .kbd .ic { width: 14px; height: 14px; }
.ill .sbar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 36px; border-radius: 12px; background: rgba(255,255,255,.1); display: flex; justify-content: space-around; align-items: center; color: #8fb5ff; }
.ill .sbar .ic { width: 18px; height: 18px; }
.ill .hl { color: #fff; position: relative; }
.ill .hl::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--gold); animation: pulse 1.6s ease-out infinite; }
.ill .sheet { position: absolute; left: 10px; right: 10px; bottom: 0; height: 84px; border-radius: 14px 14px 0 0; background: #1c2550; padding: 8px; display: grid; gap: 6px; }
.ill .sheet div { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.07); font-size: 11.5px; color: #c9d6f7; }
.ill .sheet div.hl2 { background: rgba(255,210,94,.18); outline: 2px solid var(--gold); color: #fff; font-weight: 700; }
.ill .sheet .ic { width: 14px; height: 14px; }
.ill .dlg { width: 82%; padding: 10px; border-radius: 12px; background: #1c2550; font-size: 11px; text-align: left; }
.ill .dlg .dt { display: flex; justify-content: space-between; color: #8fb5ff; font-weight: 700; margin-bottom: 8px; }
.ill .dlg .dt .add { color: var(--gold); outline: 2px solid var(--gold); border-radius: 6px; padding: 1px 6px; }
.ill .dlg .da { display: flex; gap: 8px; align-items: center; color: #fff; font-weight: 700; }
.ill .dlg .da img { width: 30px; height: 30px; border-radius: 8px; }
.ill .home { display: grid; grid-template-columns: repeat(4, 30px); gap: 10px; }
.ill .home i { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.12); }
.ill .home img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(255,210,94,.6); }
.ill .menu3 { position: absolute; top: 10px; right: 10px; width: 120px; border-radius: 10px; background: #1c2550; padding: 6px; display: grid; gap: 4px; font-size: 10.5px; text-align: left; }
.ill .menu3 div { padding: 5px 7px; border-radius: 6px; color: #c9d6f7; }
.ill .menu3 div.hl2 { background: rgba(255,210,94,.18); outline: 2px solid var(--gold); color: #fff; font-weight: 700; }
.ill .chrome { position: absolute; top: 10px; left: 10px; right: 10px; height: 26px; border-radius: 13px; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: flex-end; padding: 0 8px; color: #8fb5ff; }
.warn-box { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(150deg, rgba(255,160,40,.2), rgba(255,120,20,.06)); border: 1px solid rgba(255,170,60,.6); color: #ffe2b8; margin-bottom: 16px; text-align: left; }
.warn-box .ic { color: #ffb347; width: 26px; height: 26px; }
.install-cta { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 8px 0 4px; text-align: center; }
.installed-note { padding: 12px 16px; border-radius: 14px; background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.5); color: #b8f5cf; text-align: center; }
.qr-box { display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap; }
.qr { width: 196px; height: 196px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 4px rgba(255,210,94,.6), 0 16px 34px rgba(0,0,0,.5); display: grid; place-items: center; }
.qr img, .qr svg { width: 100%; height: 100%; image-rendering: pixelated; }
.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feat .panel { padding: 20px; }
.feat .tile3d { margin-bottom: 14px; }
.feat b { display: block; font-size: 17px; margin-bottom: 6px; }
.feat p { margin: 0; color: var(--mute); font-size: 14px; }
.curr { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.curr .mcard { box-shadow: 0 5px 0 rgba(4,8,22,.9), 0 10px 20px rgba(0,0,0,.35); }
.curr .mcard p { margin: 0; font-size: 12.5px; color: var(--mute); }
.cert-show { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: center; }
.cert-show .cert-frame:nth-child(1) { transform: rotate(-2deg); }
.cert-show .cert-frame:nth-child(2) { transform: rotate(2deg); }
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { padding: 16px 18px; }
.faq details p { margin: 10px 0 0; color: var(--mute); }
.lfoot { padding: 34px 16px calc(var(--sab) + 34px); text-align: center; color: var(--dim); font-size: 13px; border-top: 1px solid var(--line); margin-top: 30px; }
.lfoot b { color: var(--gold); }
.lfoot .brand { justify-content: center; margin-bottom: 10px; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; gap: 30px; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero .cta, .hero .hstat { justify-content: center; }
  .hero .cta .b3d { flex: 1 1 100%; }
  .phone { width: 250px; height: 510px; transform: none; animation: float 6s ease-in-out infinite; }
  .cert-show { grid-template-columns: 1fr; }
  .lnav .hide-sm { display: none; }
}
@media (max-width: 430px) { .brand small { font-size: 9.5px; } .brand .bw { display: none; } }
@media (max-width: 380px) { .h-display { font-size: 28px; } .acts { gap: 10px; } .act { padding: 14px 12px 12px; } .qtext { font-size: 17.5px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media print { body * { visibility: hidden; } .cert-frame, .cert-frame * { visibility: visible; } .cert-frame { position: fixed; inset: 0; box-shadow: none; padding: 0; background: none; } }
