/* ÔnChắc — lớp hiệu ứng "tương lai" cho mọi trang trừ quản trị (fx.js đi kèm).
   Nền tối olive + ánh lime, kính mờ, chuyển động nhẹ. Mọi chuyển động tắt khi prefers-reduced-motion. */

/* Vùng tối dùng chung: định nghĩa lại token để các thành phần sẵn có (card, badge, checks…) tự đổi màu */
.fx-dark, .fx-page .site-header, .fx-page .site-footer {
  --brand: var(--lime); --on-brand: var(--on-glow); --brand-600: var(--d-brand-600); --brand-50: var(--d-brand-50); --brand-100: var(--d-brand-100);
  --ink: var(--fx-ink); --ink-2: var(--fx-ink-2); --muted: var(--fx-muted); --line: rgb(var(--glow-rgb) / .12); --line-strong: rgb(var(--glow-rgb) / .2);
  --surface: rgb(var(--night-2-rgb) / .62); --surface-2: rgba(255, 255, 255, .06);
  --ok: #47cd89; --ok-bg: rgba(71, 205, 137, .12); --bad: #f97066; --bad-bg: rgba(249, 112, 102, .12);
  --shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 24px 60px rgba(0, 0, 0, .45);
}
.fx-dark {
  position: relative; isolation: isolate; color: var(--ink); background: var(--night); color-scheme: dark;
}

/* ── Nền chuyển động: cực quang + lưới phối cảnh + hạt sáng (canvas) ── */
.fx-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fx-aurora { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; mix-blend-mode: screen; will-change: transform; }
.fx-aurora.a1 { width: 620px; height: 620px; left: -160px; top: -220px; background: radial-gradient(closest-side, var(--lime), transparent 70%); animation: fx-drift1 18s ease-in-out infinite alternate; opacity: .32; }
.fx-aurora.a2 { width: 560px; height: 560px; right: -140px; top: 10%; background: radial-gradient(closest-side, var(--glow-2), transparent 70%); animation: fx-drift2 22s ease-in-out infinite alternate; opacity: .28; }
.fx-aurora.a3 { width: 520px; height: 520px; left: 30%; bottom: -300px; background: radial-gradient(closest-side, var(--glow-3), transparent 70%); animation: fx-drift3 26s ease-in-out infinite alternate; opacity: .3; }
@keyframes fx-drift1 { to { transform: translate(180px, 120px) scale(1.15); } }
@keyframes fx-drift2 { to { transform: translate(-160px, 140px) scale(.9); } }
@keyframes fx-drift3 { to { transform: translate(-120px, -160px) scale(1.2); } }
.fx-grid {
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 60%;
  background-image: linear-gradient(rgb(var(--glow-rgb) / .14) 1px, transparent 1px), linear-gradient(90deg, rgb(var(--glow-rgb) / .14) 1px, transparent 1px);
  background-size: 56px 56px; transform: perspective(520px) rotateX(62deg); transform-origin: center top;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 60%, transparent);
  animation: fx-grid 6s linear infinite;
}
@keyframes fx-grid { to { background-position: 0 56px, 0 0; } }
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-noise { position: absolute; inset: 0; opacity: .06; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ── Hero trang chủ ── */
.hero.fx-dark { border-bottom: 0; padding: 96px 0 104px; }
.hero.fx-dark::before { display: none; }
.hero.fx-dark::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgb(var(--glow-rgb) / .5), transparent); }
.fx-dark .eyebrow { background: rgb(var(--glow-rgb) / .08); border-color: rgb(var(--glow-rgb) / .25); color: var(--fx-hi); backdrop-filter: blur(8px); }
.fx-dark .eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgb(var(--glow-rgb) / .6); animation: fx-ping 2s infinite; font-size: 0; }
@keyframes fx-ping { 70% { box-shadow: 0 0 0 10px rgb(var(--glow-rgb) / 0); } 100% { box-shadow: 0 0 0 0 rgb(var(--glow-rgb) / 0); } }
.hero.fx-dark h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.fx-grad {
  background: linear-gradient(100deg, var(--lime) 0%, var(--glow-2) 35%, var(--glow-3) 65%, var(--lime) 100%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-shine 6s linear infinite;
}
@keyframes fx-shine { to { background-position: -220% 0; } }
.fx-rotate { display: grid; justify-items: start; }
.fx-rotate > span { grid-area: 1 / 1; transition: opacity .5s, transform .5s, filter .5s; }
.fx-rotate > span:not(.on) { opacity: 0; transform: translateY(.45em); filter: blur(6px); }
.fx-rotate > span.out { opacity: 0; transform: translateY(-.45em); filter: blur(6px); }
.hero.fx-dark .lead { color: var(--fx-ink-2); }
.fx-dark .btn-primary { background: var(--lime); color: var(--on-glow); box-shadow: 0 0 0 1px rgb(var(--glow-rgb) / .4), 0 10px 30px -6px rgb(var(--glow-rgb) / .55); }
.fx-dark .btn-primary:hover:not(:disabled) { background: var(--glow-hover); box-shadow: 0 0 0 1px rgb(var(--glow-rgb) / .6), 0 14px 40px -6px rgb(var(--glow-rgb) / .75); }
.fx-dark .btn-ghost { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .16); color: var(--fx-ink); backdrop-filter: blur(8px); }
.fx-dark .btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.fx-dark .hero-proof { color: var(--fx-ink-2); }
.fx-dark .stack-thumbs .mono { border-color: var(--night); }

