/* Ba game ôn tập Unit mới: Đấu Boss (.bs), Bay Qua Cột (.fl), Bản Đồ 81 Kiếp Nạn (.mp). Phẳng, không emoji, hợp chế độ tối. */

/* ===== Đấu Boss ===== */
.bs { position: relative; }
.bs.flash::after { content: ""; position: absolute; inset: -4px; border-radius: 16px; pointer-events: none; box-shadow: inset 0 0 0 3px var(--bad), inset 0 0 40px rgba(196, 80, 75, .35); animation: bsflash .5s ease-out forwards; }
@keyframes bsflash { from { opacity: 1; } to { opacity: 0; } }
.bs-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.bs-name { font-size: 1.1rem; color: var(--red); }
.bs-sp { position: absolute; right: 10px; bottom: 6px; max-width: 46%; font-size: .75rem; color: var(--muted); opacity: 0; transition: opacity .2s; text-align: right; }
.bs-sp.on { opacity: 1; color: var(--bad); font-weight: 600; }
.bs-hp { position: relative; height: 14px; border-radius: 7px; background: var(--line); overflow: hidden; border: 1px solid var(--line); }
.bs-hp i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #c4504b, #e0953a); transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.bs-hp u { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--card); opacity: .7; text-decoration: none; }
.bs-stage { position: relative; background: var(--sky); border: 1px solid var(--line); border-radius: 16px; margin: 8px 0; padding: 8px 0 2px; display: flex; justify-content: center; overflow: hidden; }
.bs-boss { position: relative; width: min(34vw, 150px); animation: bsbob 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes bsbob { 50% { transform: translateY(-5px); } }
.bs-svg { display: block; width: 100%; height: auto; overflow: visible; }
.bs-svg .e-h, .bs-svg .m-a, .bs-svg .m-h { display: none; }
.bs-boss.hurt { animation: bshurt .7s; }
.bs-boss.hurt .e-n { display: none; } .bs-boss.hurt .e-h { display: inline; }
.bs-boss.hurt .m-n { display: none; } .bs-boss.hurt .m-h { display: inline; }
.bs-boss.atk { animation: bsatk .8s; }
.bs-boss.atk .m-n { display: none; } .bs-boss.atk .m-a { display: inline; }
.bs-boss.rage .pu { fill: #c4281f; }
.bs-boss.dead { animation: none; transform: rotate(14deg) translateY(14px) scale(.92); opacity: .35; filter: grayscale(.8); transition: all .9s ease-out; }
@keyframes bshurt { 0% { transform: translateX(0); } 15% { transform: translateX(-12px) rotate(-4deg); } 35% { transform: translateX(10px) rotate(3deg); } 55% { transform: translateX(-6px); } 100% { transform: none; } }
@keyframes bsatk { 0% { transform: none; } 30% { transform: translateY(12px) scale(1.14); } 55% { transform: translateY(12px) scale(1.14); } 100% { transform: none; } }
.bs-dmg { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); font-weight: 800; font-size: 1.7rem; color: var(--red); opacity: 0; pointer-events: none; text-shadow: 0 1px 0 var(--card); }
.bs-dmg.crit { font-size: 2.2rem; color: var(--gold); }
.bs-dmg.go { animation: bsdmg .9s ease-out forwards; }
@keyframes bsdmg { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -6px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -44px) scale(1); } }
.bs-me { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; min-height: 28px; }
.bs-combo { position: absolute; left: 10px; top: 8px; font-weight: 700; color: var(--gold); }
.bs-skills { margin-top: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bs-skills button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; min-height: 64px; border-radius: 12px; line-height: 1.2; }
.bs-skills .ic { width: 1.5rem; height: 1.5rem; }
.bs-skills b { font-size: .84rem; } .bs-skills small { font-size: .7rem; color: var(--muted); }
.bs-skills button.used { opacity: .35; }
.bs-q.fog .py { filter: blur(6px); user-select: none; transition: filter .3s; }
.opts.swap { animation: bsswap .4s; }
@keyframes bsswap { 0% { opacity: .2; transform: scale(.97); } 100% { opacity: 1; transform: none; } }
.bs .opt { min-height: 56px; transition: transform .1s; } .bs .opt:active:not(:disabled) { transform: scale(.97); }
@media (max-width: 420px) { .bs-boss { width: 32vw; } .bs-name { font-size: 1rem; } }
@media (prefers-reduced-motion: reduce) { .bs-boss, .bs-boss.hurt, .bs-boss.atk { animation: none; } }

