/* Bomb Dash Arena - fixed 844x390 landscape stage, scaled to fit any screen. */
:root {
  --ink: #0E0A2A; --night: #17123A; --panel: #241D5C; --panel2: #2F2773; --line: #3D3490;
  --muted: #B9B3E8; --soft: #E4E0FF; --dim: #8C86C4;
  --yellow: #FFC93C; --yellow-d: #E0A21A; --orange: #FF7A1A; --blue: #2F6FE4; --blue-d: #2254B8;
  --green: #2EE6A6; --green-d: #1FB582; --pink: #FF4F8B; --cyan: #47D7FF;
  --body: 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
  --display: 'Lilita One', 'Arial Black', Impact, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #07051A; overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--body); color: #fff; user-select: none; -webkit-user-select: none; touch-action: none; }
button, input { font-family: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .55; }
input { user-select: text; -webkit-user-select: text; }
input:focus { outline: none; }
input::placeholder { color: var(--dim); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
[hidden] { display: none !important; }

#stage { position: absolute; left: 0; top: 0; width: 844px; height: 390px; transform-origin: 0 0; overflow: hidden; background: var(--night); }
#screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
#play { position: absolute; inset: 0; background: var(--ink); }
#arena { position: absolute; left: 122px; top: 15px; width: 600px; height: 360px; border-radius: 12px; }
#hud { position: absolute; inset: 0; }
#modal { position: absolute; inset: 0; background: rgba(7, 5, 26, .78); display: flex; align-items: center; justify-content: center; z-index: 30; }
#net { position: absolute; inset: 0; background: rgba(7, 5, 26, .86); display: flex; align-items: center; justify-content: center; z-index: 40; }
#toasts { position: absolute; left: 0; right: 0; top: 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 50; pointer-events: none; }
#rotate { position: fixed; inset: 0; z-index: 99; background: var(--ink); display: none; align-items: center; justify-content: center; text-align: center; padding: 24px; }
#rotate b { display: block; font-family: var(--display); font-weight: 400; font-size: 26px; color: var(--yellow); }
#rotate span { color: var(--muted); font-weight: 700; }
@media (orientation: portrait) and (max-width: 600px) { #rotate { display: flex; } }

.lil { font-family: var(--display); font-weight: 400; }
.muted { color: var(--muted); }
.stripes { background: repeating-linear-gradient(135deg, #17123A 0 26px, #1B1542 26px 52px); }
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; min-height: 0; }
.center { align-items: center; justify-content: center; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hero { position: relative; display: block; flex: none; }
.hero svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.panel { background: var(--panel); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); }
.btn { display: flex; align-items: center; justify-content: center; gap: 6px; border: 3px solid var(--ink); border-radius: 14px; font-weight: 800; font-size: 15px; padding: 0 14px; height: 44px; background: var(--panel2); color: #fff; text-decoration: none; white-space: nowrap; }
.btn:active:not(:disabled) { transform: translateY(2px); }
.btn.y { background: var(--yellow); color: #2A1A00; box-shadow: inset 0 -5px 0 var(--yellow-d); font-family: var(--display); font-weight: 400; font-size: 20px; }
.btn.b { background: var(--blue); box-shadow: inset 0 -4px 0 var(--blue-d); }
.btn.g { background: var(--green); color: #0E2A20; box-shadow: inset 0 -4px 0 var(--green-d); }
.btn.p { background: var(--pink); color: #2A0012; }
.btn.d { background: var(--panel); border: 2px solid var(--line); }
.btn.sm { height: 34px; font-size: 13px; padding: 0 10px; border-radius: 10px; border-width: 2px; }
.btn.sq { width: 44px; padding: 0; flex: none; }
.pill { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--ink); border: 2px solid var(--line); font-family: var(--display); font-size: 15px; letter-spacing: .5px; }
.tag { padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.input { height: 44px; padding: 0 12px; border-radius: 12px; background: var(--ink); border: 2px solid var(--line); color: #fff; font-size: 16px; font-weight: 800; min-width: 0; }
.input:focus { border-color: var(--green); }
.bar { height: 10px; border-radius: 999px; background: var(--ink); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; transition: width .5s ease-out; }
.seg { display: grid; gap: 4px; padding: 3px; border-radius: 11px; background: var(--ink); }
.seg button { height: 34px; border-radius: 8px; border: none; background: transparent; color: var(--muted); font-size: 14px; font-weight: 800; }
.seg button[aria-checked="true"] { background: var(--yellow); color: #2A1A00; }
.lbl { font-size: 12px; font-weight: 800; color: var(--muted); }
.scroll { overflow-y: auto; touch-action: pan-y; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

/* top + bottom bars */
.topbar { height: 56px; padding: 0 14px; display: flex; align-items: center; gap: 12px; background: #120E33; border-bottom: 3px solid var(--ink); flex: none; }
.avatar { width: 44px; height: 44px; border-radius: 12px; background: var(--panel2); border: 3px solid var(--ink); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; flex: none; padding: 0; }
.navbar { height: 52px; padding: 4px 120px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; background: #120E33; border-top: 3px solid var(--ink); flex: none; }
.navbar button { display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; border: none; background: transparent; color: var(--muted); font-size: 14px; font-weight: 800; position: relative; }
.navbar button.on { background: var(--yellow); color: #2A1A00; box-shadow: inset 0 -3px 0 var(--yellow-d), 0 0 0 2px var(--ink); }
.navbar .dot { position: absolute; top: 4px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); border: 2px solid #120E33; }
.main { flex: 1; min-height: 0; padding: 12px 16px; }
.head { display: flex; align-items: center; gap: 12px; height: 44px; flex: none; }
.head h1 { margin: 0; flex: 1; font-family: var(--display); font-weight: 400; font-size: 24px; }

.card { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; text-align: left; color: #fff; font-size: 13px; font-weight: 600; position: relative; }
.card h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 17px; }
.badge { position: absolute; top: -8px; right: -6px; padding: 0 8px; height: 20px; border-radius: 999px; background: var(--pink); color: #2A0012; border: 2px solid var(--ink); font-size: 11px; font-weight: 800; display: flex; align-items: center; }
.slot { border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 5px; background: var(--panel); border: 3px solid var(--ink); overflow: hidden; position: relative; min-width: 0; }
.slot.me { border-color: var(--yellow); }
.slot.empty { background: rgba(14, 10, 42, .5); border: 3px dashed var(--line); justify-content: center; color: var(--dim); font-size: 12px; font-weight: 800; }
.slot.closed { background: rgba(14, 10, 42, .45); border-color: var(--panel); justify-content: center; color: #5F5899; font-size: 12px; font-weight: 800; }
.slot .nm { font-size: 12px; font-weight: 800; line-height: 1.1; max-width: 92%; }
.slot .sub { font-size: 10px; font-weight: 700; color: var(--muted); }
.pop { animation: pop .35s ease-out both; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes idle { 0%, 100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-4px) scaleY(1.02); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ring { 0% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1.18); opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.rise { animation: rise .3s ease-out both; }
@keyframes riseC { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.riseC { animation: riseC .3s ease-out both; }

.toast { padding: 6px 14px; border-radius: 999px; background: #FFF7E0; color: #2A1A00; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-size: 14px; font-weight: 800; pointer-events: auto; display: flex; align-items: center; gap: 10px; animation: rise .25s ease-out both; max-width: 640px; }
.toast.err { background: var(--pink); color: #2A0012; }
.dialog { width: 420px; max-height: 350px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.dialog h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 24px; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: rgba(14, 10, 42, .45); font-size: 14px; font-weight: 800; }

/* in-match HUD */
.hud-timer { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(14, 10, 42, .88); border: 2px solid var(--line); font-family: var(--display); font-size: 22px; letter-spacing: 1px; }
.hud-timer.sd { border-color: var(--pink); color: var(--pink); animation: pulse .8s infinite; }
.hud-left { position: absolute; left: 8px; top: 10px; width: 106px; display: flex; flex-direction: column; gap: 6px; }
.hud-rank { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 10px; border-radius: 12px; background: var(--panel); border: 2px solid var(--line); font-size: 13px; font-weight: 800; }
.hud-rank b { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--yellow); }
.hud-chip { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border-radius: 10px; background: rgba(36, 29, 92, .85); font-size: 12px; font-weight: 800; }
.hud-chip.shield { background: #1E5C4D; border: 2px solid var(--green); color: #C8FFEC; }
.hud-chip svg { width: 16px; height: 16px; flex: none; }
.stick { position: absolute; left: 6px; bottom: 14px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .07); border: 3px solid rgba(255, 255, 255, .28); }
.stick i { position: absolute; left: 27px; top: 27px; width: 50px; height: 50px; border-radius: 50%; background: var(--soft); border: 3px solid var(--ink); box-shadow: inset 0 -4px 0 var(--muted); will-change: transform; }
.stick-zone { position: absolute; left: 0; top: 150px; width: 300px; bottom: 0; }
.act { position: absolute; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0; touch-action: none; }
.act:active { filter: brightness(.9); }
.act.bomb { right: 14px; bottom: 14px; width: 94px; height: 94px; background: var(--orange); border: 4px solid var(--ink); box-shadow: inset 0 -7px 0 #C2500A; }
.act.dash { right: 30px; bottom: 116px; width: 62px; height: 62px; border: none; padding: 4px; background: conic-gradient(var(--yellow) var(--cd, 100%), var(--line) 0); }
.act.dash > span:first-child { width: 100%; height: 100%; border-radius: 50%; background: var(--blue); border: 3px solid var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -4px 0 var(--blue-d); }
.act.freeze { right: 34px; bottom: 196px; width: 52px; height: 52px; background: var(--cyan); border: 3px solid var(--ink); box-shadow: inset 0 -4px 0 #1E9CC4; }
.act.off { filter: grayscale(.8) brightness(.6); }
.act .n { position: absolute; top: -5px; left: -5px; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 999px; background: #fff; color: var(--ink); border: 2px solid var(--ink); font-family: var(--display); font-size: 13px; display: flex; align-items: center; justify-content: center; }
.act .key { position: absolute; bottom: -4px; right: -8px; padding: 0 5px; border-radius: 6px; background: var(--ink); color: var(--muted); font-size: 10px; font-weight: 800; border: 1px solid var(--line); }
.no-keys .key { display: none; }
.hud-pause { position: absolute; right: 12px; top: 10px; width: 44px; height: 44px; border-radius: 12px; background: var(--panel); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 0; }
.hud-ping { position: absolute; right: 64px; top: 22px; display: flex; align-items: flex-end; gap: 2px; height: 18px; }
.hud-ping i { width: 4px; border-radius: 1px; background: var(--line); }
.hud-ping i.on { background: var(--green); }
.hud-banner { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--pink); color: #2A0012; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); white-space: nowrap; font-size: 14px; font-weight: 800; }
.hud-banner b { padding: 0 8px; border-radius: 999px; background: #2A0012; color: #FF8FB5; font-family: var(--display); font-weight: 400; font-size: 15px; line-height: 24px; }
.hud-note { position: absolute; left: 50%; top: 50px; transform: translateX(-50%); padding: 2px 14px; border-radius: 999px; background: rgba(14, 10, 42, .85); border: 2px solid var(--pink); color: #FFB3CD; font-family: var(--display); font-size: 16px; letter-spacing: 1px; pointer-events: none; }
.stand { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 6px; border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--dim); }
.stand.alive { background: rgba(36, 29, 92, .9); color: #fff; }
.stand.you { color: var(--yellow); }
.stand i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #5F5899; }
.stand.alive i { background: var(--green); }
.intro { position: absolute; inset: 0; background: rgba(14, 10, 42, .9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; z-index: 5; }
.coach { position: absolute; right: 12px; top: 56px; width: 106px; padding: 10px 10px 12px; border-radius: 16px; background: #FFF7E0; color: #2A1A00; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); display: flex; flex-direction: column; gap: 4px; font-size: 12px; line-height: 1.25; font-weight: 700; }
.steps { position: absolute; left: 0; right: 0; top: -2px; display: flex; justify-content: center; gap: 4px; transform: scale(.82); transform-origin: 50% 0; }
.step { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 6px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--panel); color: var(--muted); border: 2px solid transparent; white-space: nowrap; }
.step b { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; background: var(--line); color: #fff; }
.step.on { background: var(--yellow); color: #2A1A00; border-color: var(--ink); }
.step.on b { background: #2A1A00; color: var(--yellow); }
.step.done { background: #1E5C4D; color: #C8FFEC; }
.step.done b { background: var(--green); color: var(--ink); }

/* big arenas: minimap, objective call-outs */
.hud-map { width: 106px; border-radius: 8px; border: 2px solid var(--line); background: #1B4B4E; display: block; image-rendering: pixelated; }
.hud-chip.key { background: var(--yellow); color: #2A1A00; animation: pulse .7s infinite; }
.hud-chip.fury { background: var(--orange); color: #2A1A00; border: 2px solid #FFE45C; }
.hud-ann { position: absolute; left: 50%; top: 84px; padding: 4px 18px; border-radius: 999px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font-family: var(--display); font-size: 19px; letter-spacing: .5px; white-space: nowrap; pointer-events: none; background: #FFF7E0; color: #2A1A00; animation: annIn 2.4s ease-out both; z-index: 4; }
.hud-ann.gold { background: var(--yellow); }
.hud-ann.pink { background: var(--pink); color: #2A0012; }
.hud-ann.fury { background: var(--orange); color: #fff; font-size: 24px; -webkit-text-stroke: 1px var(--ink); }
@keyframes annIn { 0% { transform: translateX(-50%) scale(.5); opacity: 0; } 8% { transform: translateX(-50%) scale(1.15); opacity: 1; } 14% { transform: translateX(-50%) scale(1); } 85% { transform: translateX(-50%) scale(1); opacity: 1; } 100% { transform: translateX(-50%) scale(1); opacity: 0; } }
.stepper { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 11px; background: var(--ink); }
.stepper button { width: 34px; height: 30px; border-radius: 8px; border: none; background: var(--panel2); color: #fff; font-family: var(--display); font-size: 18px; }
.stepper b { flex: 1; text-align: center; font-family: var(--display); font-weight: 400; font-size: 17px; color: var(--yellow); }
.hud-chip { white-space: nowrap; }

/* ads */
.ad-banner { position: relative; display: block; width: 234px; height: 44px; flex: none; border-radius: 10px; overflow: hidden; border: 2px solid var(--ink); background: var(--ink); }
.ad-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-tag { position: absolute; left: 4px; top: 4px; padding: 0 5px; border-radius: 4px; background: rgba(14, 10, 42, .82); color: #fff; font-size: 9px; font-weight: 800; line-height: 14px; z-index: 1; pointer-events: none; }
#ad { position: absolute; inset: 0; background: rgba(7, 5, 26, .88); display: flex; align-items: center; justify-content: center; z-index: 35; }
.ad-box { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 16px; background: var(--panel); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); max-width: 640px; }
.ad-box img, .ad-box video { display: block; width: auto; height: auto; max-width: 600px; max-height: 300px; align-self: center; object-fit: contain; border-radius: 10px; background: var(--ink); }
.ad-box > a { display: block; align-self: center; }
.ad-box video { max-width: 520px; max-height: 270px; }
.ad-row { display: flex; align-items: center; gap: 8px; }
.ad-row a { text-decoration: none; }
.ad-x { position: absolute; right: -12px; top: -12px; width: 44px; height: 44px; border-radius: 50%; background: #FFF7E0; color: #2A1A00; font-size: 18px; }
.ad-box iframe { display: block; width: 480px; height: 270px; border: 0; border-radius: 10px; background: #000; align-self: center; }
.hscroll { overflow-x: auto; overflow-y: hidden; touch-action: pan-x; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.stepper button:disabled { background: transparent; color: var(--line); opacity: 1; }

/* vault reward choice */
.powers { position: absolute; left: 122px; top: 108px; width: 600px; box-sizing: border-box; padding: 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; border-radius: 16px; background: rgba(14, 10, 42, .92); border: 3px solid var(--yellow); box-shadow: 0 4px 0 var(--ink); z-index: 6; animation: pop .3s ease-out both; }
.power-card { position: relative; width: 184px; height: 104px; padding: 6px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 14px; background: var(--panel2); border: 3px solid var(--ink); color: #fff; text-align: center; touch-action: none; }
.power-card:hover, .power-card:active { background: var(--blue); }
.power-card b { font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--yellow); }
.power-card span { font-size: 11.5px; font-weight: 700; line-height: 1.2; color: var(--soft); }
.power-card .pi svg { width: 26px; height: 26px; display: block; }
.power-card .key { position: absolute; top: 4px; right: 6px; padding: 0 6px; border-radius: 6px; background: var(--ink); color: var(--muted); font-size: 11px; font-weight: 800; font-style: normal; border: 1px solid var(--line); }
.no-keys .power-card .key { display: none; }

/* rating + legal links */
.star { width: 52px; height: 52px; border: none; background: transparent; font-size: 44px; line-height: 1; color: var(--line); padding: 0; transition: transform .1s; }
.star.on { color: var(--yellow); text-shadow: 0 3px 0 var(--ink); }
.star:active { transform: scale(1.2); }
.legal a { color: var(--green); }