/* Thẻ câu hỏi mẫu: kính mờ, viền phát sáng, nghiêng theo chuột, tự "làm bài" */
.fx-glass { background: rgb(var(--night-2-rgb) / .55) !important; border: 1px solid rgb(var(--glow-rgb) / .18) !important; backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
.fx-tilt { transform-style: preserve-3d; transition: transform .25s ease-out; will-change: transform; }
.fx-glow { position: relative; }
.fx-glow::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--fx-a, 0deg), transparent 0 60%, var(--lime) 75%, var(--glow-2) 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: fx-spin 5s linear infinite;
}
@property --fx-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes fx-spin { to { --fx-a: 360deg; } }
.demo.fx-play .demo-opt { transition: border-color .35s, background .35s, transform .35s; }
.demo.fx-play .demo-opt .L { transition: background .35s, color .35s; }
.demo.fx-play:not(.s-answer) .demo-opt.ok, .demo.fx-play:not(.s-answer) .demo-opt.bad { border-color: var(--line-strong); background: var(--surface-2); }
.demo.fx-play:not(.s-answer) .demo-opt.ok .L, .demo.fx-play:not(.s-answer) .demo-opt.bad .L { background: var(--surface-2); color: var(--ink-2); }
.demo.fx-play .demo-opt.pick { transform: translateX(6px); }
.demo.fx-play .demo-explain { transition: opacity .5s, transform .5s, max-height .6s; max-height: 200px; overflow: hidden; }
.demo.fx-play:not(.s-explain) .demo-explain { opacity: 0; transform: translateY(8px); max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: 0; }
.fx-cursor { position: absolute; width: 22px; height: 22px; pointer-events: none; z-index: 3; opacity: 0; transition: left .7s cubic-bezier(.6, .1, .2, 1), top .7s cubic-bezier(.6, .1, .2, 1), opacity .3s; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); }
.fx-cursor.click { animation: fx-click .3s; }
@keyframes fx-click { 50% { transform: scale(.8); } }
.fx-dark .hero-pic { border: 1px solid rgb(var(--glow-rgb) / .12); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); animation: fx-float 7s ease-in-out infinite; }
.fx-dark .hero-pic:nth-child(2) { animation-delay: -2s; }
.fx-dark .hero-pic:nth-child(3) { animation-delay: -4s; }
.fx-dark .hero-pic:nth-child(4) { animation-delay: -5.5s; }
.fx-dark .hero-pic img { opacity: .8; }
@keyframes fx-float { 50% { transform: translateY(-10px); } }

