/* Blade stats, the 2-player duel mode and its screens. */

/* ---------- blade stats (collection + 2-player select) ---------- */
.stats { width: 100%; padding: 4px 6px 2px; display: grid; gap: 3px; }
.btype { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--c, var(--muted)); text-align: center; }
.stat { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 6px; }
.stat span { font-size: 10px; font-weight: 700; color: var(--muted); text-align: left; letter-spacing: 0.5px; }
.pips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.pips i { height: 7px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); }
.stat.atk .pips i.on { background: #ff5a5a; box-shadow: 0 0 4px #ff5a5a; }
.stat.def .pips i.on { background: #4da6ff; box-shadow: 0 0 4px #4da6ff; }
.stat.hp .pips i.on { background: #3dff8b; box-shadow: 0 0 4px #3dff8b; }

/* ---------- home: 2 player button ---------- */
.btn-duel { width: 100%; max-width: 420px; font-size: 22px; padding: 12px; border-radius: 18px; background: linear-gradient(180deg, #c06bff, #7a2fe0); color: #fff; box-shadow: 0 5px 0 #4a1590, 0 0 22px rgba(176, 102, 255, 0.45); }
.btn-duel:active { transform: translateY(3px); box-shadow: 0 2px 0 #4a1590; }

/* ---------- 2 player select ---------- */
.duel-select { padding-bottom: calc(96px + var(--sb)); }
.pick-title { text-align: center; font-size: 18px; color: var(--muted); }
.pick-title b { display: block; font-family: var(--head); font-weight: 400; font-size: 34px; color: var(--pc); text-shadow: 0 0 18px var(--pc); }
.pick-prev { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; color: var(--muted); margin-top: 4px; }
.pick-prev img { width: 28px; }
.pick-prev b { color: var(--cyan); }
.pick-hero { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 2px solid var(--pc); border-radius: 20px; padding: 10px 14px; margin: 12px 0; box-shadow: 0 0 20px color-mix(in srgb, var(--pc) 35%, transparent); }
.pick-hero-art { position: relative; width: 120px; aspect-ratio: 1; flex: none; display: grid; place-items: center; }
.pick-hero-art img { width: 90%; position: relative; }
.pick-hero-info { flex: 1; min-width: 0; }
.pick-hero-info > b { font-family: var(--head); font-weight: 400; font-size: 22px; }
.pick-hero-info .stats { padding: 4px 0 0; gap: 6px; }
.pick-hero-info .btype { text-align: left; }
.pick-hero-info .pips i { height: 10px; }
.pick-hero-info .stat span { font-size: 12px; }
.card.pick.sel { border-color: var(--pc); box-shadow: 0 0 18px color-mix(in srgb, var(--pc) 60%, transparent); }
.pick-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(14px + var(--sb)); background: linear-gradient(180deg, rgba(11, 15, 42, 0), rgba(11, 15, 42, 0.96) 35%); display: flex; justify-content: center; z-index: 3; }
.pick-bar .btn { width: 100%; max-width: 420px; }

/* ---------- the duel ---------- */
.lives { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.life { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 2px solid var(--pc); border-radius: 14px; padding: 6px 8px; }
.life.p1 { flex-direction: row-reverse; text-align: right; }
.life img { width: 30px; height: 30px; flex: none; }
.life-info { flex: 1; min-width: 0; }
.life small { display: block; font-family: var(--head); font-size: 13px; color: var(--pc); }
.life-bar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.life-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #3dff8b, #b6ff3a); transition: width 0.5s ease-out; }
.life.p1 .life-bar i { margin-left: auto; }
.life-bar i.low { background: linear-gradient(90deg, #ff3355, #ff8a00); }
.life > b { font-family: var(--head); font-weight: 400; font-size: 20px; min-width: 46px; text-align: center; }
.duel-stage { flex: 1; min-height: 110px; position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 6%; }
.duelist { position: relative; width: clamp(96px, 30vw, 150px); aspect-ratio: 1; display: grid; place-items: center; opacity: 0.75; transition: opacity 0.3s, transform 0.3s; }
.duelist img { width: 84%; position: relative; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.7)); }
.duelist.active { opacity: 1; transform: scale(1.08); }
.duelist.active::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid var(--pc); box-shadow: 0 0 18px var(--pc); animation: pulse 1s infinite; }
.duelist.d0.lunge { animation: lungeR 0.5s cubic-bezier(.5, 0, .5, 1); }
.duelist.d1.lunge { animation: lungeL 0.5s cubic-bezier(.5, 0, .5, 1); }
@keyframes lungeR { 45% { transform: translateX(38vw) scale(1.1); } 100% { transform: scale(1.08); } }
@keyframes lungeL { 45% { transform: translateX(-38vw) scale(1.1); } 100% { transform: scale(1.08); } }
.duelist.boss-hurt img { animation: hurt 0.45s; }
.dmg { position: absolute; top: -8px; left: 50%; transform: translate(-50%, 0); font-family: var(--head); font-size: 30px; color: #fff; text-shadow: 0 3px 0 #5a0016, 0 0 14px #ff3355; opacity: 0; pointer-events: none; z-index: 2; }
.dmg.show { animation: dmgUp 1.2s ease-out forwards; }
.dmg.crit { font-size: 40px; color: #ffe14d; text-shadow: 0 3px 0 #7a3c00, 0 0 18px #ffb300; }
@keyframes dmgUp { 0% { opacity: 0; transform: translate(-50%, 10px) scale(0.5); } 20% { opacity: 1; transform: translate(-50%, -6px) scale(1.2); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -40px) scale(1); } }
.turn-banner { text-align: center; font-family: var(--head); font-size: 22px; color: var(--pc, #fff); text-shadow: 0 0 14px var(--pc, #fff); margin-bottom: 6px; min-height: 26px; }
.duel .qcard { margin-bottom: 12px; padding-top: 6px; flex: none; }
.tier { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1px; padding: 1px 10px; border-radius: 10px; margin-bottom: 2px; min-height: 16px; }
.tier.easy { background: #d9fbe6; color: #0a8f45; }
.tier.medium { background: #fff1c7; color: #a86400; }
.tier.hard { background: #ffd9e0; color: #c4002c; }
.tbar { position: relative; height: 12px; border-radius: 6px; background: #dde2f7; margin-top: 6px; overflow: hidden; }
.tbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #1a8cff, #2ee6ff); border-radius: 6px; }
.tbar span { position: absolute; right: 6px; top: -2px; font-size: 11px; font-weight: 700; color: #121641; }
.qcard.danger .tbar i { background: linear-gradient(90deg, #ff3355, #ff8a00); }
.qcard.danger { animation: pulse 0.5s infinite; }

.handover { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--pc) 35%, #0b0f2a), rgba(3, 5, 20, 0.98)); opacity: 0; transition: opacity 0.25s; }
.handover.show { opacity: 1; }
.ho-note { font-family: var(--head); font-size: 30px; color: var(--gold); text-shadow: 0 0 20px #ff8a00; margin-bottom: 6px; }
.ho-note small { display: block; font-family: var(--body); font-size: 15px; color: var(--muted); text-shadow: none; }
.ho-pass { color: var(--muted); font-size: 17px; }
.ho-name { font-family: var(--head); font-size: 52px; color: var(--pc); text-shadow: 0 5px 0 rgba(0, 0, 0, 0.5), 0 0 30px var(--pc); }
.ho-blade { position: relative; width: min(52vw, 220px); aspect-ratio: 1; display: grid; place-items: center; }
.ho-blade img { width: 86%; position: relative; }
.ho-life { font-weight: 600; color: var(--muted); }
.btn-ready { font-size: 30px; padding: 16px 40px; border-radius: 22px; margin-top: 10px; background: var(--pc); color: #0b0f2a; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.45), 0 0 30px var(--pc); animation: pulse 1.4s infinite; }
.btn-ready:active { transform: translateY(4px); animation: none; }

/* ---------- duel results ---------- */
.dr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 440px; margin: 8px 0; }
.dr-col { background: var(--panel); border: 2px solid var(--line); border-radius: 18px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dr-col.won { border-color: var(--pc); box-shadow: 0 0 22px color-mix(in srgb, var(--pc) 50%, transparent); }
.dr-col > small { font-family: var(--head); font-size: 16px; color: var(--pc); }
.dr-col img { width: 90px; }
.dr-col img.down { filter: grayscale(0.6) brightness(0.7); transform: rotate(-20deg); }
.dr-col > b { font-family: var(--head); font-weight: 400; font-size: 16px; }
.dr-life { width: 100%; height: 8px; border-radius: 5px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.dr-life i { display: block; height: 100%; background: linear-gradient(90deg, #3dff8b, #b6ff3a); }
.dr-col ul { list-style: none; padding: 0; margin: 4px 0 0; width: 100%; font-size: 13px; }
.dr-col li { display: flex; justify-content: space-between; padding: 3px 2px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.dr-col li span { color: var(--muted); }
.duel-results .btn-big { width: 100%; max-width: 420px; }
