@font-face { font-family: Teko; src: url(assets/fonts/teko.ttf); font-weight: 300 700; }
@font-face { font-family: Bebas; src: url(assets/fonts/bebas.ttf); }
:root { --red: #e0182d; --gold: #f2c14e; --ink: #0b0607; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; color: #fff; font-family: Teko, Impact, sans-serif; user-select: none; -webkit-user-select: none; }
#app, #ui { position: fixed; inset: 0; }
#app canvas { display: block; width: 100%; height: 100%; }
#ui { pointer-events: none; }
#menus > * { pointer-events: auto; }
.hidden { display: none !important; }

/* ── HUD ─────────────────────────────────────────── */
#hud { position: absolute; inset: 0; }
.bars { position: absolute; top: 2.2vh; left: 2.5vw; right: 2.5vw; display: flex; align-items: flex-start; gap: 1.4vw; }
.side { flex: 1; position: relative; --fc: #e0182d; }
.side.s1 { transform: scaleX(-1); }
.side.s1 .nm, .side.s1 .por, .side.s1 .meter span { transform: scaleX(-1); }
.pf { display: flex; align-items: flex-end; gap: .7vw; height: 5.2vh; }
.por { width: 5.2vh; height: 5.2vh; object-fit: cover; object-position: 50% 20%; border: 2px solid var(--fc); border-radius: 4px; box-shadow: 0 0 12px color-mix(in srgb, var(--fc) 70%, transparent); }
.nm { font-family: Bebas, Teko; font-size: 3.1vh; letter-spacing: .12em; line-height: 1; text-shadow: 0 2px 6px #000, 0 0 12px var(--fc); }
.side.s1 .nm { text-align: right; }
.hpwrap { position: relative; height: 3.3vh; margin-top: .6vh; background: linear-gradient(#1a0b0d, #2b1215); clip-path: polygon(0 0, 100% 0, 97% 100%, 0 100%); border-top: 2px solid rgba(255,255,255,.35); box-shadow: inset 0 0 0 2px rgba(0,0,0,.6); }
.hp, .hptrail { position: absolute; top: 0; bottom: 0; left: 0; }
.hptrail { background: linear-gradient(#fff2c0, #ff9a3c); transition: width .05s; }
.hp { background: linear-gradient(180deg, #ffe46b 0%, #f6b81e 45%, #d5850a 100%); transition: width .06s linear; box-shadow: 0 0 14px rgba(255,190,40,.55); }
.side.low .hp { background: linear-gradient(180deg, #ff6b6b, #e0182d 50%, #8e0712); animation: lowpulse .6s infinite alternate; }
@keyframes lowpulse { to { filter: brightness(1.45); } }
.hpgloss { position: absolute; inset: 0 0 55% 0; background: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,0)); pointer-events: none; }
.pips { display: flex; gap: .5vw; margin-top: .6vh; }
.pips i { width: 1.6vh; height: 1.6vh; transform: rotate(45deg); border: 2px solid rgba(255,255,255,.6); background: rgba(0,0,0,.5); }
.pips i.on { background: radial-gradient(#fff, var(--gold) 45%, #b06a00); border-color: #fff; box-shadow: 0 0 10px var(--gold); }
.meter { position: absolute; top: calc(100% + .2vh); left: 0; width: 48%; height: 1.5vh; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.3); transform: skewX(-20deg); margin-top: 3.4vh; overflow: hidden; }
.mfill { height: 100%; width: 0; background: linear-gradient(90deg, #5a0008, #e0182d, #ff5a4a); transition: width .1s; }
.side.full .mfill { background: linear-gradient(90deg, #ff2030, #ffd0a0, #ff2030); background-size: 200% 100%; animation: meterfull .7s linear infinite; box-shadow: 0 0 16px #ff2a2a; }
@keyframes meterfull { to { background-position: 200% 0; } }
.meter span { position: absolute; left: 6px; top: 50%; transform: translateY(-50%) skewX(20deg); font-size: 1.3vh; letter-spacing: .25em; color: rgba(255,255,255,.75); line-height: 1; }
.side.s1 .meter span { transform: translateY(-50%) skewX(20deg) scaleX(-1); }
.side.full .meter span { color: #fff; text-shadow: 0 0 6px #ff3030; }
.timer { width: 9vh; text-align: center; font-family: Bebas, Teko; font-size: 7.6vh; line-height: .95; margin-top: .2vh; text-shadow: 0 0 14px rgba(255,120,60,.8), 0 3px 0 #000; background: radial-gradient(rgba(0,0,0,.6), transparent 70%); }
.timer.hurry { color: #ff4b4b; animation: lowpulse .5s infinite alternate; }

.combo { position: absolute; top: 24vh; opacity: 0; font-family: Bebas, Teko; text-shadow: 0 3px 0 #000, 0 0 16px rgba(255,60,40,.8); line-height: .9; }
.combo.c0 { left: 3vw; } .combo.c1 { right: 3vw; text-align: right; }
.combo b { font-size: 9vh; color: #fff; } .combo span { font-size: 4vh; color: var(--gold); margin-left: .4vw; } .combo small { display: block; font-size: 2.6vh; letter-spacing: .15em; color: #ffb0a0; }
.combo.go { animation: combo 1.6s ease-out forwards; }
@keyframes combo { 0% { opacity: 0; transform: translateX(-20px) scale(1.4); } 8% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; } }
.tag { position: absolute; top: 18vh; opacity: 0; font-family: Bebas, Teko; font-size: 4vh; letter-spacing: .15em; color: #ff3d3d; text-shadow: 0 2px 0 #000, 0 0 12px #ff2020; }
.tag.t0 { left: 3vw; } .tag.t1 { right: 3vw; }
.tag.go { animation: tag 1.1s ease-out forwards; }
@keyframes tag { 0% { opacity: 0; transform: scale(1.6); } 10% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }

.big { position: absolute; left: 0; right: 0; top: 38%; text-align: center; font-family: Bebas, Teko; font-size: 15vh; letter-spacing: .06em; opacity: 0; line-height: 1;
  background: linear-gradient(180deg, #fff 0%, #ffe7a8 40%, #f2a51e 60%, #a3420a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 0 #2a0505) drop-shadow(0 0 30px rgba(255,80,30,.75)); }
.big.ko { background: linear-gradient(180deg, #fff, #ff8080 40%, #e0182d 60%, #5a0008); -webkit-background-clip: text; background-clip: text; font-size: 26vh; top: 30%; }
.big.go { animation: big 1.7s cubic-bezier(.2,.9,.3,1) forwards; }
.big.fight.go { animation: bigf 1.0s cubic-bezier(.2,.9,.3,1) forwards; font-size: 20vh; top: 34%; }
@keyframes big { 0% { opacity: 0; transform: scale(2.4); letter-spacing: .4em; } 12% { opacity: 1; transform: scale(1); letter-spacing: .06em; } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(.96); } }
@keyframes bigf { 0% { opacity: 0; transform: scale(.4); } 15% { opacity: 1; transform: scale(1.15); } 30% { transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6); } }

.superban { position: absolute; left: 0; right: 0; top: 60%; height: 15vh; opacity: 0; background: linear-gradient(90deg, transparent, rgba(120,0,8,.9) 15%, rgba(200,10,20,.92) 50%, rgba(120,0,8,.9) 85%, transparent); display: flex; flex-direction: column; justify-content: center; padding: 0 12vw; border-top: 2px solid #ff6060; border-bottom: 2px solid #ff6060; }
.superban.p1 { align-items: flex-end; }
.sbn { font-family: Bebas; font-size: 4vh; letter-spacing: .3em; color: #ffd0c0; }
.sbt { font-family: Bebas; font-size: 9vh; line-height: .9; letter-spacing: .12em; color: #fff; text-shadow: 0 0 20px #ff4040; }
.superban.go { animation: sban 1.5s ease-out forwards; }
@keyframes sban { 0% { opacity: 0; transform: translateX(-30%) skewX(-12deg); } 12% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateX(10%); } }
.winner { position: absolute; left: 0; right: 0; bottom: 14vh; text-align: center; opacity: 0; font-family: Bebas; line-height: .9; }
.winner span { display: block; font-size: 7vh; letter-spacing: .2em; color: #ffe0a0; text-shadow: 0 0 20px #f2a51e, 0 3px 0 #000; }
.winner b { display: block; font-size: 16vh; background: linear-gradient(#fff, #f2c14e 50%, #a3420a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 5px 0 #2a0505); }
.winner.go { animation: big 3.4s ease-out forwards; }

/* ── Menus ───────────────────────────────────────── */
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.kv { position: absolute; inset: 0; background: url(assets/img/keyart.webp) center/cover; animation: kv 40s ease-in-out infinite alternate; }
.kv.dim { filter: brightness(.35) saturate(.8) blur(2px); }
@keyframes kv { to { transform: scale(1.08); } }
.vign { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,.85) 100%); }
.logo { position: relative; width: min(70vw, 980px); filter: drop-shadow(0 0 30px rgba(255,30,30,.55)); }
.logo.sm { width: min(34vw, 460px); margin-bottom: 1vh; }
.title { justify-content: flex-start; } .title .logo { width: min(52vw, 760px); margin-top: 3vh; animation: logoin 1.4s cubic-bezier(.2,.9,.3,1); }
@keyframes logoin { from { opacity: 0; transform: scale(1.3); filter: blur(10px); } }
.press { position: absolute; bottom: 9vh; font-family: Bebas; font-size: 4.2vh; letter-spacing: .5em; color: #ffe0c0; text-shadow: 0 0 14px #ff3030; animation: blink 1.1s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.foot { position: absolute; bottom: 2.5vh; font-size: 2vh; letter-spacing: .2em; color: rgba(255,255,255,.55); }
.loading { background: radial-gradient(#2a0608, #000 70%); }
.lbar { width: min(50vw, 600px); height: 6px; background: rgba(255,255,255,.12); margin-top: 4vh; } .lbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8e0712, #ff3a3a); box-shadow: 0 0 12px #ff3030; transition: width .3s; }
.lmsg { margin-top: 1.5vh; font-size: 2.4vh; letter-spacing: .3em; color: rgba(255,255,255,.6); }
.menu h2, .select h2, .ladder h2 { position: relative; font-family: Bebas; font-size: 5vh; letter-spacing: .35em; color: #fff; text-shadow: 0 0 16px #ff2a2a; margin-bottom: 2vh; }
.menu ul { position: relative; list-style: none; width: min(56vw, 720px); }
.menu li { position: relative; display: flex; align-items: baseline; gap: 1.5vw; padding: 1.1vh 2vw; margin: .6vh 0; cursor: pointer; transition: all .12s; clip-path: polygon(2% 0, 100% 0, 98% 100%, 0 100%); background: rgba(0,0,0,.45); border-left: 4px solid transparent; }
.menu li b { font-family: Bebas; font-weight: 400; font-size: 4.2vh; letter-spacing: .14em; color: rgba(255,255,255,.75); }
.menu li span { font-size: 2.3vh; color: rgba(255,255,255,.45); letter-spacing: .05em; }
.menu li.sel { background: linear-gradient(90deg, rgba(224,24,45,.9), rgba(120,0,10,.6) 70%, rgba(0,0,0,.3)); border-left-color: #fff; transform: translateX(1.2vw); }
.menu li.sel b { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,.6); } .menu li.sel span { color: #ffd8d0; }
.hint { position: absolute; bottom: 3vh; font-size: 2.2vh; letter-spacing: .2em; color: rgba(255,255,255,.55); }
.ressub { position: relative; margin-top: 2vh; font-size: 3vh; letter-spacing: .15em; color: #ffd0b0; }
.pause { background: rgba(0,0,0,.55); } .pause .kv, .pause .logo { display: none; }
.stages ul { width: min(40vw, 520px); align-self: flex-start; margin-left: 6vw; }
.stages h2 { align-self: flex-start; margin-left: 6vw; } .stages .logo { display: none; }
.stageprev { position: absolute; right: 5vw; top: 22vh; width: 46vw; height: 52vh; background: center/cover; border: 3px solid rgba(255,255,255,.8); box-shadow: 0 0 40px rgba(255,40,40,.4); clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%); transition: background-image .2s; }

/* select */
.select { justify-content: flex-start; padding-top: 3vh; }
.selbg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 120%, #5a0610, #12030a 55%, #000); }
.selbg::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0 2px, transparent 2px 22px); }
.grid { position: absolute; bottom: 9vh; left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(4, 12vh); gap: 1vh; }
.cell { position: relative; width: 12vh; height: 14vh; cursor: pointer; background: #111; border: 2px solid rgba(255,255,255,.25); overflow: hidden; clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%); transition: transform .1s; }
.cell img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; filter: saturate(.7) brightness(.75); }
.cell span { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-family: Bebas; font-size: 2.2vh; letter-spacing: .1em; background: linear-gradient(transparent, rgba(0,0,0,.9)); padding-top: 2vh; }
.cell em { display: none; position: absolute; top: 2px; font-style: normal; font-family: Bebas; font-size: 2vh; padding: 0 .5vh; }
.cell .m0 { left: 10%; background: #e0182d; } .cell .m1 { right: 10%; background: #1e7bff; }
.cell.h0 { border-color: #ff2a3a; transform: scale(1.08); z-index: 2; } .cell.h0 .m0 { display: block; } .cell.h0 img, .cell.h1 img { filter: none; }
.cell.h1 { border-color: #3a8bff; transform: scale(1.08); z-index: 2; } .cell.h1 .m1 { display: block; } .cell.h0.h1 { border-color: #c050ff; }
.bigp { position: absolute; top: 9vh; width: 38vw; height: 56vh; --fc: #e0182d; }
.big0 { left: 2vw; } .big1 { right: 2vw; }
.bigp img { position: absolute; bottom: 0; height: 100%; width: 100%; object-fit: cover; object-position: 50% 20%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent), linear-gradient(transparent 0, #000 10%, #000 70%, transparent); -webkit-mask-composite: source-in; mask-composite: intersect; mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent), linear-gradient(transparent 0, #000 10%, #000 70%, transparent); }
.bigp .info { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; }
.bigp .t { font-size: 2.6vh; letter-spacing: .3em; color: var(--fc); text-shadow: 0 0 10px var(--fc); }
.bigp .n { font-family: Bebas; font-size: 7.5vh; line-height: .9; letter-spacing: .06em; text-shadow: 0 4px 0 #000, 0 0 20px var(--fc); }
.bigp .d { font-size: 2.4vh; letter-spacing: .2em; color: rgba(255,255,255,.7); }
.bigp.locked .n { animation: lock .4s ease-out; color: #fff; } @keyframes lock { 0% { transform: scale(1.4); filter: brightness(3); } }

/* VS */
.vs { background: #000; overflow: hidden; }
.vsbg { position: absolute; inset: 0; background: center/cover; filter: brightness(.35) blur(3px); }
.vp { position: absolute; top: 0; bottom: 0; width: 55%; display: flex; align-items: flex-end; }
.vp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.vp.l { left: 0; clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%); animation: vsl .5s cubic-bezier(.2,.9,.3,1); border-right: 4px solid var(--a); }
.vp.r { right: 0; clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%); animation: vsr .5s cubic-bezier(.2,.9,.3,1); }
.vp.l img { -webkit-mask-image: linear-gradient(90deg, #000 60%, transparent); mask-image: linear-gradient(90deg, #000 60%, transparent); }
.vp.r img { -webkit-mask-image: linear-gradient(270deg, #000 60%, transparent); mask-image: linear-gradient(270deg, #000 60%, transparent); }
.vp div { position: relative; padding: 0 0 9vh 4vw; } .vp.r div { margin-left: auto; padding: 0 4vw 9vh 0; text-align: right; }
.vp small { display: block; font-size: 2.8vh; letter-spacing: .3em; color: #ffd0b0; } .vp b { font-family: Bebas; font-weight: 400; font-size: 9vh; line-height: .9; text-shadow: 0 4px 0 #000; }
.vp.l b { text-shadow: 0 4px 0 #000, 0 0 30px var(--a); } .vp.r b { text-shadow: 0 4px 0 #000, 0 0 30px var(--b); }
@keyframes vsl { from { transform: translateX(-60%); } } @keyframes vsr { from { transform: translateX(60%); } }
.vsx { position: relative; font-family: Bebas; font-size: 26vh; background: linear-gradient(#fff, #ffcf6a 45%, #e0182d 60%, #4a0006); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px #ff2a2a) drop-shadow(0 8px 0 #000); animation: vsx .6s .25s cubic-bezier(.2,.9,.3,1) both; }
@keyframes vsx { from { opacity: 0; transform: scale(3) rotate(-10deg); } }
.vsub { position: absolute; top: 5vh; font-family: Bebas; font-size: 4vh; letter-spacing: .5em; color: #ffd0b0; text-shadow: 0 0 14px #ff3030; }

/* ladder */
.rungs { position: relative; display: flex; gap: 1vw; align-items: flex-end; }
.rung { position: relative; width: 12vw; height: 40vh; overflow: hidden; border: 2px solid rgba(255,255,255,.2); clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%); }
.rung img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: brightness(.45) grayscale(.6); }
.rung span, .rung b { position: absolute; left: 0; right: 0; text-align: center; font-family: Bebas; font-weight: 400; }
.rung span { top: 1vh; font-size: 2.2vh; letter-spacing: .2em; } .rung b { bottom: 1vh; font-size: 2.6vh; letter-spacing: .06em; }
.rung.beat img { filter: brightness(.3) grayscale(1); } .rung.beat::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 14vh; color: rgba(224,24,45,.85); }
.rung.next { border-color: #ff3040; transform: scale(1.06); box-shadow: 0 0 30px rgba(255,40,40,.6); animation: lock .5s; } .rung.next img { filter: none; }
.rung.boss { height: 48vh; width: 14vw; border-color: #a00; }
/* ending */
.ending .epor { position: absolute; left: 4vw; bottom: 0; height: 88vh; -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 80%, transparent); mask-image: linear-gradient(transparent, #000 15%, #000 80%, transparent); }
.etxt { position: absolute; right: 6vw; width: 44vw; text-align: right; } .etxt small { font-size: 3vh; letter-spacing: .3em; color: var(--gold); }
.etxt b { display: block; font-family: Bebas; font-weight: 400; font-size: 12vh; line-height: .9; text-shadow: 0 0 30px var(--fc), 0 5px 0 #000; } .etxt p { font-size: 3.2vh; line-height: 1.15; color: rgba(255,255,255,.85); margin-top: 2vh; }
.etxt .hint { position: static; margin-top: 4vh; }
/* controls */
.ctrl .logo { display: none; } .ccols { position: relative; display: flex; gap: 4vw; max-height: 72vh; }
.ccols h3 { font-family: Bebas; font-weight: 400; font-size: 3vh; letter-spacing: .2em; color: #ff6060; margin: 1.4vh 0 .4vh; }
.ccols table { border-collapse: collapse; font-size: 2.4vh; } .ccols td { padding: .15vh 1.2vw .15vh 0; color: rgba(255,255,255,.85); } .ccols td:last-child { color: var(--gold); white-space: nowrap; }
@media (max-aspect-ratio: 1/1) { .bigp { width: 46vw; height: 40vh; } .grid { grid-template-columns: repeat(4, 10vh); } .cell { width: 10vh; height: 12vh; } }