/* Dải chữ chạy dưới hero */
.fx-marquee { position: relative; overflow: hidden; padding: 14px 0; background: var(--night); border-bottom: 1px solid rgb(var(--glow-rgb) / .12); color: var(--fx-muted); font-weight: 600; font-size: .9rem; letter-spacing: .02em;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.fx-marquee-track { display: flex; gap: 40px; width: max-content; animation: fx-marquee 40s linear infinite; }
.fx-marquee:hover .fx-marquee-track { animation-play-state: paused; }
.fx-marquee span { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.fx-marquee span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.fx-marquee b { color: var(--fx-hi); }
@keyframes fx-marquee { to { transform: translateX(-50%); } }

/* ── Hiện dần khi cuộn ── */
.fx-js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.fx-js [data-reveal].in { opacity: 1; transform: none; }

/* Thẻ tính năng / bước: ánh đèn theo chuột */
.fx-spot { position: relative; overflow: hidden; }
.fx-spot::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--lime) 22%, transparent), transparent 70%); }
.fx-spot:hover::after { opacity: 1; }
.feature.fx-spot, .step.fx-spot { transition: transform .3s; }
.step.fx-spot:hover { transform: translateY(-4px); }
.feature h3::before { content: ""; display: block; width: 28px; height: 3px; border-radius: 3px; margin-bottom: 14px; background: linear-gradient(90deg, var(--brand-600), var(--glow-2)); }

/* Dải kêu gọi cuối trang: nền tối động */
.cta-band.fx-dark { overflow: hidden; background: var(--night) !important; border: 1px solid rgb(var(--glow-rgb) / .2) !important; padding: 72px 32px; }
.cta-band.fx-dark h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.cta-band.fx-dark .btn-accent { box-shadow: 0 10px 40px -6px rgb(var(--glow-rgb) / .7); }

/* ── Trình phát lofi nổi ── */
.lofi {
  position: fixed; left: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px; color: var(--fx-ink); font-size: .85rem;
  background: rgb(var(--night-rgb) / .78); border: 1px solid rgb(var(--glow-rgb) / .22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .35); transition: transform .3s, box-shadow .3s;
  animation: fx-pop .6s cubic-bezier(.2, 1.4, .4, 1) .8s both;
}
@keyframes fx-pop { from { opacity: 0; transform: translateY(20px) scale(.9); } }
.lofi.playing { box-shadow: 0 12px 34px rgba(0, 0, 0, .35), 0 0 0 1px rgb(var(--glow-rgb) / .35), 0 0 30px -4px rgb(var(--glow-rgb) / .5); }
.lofi-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--lime); color: var(--on-glow); flex: none; position: relative; }
.lofi-btn svg { width: 16px; height: 16px; }
.lofi-disc { position: absolute; inset: -4px; border-radius: 50%; border: 2px dashed rgb(var(--glow-rgb) / .5); opacity: 0; }
.lofi.playing .lofi-disc { opacity: 1; animation: fx-rot 6s linear infinite; }
@keyframes fx-rot { to { transform: rotate(360deg); } }
.lofi-info { display: grid; line-height: 1.25; min-width: 0; }
.lofi-info b { font-size: .84rem; white-space: nowrap; }
.lofi-info small { color: var(--fx-muted); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.lofi-eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.lofi-eq i { width: 3px; height: 4px; border-radius: 2px; background: var(--lime); }
.lofi.playing .lofi-eq i { animation: fx-eq .9s ease-in-out infinite alternate; }
.lofi.playing .lofi-eq i:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; }
.lofi.playing .lofi-eq i:nth-child(3) { animation-delay: -.6s; animation-duration: 1.1s; }
.lofi.playing .lofi-eq i:nth-child(4) { animation-delay: -.15s; animation-duration: .8s; }
@keyframes fx-eq { from { height: 3px; } to { height: 16px; } }
.lofi-vol { width: 0; opacity: 0; transition: width .3s, opacity .3s; accent-color: var(--lime); }
.lofi:hover .lofi-vol, .lofi:focus-within .lofi-vol { width: 80px; opacity: 1; }
.lofi-hint { position: absolute; left: 0; bottom: calc(100% + 10px); white-space: nowrap; padding: 6px 12px; border-radius: 10px; font-size: .78rem;
  background: var(--lime); color: var(--on-glow); font-weight: 600; animation: fx-pop .5s 2.2s both, fx-float 3s ease-in-out 3s infinite; }
.lofi-hint::after { content: ""; position: absolute; left: 22px; top: 100%; border: 6px solid transparent; border-top-color: var(--lime); }
@media (max-width: 640px) { .lofi { left: 12px; bottom: 12px; } .lofi-info small { max-width: 110px; } .lofi-vol { display: none; } }