/* ===== Bay Qua Cột ===== */
.fl-hud { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-weight: 600; }
.fl-q { min-height: 96px; padding: 10px 12px; position: relative; }
.fl-q .big { font-size: 2rem; } .fl-q .zhline { font-size: 1.5rem; }
.fl-q .kind { position: absolute; top: 4px; left: 10px; margin: 0; }
.fl-spk { position: absolute; right: 8px; top: 8px; width: 52px; height: 52px; font-size: 1.4rem; }
.fl-spk .ic { width: 1.6rem; height: 1.6rem; }
.fl-wrap { position: relative; margin-top: 8px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; line-height: 0; }
.fl-wrap canvas { display: block; width: 100%; touch-action: none; }
.fl-go { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; padding-bottom: 22px; line-height: 1.3; background: linear-gradient(transparent 40%, rgba(0, 0, 0, .28)); color: #fff; text-align: center; transition: opacity .25s; pointer-events: none; }
.fl-go b { font-size: 1.35rem; padding: 10px 26px; border-radius: 28px; background: var(--red); animation: flpulse 1.4s ease-in-out infinite; }
.fl-go small { padding: 0 20px; font-size: .8rem; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.fl-go.off { opacity: 0; }
@keyframes flpulse { 50% { transform: scale(1.06); } }
.fl-msg { min-height: 2.6em; line-height: 1.3; font-size: .95rem; }
@media (prefers-reduced-motion: reduce) { .fl-go b { animation: none; } }

/* ===== Bản Đồ 81 Kiếp Nạn ===== */
.mp-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-weight: 600; }
.mp-g { margin-left: 8px; color: var(--gold); font-size: .9rem; }
.mp-map { background: var(--sky); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.mp-map svg { display: block; width: 100%; height: auto; }
.mp-hill { fill: rgba(90, 60, 30, .08); }
html[data-theme="dark"] .mp-hill { fill: rgba(255, 255, 255, .05); }
.mp-road { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2 9; opacity: .8; }
.mp-n circle { fill: var(--card); stroke: var(--line); stroke-width: 3; transition: fill .3s, stroke .3s; }
.mp-n text { fill: var(--fg); font-weight: 700; font-size: 15px; }
.mp-n .ic { stroke: var(--fg); fill: none; color: var(--fg); }
.mp-n.mon circle, .mp-n.boss circle { stroke: var(--bad); }
.mp-n.boss circle { stroke-width: 4; }
.mp-n.chest circle { stroke: var(--gold); } .mp-n.inn circle { stroke: var(--ok); }
.mp-n.done circle { fill: var(--ok); stroke: var(--ok); }
.mp-n.done text, .mp-n.done .ic { fill: #fff; stroke: #fff; color: #fff; } .mp-n.done text { stroke: none; }
.mp-n.now circle { stroke: var(--red); stroke-width: 4; animation: mppulse 1.6s ease-in-out infinite; }
@keyframes mppulse { 50% { stroke-width: 7; opacity: .75; } }
#tk { transition: transform .7s cubic-bezier(.4, .1, .2, 1); }
.mp-leg { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 8px 0; font-size: .78rem; color: var(--muted); }
.mp-leg span { display: inline-flex; align-items: center; gap: 4px; } .mp-leg .ic { width: 1rem; height: 1rem; }
.mp-act { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px; min-height: 150px; }
.mp-eh { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mp-eh small { display: block; color: var(--muted); }
.mp-ei { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); font-size: 1.3rem; }
.mp-ei .ic { width: 1.5rem; height: 1.5rem; } .mp-ei.bad { color: var(--bad); border-color: var(--bad); } .mp-ei.ok { color: var(--ok); border-color: var(--ok); }
.mp-go { width: 100%; margin-top: 4px; }
.mp-q { min-height: 110px; }
.mp-mon { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.mp-mon .amon { width: 64px; height: 64px; flex: none; }
.mp-pips { display: flex; gap: 5px; margin-top: 4px; }
.mp-pips i { width: 20px; height: 8px; border-radius: 4px; background: var(--bad); transition: background .3s; } .mp-pips i.off { background: var(--line); }
.mp-chest { display: grid; place-items: center; margin: 6px 0 12px; color: var(--gold); }
.mp-chest .ic { width: 84px; height: 84px; transition: transform .4s; } .mp-chest.open .ic { transform: translateY(-6px) scale(1.12) rotate(-4deg); }
.mp-res { text-align: center; font-weight: 600; margin: 8px 0; }
.mp .opt { min-height: 54px; }
@media (prefers-reduced-motion: reduce) { .mp-n.now circle { animation: none; } #tk { transition: none; } }