/* ── Trang đăng nhập ── */
.auth-wrap.fx-auth { position: relative; isolation: isolate; }
.fx-auth .auth-side.fx-dark { background: var(--night); overflow: hidden; }
.fx-auth .auth-side h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1.1; color: #fff; }
.fx-auth .auth-side p { color: var(--fx-ink-2); opacity: 1; }
.fx-auth .auth-side .checks li { color: var(--fx-hi); }
.fx-orbit { position: relative; width: 260px; height: 260px; margin: 0 0 34px; }
.fx-orbit .core { position: absolute; inset: 50% auto auto 50%; width: 84px; height: 84px; margin: -42px; border-radius: 24px; display: grid; place-items: center;
  background: rgb(var(--glow-rgb) / .1); border: 1px solid rgb(var(--glow-rgb) / .35); box-shadow: 0 0 60px -6px rgb(var(--glow-rgb) / .6); animation: fx-float 5s ease-in-out infinite; }
.fx-orbit .core img { width: 48px; height: 48px; }
.fx-orbit .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgb(var(--glow-rgb) / .22); animation: fx-rot 30s linear infinite; }
.fx-orbit .ring.r2 { inset: 40px; animation-duration: 20s; animation-direction: reverse; }
.fx-orbit .ring span { position: absolute; left: 50%; top: 0; width: 0; height: 0; }
.fx-orbit .ring b { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  background: var(--night-2); border: 1px solid rgb(var(--glow-rgb) / .35); color: var(--lime); white-space: nowrap; box-shadow: 0 0 14px -4px rgb(var(--glow-rgb) / .6); }
.fx-orbit .ring span:nth-child(2) { top: 100%; }
.fx-orbit .ring span:nth-child(3) { top: 50%; left: 0; }
.fx-orbit .ring span:nth-child(4) { top: 50%; left: 100%; }
.fx-orbit .ring.r1 span { animation: fx-rot 30s linear infinite reverse; }
.fx-orbit .ring.r2 span { animation: fx-rot 20s linear infinite; }
.fx-orbit .ring.r2, .fx-orbit .ring.r2 span { animation-delay: -2.5s; }
.fx-auth .auth-main { position: relative; overflow: hidden; }
.fx-auth .auth-main::before, .fx-auth .auth-main::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .45; pointer-events: none; }
.fx-auth .auth-main::before { width: 380px; height: 380px; right: -120px; top: -100px; background: radial-gradient(closest-side, color-mix(in srgb, var(--lime) 70%, transparent), transparent); animation: fx-drift2 16s ease-in-out infinite alternate; }
.fx-auth .auth-main::after { width: 320px; height: 320px; left: -100px; bottom: -120px; background: radial-gradient(closest-side, color-mix(in srgb, var(--glow-3) 45%, transparent), transparent); animation: fx-drift1 20s ease-in-out infinite alternate; }
.fx-auth .auth-card { position: relative; padding: 32px 30px; border-radius: 22px; background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); width: min(440px, 100%);
  animation: fx-rise .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fx-rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.fx-auth form:not([hidden]) { animation: fx-swap .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes fx-swap { from { opacity: 0; transform: translateX(14px); filter: blur(4px); } }
.fx-auth .auth-card h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; }
.fx-auth .input { transition: border-color .2s, box-shadow .25s, background .2s; }
.fx-auth .input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 35%, transparent); }
.fx-auth .btn-primary { position: relative; overflow: hidden; }
.fx-auth .btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: fx-sweep 3.5s ease-in-out infinite; }
@keyframes fx-sweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.fx-auth .field { animation: fx-rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.fx-auth .field:nth-of-type(1) { animation-delay: .08s; } .fx-auth .field:nth-of-type(2) { animation-delay: .16s; }
.fx-auth .field:nth-of-type(3) { animation-delay: .24s; } .fx-auth .field:nth-of-type(4) { animation-delay: .32s; }
.fx-auth .auth-card.shake { animation: fx-shake .4s; }
@keyframes fx-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (max-width: 860px) { .fx-auth .auth-card { padding: 26px 20px; } }

@media (prefers-reduced-motion: reduce) {
  .fx-dark *, .fx-dark::before, .fx-auth *, .fx-auth *::before, .fx-auth *::after, .fx-marquee-track, .lofi, .lofi *, .fx-glow::before { animation: none !important; }
  .fx-js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .fx-tilt { transform: none !important; }
}
.fx-marquee:has(.fx-marquee-track:empty) { display: none; }

/* ── Navbar kính tối (trang có fx.js) ── */
.fx-page .site-header {
  background: rgb(var(--night-rgb) / .62); border-bottom: 1px solid rgb(var(--glow-rgb) / .1); color: var(--ink); color-scheme: dark;
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); transition: background .3s, box-shadow .3s;
}
.fx-page .site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(var(--glow-rgb) / .55), rgb(var(--glow-2-rgb) / .45), transparent); background-size: 200% 100%; animation: fx-shine 8s linear infinite; }
.fx-page .site-header.scrolled { background: rgb(var(--night-rgb) / .86); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); }
.fx-page .logo { color: #fff; }
.fx-page .logo img { filter: drop-shadow(0 0 10px rgb(var(--glow-rgb) / .45)); transition: transform .4s cubic-bezier(.2, 1.6, .4, 1); }
.fx-page .logo:hover img { transform: rotate(-8deg) scale(1.08); }
.fx-page .logo span b { background: linear-gradient(100deg, var(--lime), var(--glow-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fx-page .nav { position: relative; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); }
.fx-page .nav a { position: relative; z-index: 1; border-radius: 999px; padding: 6px 14px; color: var(--fx-ink-2); transition: color .25s; }
.fx-page .nav a:hover, .fx-page .nav a[aria-current="page"] { color: #fff; background: transparent; }
.fx-page .nav a.on { color: var(--lime); }
.fx-nav-pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; opacity: 0; pointer-events: none;
  background: rgb(var(--glow-rgb) / .1); box-shadow: inset 0 0 0 1px rgb(var(--glow-rgb) / .25), 0 0 18px -6px rgb(var(--glow-rgb) / .7);
  transition: transform .35s cubic-bezier(.3, 1.3, .5, 1), width .35s cubic-bezier(.3, 1.3, .5, 1), opacity .25s; }
.fx-page .icon-btn { color: var(--fx-ink-2); }
.fx-page .icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--lime); }
.fx-page .header-actions .btn-quiet { color: var(--fx-hi); }
.fx-page .header-actions .btn-quiet:hover:not(:disabled) { background: rgba(255, 255, 255, .08); color: #fff; }
.fx-page .header-actions .btn-primary { background: var(--lime); color: var(--on-glow); box-shadow: 0 0 0 1px rgb(var(--glow-rgb) / .4), 0 6px 22px -6px rgb(var(--glow-rgb) / .7); position: relative; overflow: hidden; }
.fx-page .header-actions .btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: fx-sweep 4s ease-in-out infinite; }
.fx-page .user-chip { background: rgba(255, 255, 255, .05); border-color: rgb(var(--glow-rgb) / .2); color: var(--fx-ink); }
.fx-page .user-chip:hover { background: rgba(255, 255, 255, .1); }
.fx-page .site-header .menu { background: var(--night-2); border-color: rgb(var(--glow-rgb) / .16); }
.fx-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70; pointer-events: none; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--lime), var(--glow-2), var(--glow-3)); box-shadow: 0 0 10px rgb(var(--glow-rgb) / .8); }
@media (max-width: 860px) {
  .fx-page .nav { display: none; position: absolute; top: var(--header-h); left: 12px; right: 12px; padding: 8px; border-radius: 16px; background: var(--night-2); border: 1px solid rgb(var(--glow-rgb) / .16); box-shadow: 0 20px 50px rgba(0, 0, 0, .55); }
  .fx-page .nav.open { display: flex; animation: fx-rise .3s cubic-bezier(.2, .8, .2, 1); }
  .fx-page .nav a { border-radius: 10px; padding: 12px 14px; }
  .fx-page .nav a:hover { background: rgba(255, 255, 255, .06); }
  .fx-nav-pill { display: none; }
}

/* ── Vùng form đăng nhập: lưới chấm, đèn theo chuột, thẻ nổi ── */
.fx-auth .auth-main { background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 16%, transparent) 1px, transparent 0) 0 0 / 22px 22px; }
.fx-auth .auth-main > .fx-spot-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 70%) var(--my, 30%), color-mix(in srgb, var(--lime) 30%, transparent), transparent 70%); }
.fx-auth .auth-main > .fx-fade { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at center, transparent 35%, var(--bg) 85%); }
.fx-auth .auth-card.fx-glow::before { animation-duration: 7s; }
.fx-floaters { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.fx-chip { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; font-size: .8rem; line-height: 1.3; color: var(--ink);
  background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fx-rise .8s cubic-bezier(.2, .8, .2, 1) both, fx-float 6s ease-in-out infinite; }
.fx-chip small { display: block; color: var(--muted); font-size: .72rem; }
.fx-chip .ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--olive); color: var(--on-deep); font-weight: 800; font-size: .78rem; }
.fx-chip .ic svg { width: 16px; height: 16px; }
.fx-chip .bar { display: block; width: 90px; height: 5px; border-radius: 5px; background: var(--surface-2); margin-top: 5px; overflow: hidden; }
.fx-chip .bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--glow-2), var(--lime)); animation: fx-fill 2.4s 1s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes fx-fill { to { width: 72%; } }
/* Thẻ nổi bám góc khung form: c1/c4 chỉ đè lên phần đệm trên/dưới của khung, c2/c3 nằm hẳn ngoài khi màn rộng */
.fx-chip { white-space: nowrap; z-index: 2; }
.fx-chip.c1 { left: -64px; top: -30px; animation-delay: .5s, 0s; }
.fx-chip.c4 { right: -56px; bottom: -28px; animation-delay: 1.1s, -1s; }
.fx-chip.c2 { left: calc(100% + 36px); top: 34%; animation-delay: .7s, -2s; }
.fx-chip.c3 { right: calc(100% + 36px); top: 60%; animation-delay: .9s, -4s; }
@media (max-width: 1699px) { .fx-chip.c2, .fx-chip.c3 { display: none; } }
.fx-chip .typing { display: inline-flex; gap: 3px; margin-top: 4px; }
.fx-chip .typing b { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: fx-dot 1.2s infinite; }
.fx-chip .typing b:nth-child(2) { animation-delay: .2s; }
.fx-chip .typing b:nth-child(3) { animation-delay: .4s; }
@keyframes fx-dot { 30% { transform: translateY(-4px); background: var(--brand-600); } }
.fx-auth .auth-card { z-index: 1; }
.fx-auth .auth-card > .fx-floaters ~ form, .fx-auth .auth-card > .fx-trust { position: relative; z-index: 1; }
.fx-trust { display: flex; justify-content: space-around; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line-strong); font-size: .76rem; color: var(--muted); text-align: center; }
.fx-trust b { display: block; font-size: 1.1rem; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
@media (max-width: 1099px) { .fx-floaters { display: none; } }
/* Trang đăng nhập: trình phát nằm góc phải để không che chữ cột trái */
.lofi.right { left: auto; right: 16px; }
.lofi.right .lofi-hint { left: auto; right: 0; }
.lofi.right .lofi-hint::after { left: auto; right: 22px; }
@media (prefers-reduced-motion: reduce) {
  .fx-page .site-header::after, .fx-page .header-actions .btn-primary::after, .fx-chip, .fx-chip * { animation: none !important; }
  .fx-chip .bar i { width: 72%; }
}

/* ── Footer tối ── */
.fx-page .site-footer { position: relative; margin-top: 80px; background: var(--night); border-top: 0; color: var(--ink); color-scheme: dark; }
.fx-page .site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgb(var(--glow-rgb) / .55), rgb(var(--glow-2-rgb) / .45), transparent); background-size: 200% 100%; animation: fx-shine 8s linear infinite; }
.fx-page .site-footer a:hover { color: var(--lime); }

/* ── Đầu trang bộ đề / combo (full-width) ── */
.pkg-head.fx-dark { background: var(--night); border-bottom: 0; padding: 40px 0 48px; overflow: hidden; }
.pkg-head.fx-dark::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgb(var(--glow-rgb) / .5), transparent); }
.pkg-head.fx-dark h1 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.pkg-head.fx-dark .crumbs a { color: var(--ink-2); }
.pkg-head.fx-dark .crumbs a:hover { color: var(--lime); }
.fx-float { translate: 0 0; animation: fx-floaty 7s ease-in-out infinite; }
@keyframes fx-floaty { 50% { translate: 0 -8px; } }
.pkg-head.fx-dark .pkg-cover { border: 1px solid rgb(var(--glow-rgb) / .16); box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 60px -20px rgb(var(--glow-rgb) / .45); }

/* ── Băng rôn đầu trang (tài khoản, hỗ trợ, thanh toán, chính sách, 404…) ── */
.page-head.fx-banner, .pay-head.fx-banner { border-radius: 22px; padding: 40px 36px; margin: 24px 0 28px; overflow: hidden;
  border: 1px solid rgb(var(--glow-rgb) / .16); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45); }
.fx-banner h1 { color: #fff; font-weight: 800; letter-spacing: -.03em; font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 8px; }
.fx-banner p { max-width: 720px; }
.fx-banner p + p { margin-top: 8px; }
.fx-banner .crumbs a { color: var(--ink-2); }
main.empty.fx-banner { padding: 80px 24px !important; margin-top: 32px; margin-bottom: 32px; border-radius: 22px; overflow: hidden; border: 1px solid rgb(var(--glow-rgb) / .16); }
main.empty.fx-banner h1 { font-size: clamp(1.8rem, 4vw, 2.6rem) !important; }
main.wrap.fx-full { overflow: hidden; }
@media (max-width: 640px) { .page-head.fx-banner, .pay-head.fx-banner { padding: 28px 20px; border-radius: 18px; margin-top: 16px; } }
@media (prefers-reduced-motion: reduce) { .fx-float, .fx-page .site-footer::before { animation: none !important; } }

/* ── Trình phát lofi thu gọn: chỉ còn tab nhỏ sát mép trái (mép phải ở trang đăng nhập) ── */
.lofi-hide { width: 26px; height: 26px; margin-left: -4px; margin-right: -8px; color: var(--fx-muted); }
.lofi-hide:hover { color: var(--lime); }
.lofi-tab { display: none; }
.lofi.min { left: 0; padding: 0; gap: 0; border-left: 0; border-radius: 0 999px 999px 0; animation: fx-pop .4s cubic-bezier(.2, 1.4, .4, 1) both; }
.lofi.min > :not(.lofi-tab) { display: none; }
.lofi.min .lofi-tab { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 10px; border: 0; border-radius: inherit; background: none; color: var(--lime); cursor: pointer; opacity: .7; transition: opacity .2s, padding .2s; }
.lofi.min .lofi-tab:hover, .lofi.min .lofi-tab:focus-visible, .lofi.min.playing .lofi-tab { opacity: 1; }
.lofi.min .lofi-tab:hover { padding-left: 14px; }
.lofi-tab .lofi-eq { display: none; height: 14px; }
.lofi.min.playing .lofi-tab .lofi-eq { display: flex; }
.lofi.right.min { left: auto; right: 0; border-left: 1px solid rgb(var(--glow-rgb) / .22); border-right: 0; border-radius: 999px 0 0 999px; }
@media (max-width: 640px) { .lofi.min { left: 0; } .lofi.right.min { right: 0; } }

/* ── Chế độ tập trung (trang học): navbar trượt lên và nhường chỗ, nút nổi để hiện lại ── */
.fx-page .site-header { transition: background .3s, box-shadow .3s, transform .35s cubic-bezier(.2, .8, .2, 1), margin .35s cubic-bezier(.2, .8, .2, 1); }
.oc-focus { scroll-padding-top: 16px; }
.oc-focus .site-header { transform: translateY(-100%); margin-bottom: calc(-1 * var(--header-h) - 1px); visibility: hidden; transition: transform .35s cubic-bezier(.2, .8, .2, 1), margin .35s cubic-bezier(.2, .8, .2, 1), visibility 0s .35s; }
.oc-focus .map-card { top: 16px; }
.oc-focus .fx-progress { display: none; }
.fx-unfocus { position: fixed; top: 0; right: 24px; z-index: 55; display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px 6px; border: 1px solid rgb(var(--glow-rgb) / .22); border-top: 0;
  border-radius: 0 0 12px 12px; background: rgb(var(--night-rgb) / .82); color: var(--fx-ink-2); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  transform: translateY(-110%); transition: transform .3s cubic-bezier(.2, .8, .2, 1), color .2s; }
.oc-focus .fx-unfocus { transform: none; transition-delay: .2s; }
.fx-unfocus:hover, .fx-unfocus:focus-visible { color: var(--lime); }
.fx-focus-btn .i { width: 19px; height: 19px; }
@media (max-width: 640px) { .fx-unfocus { right: 12px; } }
@media (prefers-reduced-motion: reduce) { .fx-page .site-header, .oc-focus .site-header, .fx-unfocus { transition: none; } }
