:root {
  --ink: #f4f7ff;
  --muted: #aab5cd;
  --panel: rgba(10, 14, 27, .86);
  --panel-strong: rgba(10, 13, 24, .95);
  --purple: #8d55ff;
  --orange: #ff8a36;
  --yellow: #ffd74d;
  --cyan: #31d7ed;
  --red: #ff4f6d;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #0a0e19; color: var(--ink); font-family: Inter, Pretendard, "Noto Sans KR", system-ui, sans-serif; }
button, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
#app, #gameCanvas { width: 100%; height: 100%; }
#gameCanvas { display: block; background: #67c9f4; touch-action: none; filter: saturate(1.08) contrast(1.035); }
#app::before { content: ""; position: fixed; inset: 0; z-index: 7; pointer-events: none; background: radial-gradient(circle at 50% 44%, transparent 46%, rgba(21,16,28,.15) 82%, rgba(8,9,18,.3) 100%), linear-gradient(180deg, rgba(255,188,111,.035), transparent 38%, rgba(34,73,111,.05)); mix-blend-mode: multiply; }
#app::after { content: ""; position: fixed; inset: 0; z-index: 7; pointer-events: none; opacity: .2; background-image: repeating-linear-gradient(116deg, transparent 0 3px, rgba(255,255,255,.018) 4px, transparent 5px 9px); }

.menu-screen {
  position: fixed; inset: 0; z-index: 20; display: grid; grid-template-columns: minmax(440px, 1fr) 360px;
  align-items: center; gap: clamp(30px, 6vw, 110px); padding: clamp(32px, 7vw, 110px);
  background:
    linear-gradient(90deg, rgba(7, 9, 20, .97) 0%, rgba(11, 13, 29, .84) 43%, rgba(14, 16, 31, .45) 100%),
    radial-gradient(circle at 76% 44%, rgba(144, 74, 255, .38), transparent 27%);
  overflow: auto;
}
.menu-shade { position: absolute; inset: 0; pointer-events: none; }
.menu-screen::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 69px, rgba(255,255,255,.025) 70px), repeating-linear-gradient(0deg, transparent 0 69px, rgba(255,255,255,.018) 70px); }
.menu-copy, .mission-card { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 14px; color: var(--cyan); font-size: 12px; font-weight: 900; letter-spacing: .22em; }
.menu-copy h1 { margin: 0; font-size: clamp(54px, 7.2vw, 108px); line-height: .82; letter-spacing: -.06em; text-transform: uppercase; text-shadow: 0 12px 42px rgba(0,0,0,.38); }
.menu-copy h1 span { color: var(--orange); }
.lead { max-width: 570px; margin: 26px 0; color: #cfd7e8; font-size: clamp(16px, 1.5vw, 21px); line-height: 1.65; }
.menu-actions { display: flex; gap: 12px; align-items: center; }
.primary, .secondary, .ghost { border: 0; border-radius: 5px; min-height: 50px; padding: 0 22px; font-weight: 900; letter-spacing: -.02em; transition: transform .16s ease, filter .16s ease, background .16s ease; }
.primary { display: inline-flex; align-items: center; justify-content: space-between; gap: 34px; min-width: 210px; color: #151022; background: linear-gradient(135deg, var(--yellow), var(--orange)); box-shadow: 0 12px 32px rgba(255,126,48,.25); }
.primary b { font-size: 22px; }
.secondary { color: var(--ink); background: #252c42; border: 1px solid rgba(255,255,255,.1); }
.ghost { color: var(--ink); background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.14); }
button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.settings-panel { display: grid; grid-template-columns: repeat(3, minmax(125px, 1fr)); gap: 8px 10px; max-width: 590px; margin-top: 20px; }
.settings-panel label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px; min-height: 38px; padding: 6px 8px; color: var(--muted); background: rgba(11,16,31,.62); border: 1px solid rgba(255,255,255,.08); font-size: 11px; }
.settings-panel select { min-width: 66px; color: var(--ink); background: #181d2e; border: 1px solid rgba(255,255,255,.15); border-radius: 4px; padding: 6px 7px; font-size: 11px; }
.settings-panel .range-setting { grid-template-columns: 1fr auto; }
.range-setting output { color: var(--cyan); font-weight: 900; font-variant-numeric: tabular-nums; }
.range-setting input { grid-column: 1 / -1; width: 100%; height: 4px; margin: 2px 0; accent-color: var(--orange); }
.pointer-note { max-width: 520px; color: #7f8ba4; font-size: 12px; line-height: 1.55; }

.mission-card { padding: 22px; background: linear-gradient(150deg, rgba(26,31,53,.95), rgba(10,13,25,.96)); border: 1px solid rgba(150,177,220,.24); border-top: 3px solid var(--purple); box-shadow: 0 30px 70px rgba(0,0,0,.38); }
.portrait-wrap { width: 106px; height: 92px; float: left; margin-right: 16px; border: 2px solid var(--orange); overflow: hidden; background: #179ee5; transform: skewX(-4deg); }
.portrait-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 45%; transform: skewX(4deg) scale(1.08); }
.mission-card small { color: var(--cyan); font-weight: 900; letter-spacing: .14em; }
.mission-card h2 { margin: 4px 0 0; font-size: 34px; }
.mission-card p { color: var(--muted); margin: 4px 0; }
.mission-divider { clear: both; height: 1px; margin: 24px 0; background: linear-gradient(90deg, var(--purple), transparent); }
.mission-card > strong { display: block; margin: 4px 0; font-size: 24px; }
.enemy-legend { clear: both; display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 13px; }
.enemy-legend span { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 6px; padding: 7px 6px; color: #aeb9cd; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); font-size: 8px; line-height: 1.35; }
.enemy-legend b { color: #edf5ff; font-size: 10px; }
.enemy-legend i, .enemy-roster-hud i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 9px currentColor; }
.assault-dot { color: #ff5b44; background: currentColor; }
.shield-dot { color: #60d9ff; background: currentColor; }
.dealer-dot { color: #c789ff; background: currentColor; }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; color: #c5cde0; font-size: 12px; }
kbd { display: inline-grid; place-items: center; min-width: 26px; min-height: 24px; padding: 0 6px; color: #fff; background: #303950; border: 1px solid #5b6985; border-bottom-width: 3px; border-radius: 4px; font: 800 11px/1 system-ui; }

.hud { position: fixed; inset: 0; z-index: 8; pointer-events: none; user-select: none; }
.top-bar { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: min(880px, 90vw); height: 72px; display: flex; align-items: center; justify-content: center; gap: 13px; background: linear-gradient(180deg, rgba(8,13,25,.9), rgba(8,13,25,.14)); clip-path: polygon(4% 0, 96% 0, 100% 78%, 69% 78%, 65% 100%, 35% 100%, 31% 78%, 0 78%); }
.mission-tag { position: absolute; left: 48px; top: 18px; display: flex; align-items: center; gap: 8px; color: #bed0e5; font-size: 11px; letter-spacing: .14em; }
.mission-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.objective { display: flex; align-items: baseline; gap: 9px; }
.objective small { color: #c2cbdb; font-weight: 800; letter-spacing: .08em; }
.objective strong { color: var(--red); font-size: 31px; line-height: 1; text-shadow: 0 0 16px rgba(255,79,109,.5); }
.team-score { display: flex; align-items: baseline; gap: 7px; min-width: 74px; padding: 5px 10px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.team-score small { font-size: 9px; font-weight: 950; letter-spacing: .12em; }
.team-score strong { font-size: 29px; line-height: 1; }
.blue-team { justify-content: flex-end; color: #76e8ff; background: linear-gradient(90deg, transparent, rgba(32,142,222,.25)); }
.red-team { color: #ff7485; background: linear-gradient(90deg, rgba(222,38,70,.25), transparent); }
.match-goal { min-width: 112px; display: grid; justify-items: center; gap: 2px; }
.match-goal b { color: #f3f7ff; font-size: 10px; letter-spacing: .05em; }
.match-goal span { color: #d6dfed; font-size: 9px; font-weight: 850; }
.enemy-roster-hud { position: absolute; right: 30px; top: 118px; display: flex; align-items: center; gap: 5px; }
.enemy-roster-hud span { display: inline-flex; align-items: center; gap: 4px; min-width: 30px; padding: 3px 6px; color: #eaf4ff; background: rgba(10,15,27,.62); border: 1px solid rgba(255,255,255,.1); border-radius: 999px; font-size: 9px; font-weight: 900; }
.top-bar time { min-width: 50px; font-weight: 900; font-variant-numeric: tabular-nums; }
.kill-feed { position: absolute; top: 76px; right: 30px; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.kill-feed div { padding: 7px 10px; background: rgba(10,14,26,.78); border-right: 3px solid var(--orange); font-size: 12px; box-shadow: 0 7px 18px rgba(0,0,0,.22); }
.kill-feed strong { color: var(--orange); }.kill-feed span { margin: 0 8px; color: var(--yellow); }.kill-feed b { color: #ffd4db; }
.kill-feed div.blue-kill { border-right-color: var(--cyan); }.kill-feed div.blue-kill strong { color: #7eeaff; }
.kill-feed div.red-kill { border-right-color: var(--red); }.kill-feed div.red-kill strong { color: #ff7a88; }
.kill-feed em { display: block; margin-top: 2px; color: #aebbd0; font-size: 8px; font-style: normal; }
.ally-status { position: absolute; left: 28px; top: 86px; display: grid; gap: 5px; }
.ally-status > div { width: 176px; padding: 6px 9px; background: rgba(9,16,29,.72); border-left: 3px solid var(--cyan); box-shadow: 0 5px 14px rgba(0,0,0,.2); }
.ally-status header { display: flex; justify-content: space-between; color: #dff8ff; font-size: 9px; font-weight: 900; }
.ally-status i { display: block; height: 3px; margin-top: 4px; transform-origin: left; background: linear-gradient(90deg,#42d9ff,#7fffc7); }
.ally-status .dead { border-color: #637088; opacity: .72; }.ally-status .dead i { background: #58657b; }

.crosshair, .hitmarker { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; transform: translate(-50%,-50%); }
.crosshair i { position: absolute; background: rgba(242,250,255,.92); box-shadow: 0 0 3px rgba(0,0,0,.9); transition: all .14s ease; }
.crosshair i:nth-child(1), .crosshair i:nth-child(2) { width: 9px; height: 2px; top: 23px; }
.crosshair i:nth-child(1) { left: 4px; }.crosshair i:nth-child(2) { right: 4px; }
.crosshair i:nth-child(3), .crosshair i:nth-child(4) { width: 2px; height: 9px; left: 23px; }
.crosshair i:nth-child(3) { top: 4px; }.crosshair i:nth-child(4) { bottom: 4px; }
.crosshair b { position: absolute; width: 4px; height: 4px; border: 1px solid white; border-radius: 50%; left: 22px; top: 22px; }
.crosshair.super-target i { background: var(--yellow); box-shadow: 0 0 8px var(--orange); }
.crosshair.super-target i:nth-child(1) { left: 0; }.crosshair.super-target i:nth-child(2) { right: 0; }
.hitmarker { z-index: 5; opacity: 0; transition: opacity .05s, transform .08s; }
.hitmarker.active { opacity: 1; }.hitmarker.kill { transform: translate(-50%,-50%) scale(1.34); }
.hitmarker i { position: absolute; width: 12px; height: 2px; top: 23px; left: 18px; background: white; transform-origin: center; box-shadow: 0 0 5px #000; }
.hitmarker i:nth-child(1) { transform: translate(-12px,-8px) rotate(45deg); }.hitmarker i:nth-child(2) { transform: translate(12px,-8px) rotate(-45deg); }.hitmarker i:nth-child(3) { transform: translate(-12px,8px) rotate(-45deg); }.hitmarker i:nth-child(4) { transform: translate(12px,8px) rotate(45deg); }
.hitmarker.splash { transform: translate(-50%,-50%) scale(.82); }.hitmarker.splash i { opacity: .72; }
.hitmarker.direct i { width: 14px; background: #f8fdff; box-shadow: 0 0 8px rgba(255,255,255,.88); }
.hitmarker.head i { width: 15px; background: var(--yellow); box-shadow: 0 0 10px var(--orange); }
.hitmarker.kill i { background: var(--red); box-shadow: 0 0 10px #ff274f; }
.hitmarker.head.kill i { background: #ffe96b; box-shadow: 0 0 12px #ff4e2f; }
.hitmarker span { position: absolute; left: 50%; top: 42px; width: max-content; transform: translateX(-50%); color: var(--yellow); font-size: 9px; font-weight: 950; letter-spacing: .12em; text-shadow: 0 2px 5px #000; }
.damage-indicators { position: absolute; inset: 0; overflow: hidden; }
.damage-arrow { --angle: 0rad; --strength: 1; position: absolute; left: 50%; top: 50%; width: 58px; height: 25px; transform: translate(-50%,-50%) rotate(var(--angle)) translateY(clamp(-300px,-34vh,-155px)) scale(calc(.86 + var(--strength) * .22)); transform-origin: center; opacity: 0; color: #ff5b67; filter: drop-shadow(0 0 8px #e61035); }
.damage-arrow::before { content: ""; position: absolute; inset: 0; clip-path: polygon(50% 0,100% 100%,72% 78%,50% 36%,28% 78%,0 100%); background: linear-gradient(#fff2f2,#ff304f 42%,rgba(164,0,28,.18)); }
.damage-numbers { position: absolute; inset: 0; overflow: hidden; }
.damage-number { position: absolute; left: 0; top: 0; min-width: 44px; transform: translate(-50%,-50%); color: #ffe7ca; font: 950 18px/1 system-ui; text-align: center; letter-spacing: -.03em; text-shadow: 0 2px 3px #18070a,0 0 6px rgba(255,113,45,.75); white-space: nowrap; will-change: transform,opacity; }
.damage-number.direct { color: #fff; font-size: 21px; }.damage-number.head { color: var(--yellow); font-size: 27px; text-shadow: 0 2px 3px #1c0c00,0 0 11px var(--orange); }
.damage-number.kill { color: #ff6b78; font-size: 25px; }.damage-number.head.kill { color: #fff06a; font-size: 30px; }
.damage-number small { display: block; margin-top: 3px; font-size: 8px; letter-spacing: .16em; }
.ads-overlay { position: absolute; inset: 0; z-index: 2; opacity: 0; transition: opacity .12s; background: radial-gradient(circle at 50% 50%, transparent 0 19%, rgba(16,24,36,.025) 37%, rgba(6,12,25,.18) 100%); }
.ads-overlay.active { opacity: 1; }
.ads-frame { position: absolute; left: 50%; top: 50%; width: 154px; height: 204px; transform: translate(-50%,-47%); border-left: 2px solid rgba(255,210,74,.8); border-right: 2px solid rgba(255,210,74,.8); border-radius: 50% 50% 38% 38%; filter: drop-shadow(0 0 5px rgba(255,148,38,.36)); clip-path: polygon(0 0,30% 0,30% 38%,70% 38%,70% 0,100% 0,100% 100%,70% 100%,70% 62%,30% 62%,30% 100%,0 100%); }
.ads-frame i { position: absolute; left: 50%; width: 22px; height: 2px; transform: translateX(-50%); background: rgba(255,221,92,.9); }.ads-frame i:first-child { top: 0; }.ads-frame i:last-child { bottom: 0; }
.crosshair.ads i:nth-child(1),.crosshair.ads i:nth-child(2) { width: 6px; }.crosshair.ads i:nth-child(1) { left: 8px; }.crosshair.ads i:nth-child(2) { right: 8px; }
.crosshair.ads i:nth-child(3),.crosshair.ads i:nth-child(4) { height: 6px; }.crosshair.ads i:nth-child(3) { top: 8px; }.crosshair.ads i:nth-child(4) { bottom: 8px; }
.status-message { position: absolute; left: 50%; top: calc(50% + 54px); transform: translate(-50%,8px); opacity: 0; padding: 7px 14px; background: linear-gradient(120deg, rgba(10,14,26,.76), rgba(24,37,54,.62)); border: 1px solid rgba(143,217,255,.16); backdrop-filter: blur(7px); color: #f4f7ff; font-weight: 800; font-size: 12px; letter-spacing: .04em; transition: .18s; }
.status-message.show { opacity: 1; transform: translate(-50%,0); }
.enemy-alert { position: absolute; left: 50%; top: 92px; min-width: 160px; transform: translate(-50%,-8px); opacity: 0; padding: 6px 13px; color: #fff5dc; background: rgba(117,16,24,.72); border: 1px solid rgba(255,108,77,.65); border-radius: 4px; box-shadow: 0 0 18px rgba(255,54,48,.28); font-size: 10px; font-weight: 950; letter-spacing: .08em; text-align: center; transition: opacity .12s, transform .12s; }
.enemy-alert.show { opacity: 1; transform: translate(-50%,0); }
.targeting-hint { position: absolute; left: 50%; top: calc(50% + 86px); width: max-content; max-width: calc(100vw - 28px); transform: translateX(-50%); color: var(--yellow); font-weight: 900; font-size: 12px; text-align: center; text-shadow: 0 2px 5px #000; }
.mount-hint { position: absolute; left: 50%; top: calc(50% + 94px); transform: translateX(-50%); display: flex; align-items: center; gap: 7px; padding: 6px 10px; color: #fff8c7; background: rgba(18,24,34,.74); border: 1px solid rgba(255,216,69,.55); border-radius: 5px; box-shadow: 0 6px 22px rgba(0,0,0,.28), 0 0 18px rgba(255,212,59,.12); font-size: 10px; font-weight: 900; letter-spacing: .09em; }
.mount-hint kbd { border-color: #f3c53a; background: #5b471d; }
.voice-subtitle { position: absolute; left: 50%; bottom: 122px; transform: translate(-50%,8px); opacity: 0; padding: 7px 16px; color: #fff4b7; background: linear-gradient(90deg, transparent, rgba(10,14,25,.74) 18%, rgba(10,14,25,.74) 82%, transparent); font-size: 14px; font-weight: 950; font-style: italic; letter-spacing: .055em; text-shadow: 0 2px 4px #000; transition: opacity .16s, transform .16s; }
.voice-subtitle.show { opacity: 1; transform: translate(-50%,0); }
.low-health { position: absolute; inset: 0; opacity: 0; box-shadow: inset 0 0 130px 44px rgba(201,11,46,.9); transition: opacity .15s; }

.player-hud { position: absolute; left: 28px; bottom: 25px; display: flex; align-items: flex-end; gap: 13px; }
.player-portrait { width: 86px; height: 78px; overflow: hidden; border: 3px solid var(--cyan); border-radius: 50% 42% 48% 44%; background: #168ed4; box-shadow: 0 0 0 5px rgba(10,15,28,.8), 0 8px 24px rgba(0,0,0,.4); }
.player-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 44%; transform: scale(1.15); }
.player-bars { width: min(315px, 28vw); }
.player-name { display: flex; align-items: baseline; gap: 9px; margin-bottom: 5px; text-shadow: 0 2px 4px #000; }.player-name strong { font-size: 21px; }.player-name span { color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.health-bar { position: relative; height: 23px; overflow: hidden; background: rgba(8,12,22,.86); border: 2px solid #dceeff; clip-path: polygon(0 0, 100% 0, 96% 100%, 0 100%); }
.health-bar i, .stamina-bar i { position: absolute; inset: 0; transform-origin: left; background: linear-gradient(90deg, #39dda5, #70f2bd); }
.health-bar b { position: absolute; inset: 0 13px; display: flex; align-items: center; justify-content: flex-end; font-size: 11px; text-shadow: 0 1px 3px #000; }
.stamina-bar { position: relative; height: 7px; margin-top: 5px; overflow: hidden; background: rgba(8,12,22,.8); }.stamina-bar i { background: var(--yellow); }.stamina-bar span { position: absolute; right: 2px; top: -1px; color: #121524; font-size: 6px; font-weight: 900; }

.ultimate-wrap { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ultimate-ring { --super: 0deg; width: 78px; height: 78px; padding: 6px; border-radius: 50%; background: conic-gradient(var(--yellow) var(--super), rgba(19,26,42,.78) 0); box-shadow: 0 0 0 4px rgba(8,12,23,.8); }
.ultimate-ring > div { width: 100%; height: 100%; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle, #242b43, #101523); border: 2px solid #58647e; }
.ultimate-ring small { color: var(--muted); font-weight: 900; }.ultimate-ring strong { display: block; font-size: 17px; }
.ultimate-ring.ready { animation: superPulse 1s infinite; box-shadow: 0 0 24px rgba(255,215,77,.72), 0 0 0 4px rgba(8,12,23,.8); }
.ultimate-wrap > span { color: #d6deee; font-size: 10px; font-weight: 800; text-shadow: 0 2px 4px #000; }
@keyframes superPulse { 50% { transform: scale(1.06); } }

.weapon-hud { position: absolute; right: 30px; bottom: 25px; display: flex; align-items: flex-end; gap: 18px; }
.ability-stack { display: flex; align-items: flex-end; gap: 9px; }
.ability-key { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }.ability-key kbd { width: 48px; height: 43px; font-size: 16px; border-color: #9c6aff; background: #322750; }
.gadget-ability { --gadget: 360deg; position: relative; }
.gadget-ability kbd { border-color: transparent; background: linear-gradient(#132a38,#132a38) padding-box, conic-gradient(var(--cyan) var(--gadget), rgba(77,95,110,.6) 0) border-box; border-width: 3px; color: #cfffff; box-shadow: inset 0 0 12px rgba(43,222,240,.16); }
.gadget-ability b { position: absolute; top: 29px; padding: 1px 4px; color: #b9c5d7; background: #0f1724; border-radius: 3px; font-size: 7px; letter-spacing: .05em; }
.gadget-ability.ready kbd { color: #111d28; background: linear-gradient(135deg,#c9ffff,#33ddec); border-color: #c4ffff; box-shadow: 0 0 18px rgba(49,215,237,.54); }
.gadget-ability.ready b { color: #baffff; }
.ammo-block { width: min(270px, 31vw); min-width: 220px; padding: 12px 16px; background: linear-gradient(120deg, rgba(12,16,28,.91), rgba(31,40,57,.72)); border: 1px solid rgba(151,190,225,.16); border-right: 4px solid var(--orange); box-shadow: 0 12px 30px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.05); backdrop-filter: blur(7px); transform: skewX(-4deg); }
.ammo-block > * { transform: skewX(4deg); }.ammo-text { font-size: 29px; font-weight: 950; text-align: right; }
.ammo-cells { display: flex; width: 100%; gap: 6px; margin: 4px 0 7px; }.ammo-cell { --charge: 0%; position: relative; flex: 1 1 0; min-width: 0; height: 9px; overflow: hidden; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); }.ammo-cell::after { content: ""; position: absolute; inset: 0; width: var(--charge); background: linear-gradient(90deg, var(--orange), var(--yellow)); box-shadow: 0 0 9px var(--orange); }
.reload-progress { --reload: 0%; position: relative; height: 12px; margin: 1px 0 5px; overflow: hidden; background: rgba(4,9,17,.72); border: 1px solid rgba(118,219,255,.18); opacity: .4; }
.reload-progress.active { opacity: 1; }
.reload-progress i { position: absolute; inset: 0; width: var(--reload); background: linear-gradient(90deg,#34b9ee,#7ef5ff); box-shadow: 0 0 10px #31d7ed; transition: width .03s linear; }
.reload-progress span { position: absolute; inset: 0; display: grid; place-items: center; color: #eefcff; font-size: 7px; font-weight: 950; letter-spacing: .08em; text-shadow: 0 1px 3px #001; }
.ammo-block small { display: block; color: var(--muted); text-align: right; font-size: 9px; }.ammo-block small kbd { min-width: 20px; min-height: 18px; font-size: 9px; }
.death-overlay { position: absolute; left: 50%; top: 50%; min-width: 260px; transform: translate(-50%,-50%); padding: 26px 30px; color: #fff; background: rgba(7,11,20,.82); border-top: 3px solid var(--red); box-shadow: 0 20px 60px rgba(0,0,0,.5); text-align: center; backdrop-filter: blur(8px); }
.death-overlay strong { display: block; color: #ff7182; font-size: 25px; }.death-overlay span { display: block; margin-top: 7px; color: #cbd5e5; font-size: 12px; }.death-overlay b { color: #fff36d; font-size: 20px; }

.overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: rgba(5,8,16,.68); backdrop-filter: blur(9px); animation: overlayIn .28s ease both; }
.overlay-card { width: min(460px, 94vw); padding: 34px; background: var(--panel-strong); border: 1px solid rgba(155,177,220,.23); border-top: 3px solid var(--purple); box-shadow: 0 28px 80px rgba(0,0,0,.48); text-align: center; }
.overlay-card h2 { margin: 0 0 10px; font-size: 35px; }.overlay-card p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.stack-actions { display: grid; gap: 9px; margin-top: 24px; }.stack-actions button { width: 100%; }.stack-actions.horizontal { grid-template-columns: 1fr 1fr; }
.result-card { width: min(620px, 94vw); }.result-card h2.win { color: var(--yellow); }.result-card h2.lose { color: var(--red); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 24px 0; }.stats-grid span { padding: 13px; background: rgba(255,255,255,.045); color: var(--muted); font-size: 10px; text-transform: uppercase; }.stats-grid b { display: block; margin-top: 4px; color: var(--ink); font-size: 19px; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 820px) {
  .menu-screen { grid-template-columns: 1fr; align-content: start; padding: 44px 24px; overflow-y: auto; }
  .menu-copy h1 { font-size: 58px; }.mission-card { width: 100%; }.player-bars { width: 220px; }
  .weapon-hud { right: 14px; }.player-hud { left: 14px; }.ammo-block { width: min(220px, 48vw); min-width: 178px; }.ability-stack .ability-key:first-child { display: none; }
  .settings-panel { grid-template-columns: repeat(2,minmax(130px,1fr)); }
  .enemy-roster-hud { display: none; }
  .enemy-legend { grid-template-columns: 1fr; }
}

@media (max-height: 650px) {
  .player-hud, .weapon-hud { bottom: 12px; transform: scale(.86); }.player-hud { transform-origin: bottom left; }.weapon-hud { transform-origin: bottom right; }
  .ultimate-wrap { bottom: 8px; transform: translateX(-50%) scale(.82); }.menu-screen { padding-top: 24px; padding-bottom: 24px; }.mission-card { transform: scale(.9); }.settings-panel { margin-top: 10px; }
}

/* Mobile FPS controls */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

.mobile-note,
.mobile-controls,
.orientation-prompt { display: none; }

html.touch-device,
html.touch-device body {
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.touch-device .desktop-note { display: none; }
.touch-device .mobile-note { display: block; }
.touch-device button:hover { transform: none; filter: none; }

.touch-device .menu-screen {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 38vw);
  align-items: center;
  gap: 14px;
  padding:
    max(12px, var(--safe-top))
    max(16px, var(--safe-right))
    max(12px, var(--safe-bottom))
    max(16px, var(--safe-left));
}
.touch-device .menu-copy h1 { font-size: clamp(40px, 8.6vh, 58px); }
.touch-device .eyebrow { margin-bottom: 7px; font-size: 9px; }
.touch-device .lead { margin: 10px 0; font-size: 12px; line-height: 1.42; }
.touch-device .menu-actions { gap: 8px; }
.touch-device .primary,
.touch-device .secondary { min-height: 44px; padding: 0 16px; }
.touch-device .primary { min-width: 180px; }
.touch-device .settings-panel {
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 5px;
  margin-top: 10px;
}
.touch-device .settings-panel label { min-height: 31px; padding: 4px 6px; font-size: 9px; }
.touch-device .settings-panel select { min-width: 58px; padding: 4px 5px; font-size: 9px; }
.touch-device .pointer-note { margin: 7px 0 0; font-size: 9px; line-height: 1.35; }
.touch-device .mission-card { padding: 14px; transform: none; }
.touch-device .mission-card .control-grid { display: none; }
.touch-device .portrait-wrap { width: 78px; height: 68px; margin-right: 10px; }
.touch-device .mission-card h2 { font-size: 25px; }
.touch-device .mission-card p { font-size: 11px; }
.touch-device .mission-divider { margin: 12px 0; }
.touch-device .mission-card > strong { font-size: 18px; }
.touch-device .enemy-legend { margin-top: 8px; }
.touch-device .enemy-legend span { padding: 5px 4px; }

.mobile-controls {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  touch-action: none;
}
.touch-device .hud:not(.hidden) .mobile-controls { display: block; }
html.touch-device body.game-paused .mobile-controls,
html.touch-device body.game-result .mobile-controls { display: none !important; }

.mobile-look-zone {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  bottom: 0;
  left: 40%;
  pointer-events: auto;
  touch-action: none;
}
.mobile-look-zone.active {
  background: radial-gradient(circle at 72% 62%, rgba(49, 215, 237, .055), transparent 28%);
}

.mobile-help {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(12px, var(--safe-bottom));
  transform: translateX(-50%);
  max-width: 48vw;
  padding: 6px 12px;
  border: 1px solid rgba(155, 221, 255, .2);
  border-radius: 999px;
  background: rgba(7, 12, 24, .66);
  color: #c4d3e8;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  opacity: 1;
  transition: opacity .3s ease;
  pointer-events: none;
  backdrop-filter: blur(5px);
}
.mobile-help b { color: var(--cyan); }
.mobile-help.dismissed { opacity: 0; }

.mobile-move-stick {
  --stick-x: 0px;
  --stick-y: 0px;
  position: absolute;
  z-index: 3;
  left: max(14px, calc(var(--safe-left) + 10px));
  bottom: max(14px, calc(var(--safe-bottom) + 8px));
  width: 118px;
  height: 118px;
  border: 1px solid rgba(214, 238, 255, .28);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(44, 70, 98, .22) 0 48%, rgba(11, 19, 33, .46) 50% 100%);
  box-shadow: inset 0 0 24px rgba(102, 203, 255, .08), 0 6px 22px rgba(0, 0, 0, .18);
  pointer-events: auto;
  touch-action: none;
}
.mobile-move-stick > i {
  position: absolute;
  inset: 17px;
  border: 1px dashed rgba(174, 218, 246, .2);
  border-radius: 50%;
}
.mobile-move-stick > b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translate(calc(-50% + var(--stick-x)), calc(-50% + var(--stick-y)));
  border: 2px solid rgba(224, 247, 255, .7);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, rgba(140, 228, 255, .88), rgba(35, 130, 179, .76) 52%, rgba(13, 45, 71, .88));
  box-shadow: 0 5px 16px rgba(0, 0, 0, .34), 0 0 14px rgba(49, 215, 237, .18);
}
.mobile-move-stick > span {
  position: absolute;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
  color: rgba(230, 242, 255, .65);
  font-size: 8px;
  font-weight: 900;
}
.mobile-move-stick.active { border-color: rgba(76, 223, 247, .58); }
.mobile-move-stick.sprinting { box-shadow: inset 0 0 28px rgba(255, 211, 73, .15), 0 0 20px rgba(255, 200, 66, .13); }
.mobile-move-stick.sprinting > b { border-color: var(--yellow); }

.mobile-action {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(229, 242, 255, .55);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, rgba(54, 67, 93, .9), rgba(17, 25, 42, .91));
  box-shadow: 0 7px 20px rgba(0, 0, 0, .32), inset 0 1px rgba(255, 255, 255, .14);
  opacity: .88;
  pointer-events: auto;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.mobile-action > b { font-size: 18px; line-height: 1; }
.mobile-action > span { font-size: 7px; font-weight: 900; line-height: 1; }
.mobile-action > small { font-size: 6px; font-weight: 900; line-height: 1; }
.mobile-action.pressed,
.mobile-action:active { transform: scale(.92); opacity: 1; filter: brightness(1.14); }

.mobile-fire {
  --ammo: 100%;
  right: max(14px, calc(var(--safe-right) + 9px));
  bottom: max(14px, calc(var(--safe-bottom) + 8px));
  width: 82px;
  height: 82px;
  border-color: rgba(255, 227, 154, .85);
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 212, 99, .98), rgba(255, 112, 49, .94) 53%, rgba(132, 35, 31, .96));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .38), 0 0 19px rgba(255, 113, 44, .24);
}
.mobile-fire::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 9px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--yellow) var(--ammo), rgba(30, 24, 34, .55) 0);
}
.mobile-fire > b { font-size: 26px; text-shadow: 0 2px 7px rgba(76, 17, 12, .7); }
.mobile-fire.empty { filter: saturate(.35); opacity: .68; }
.mobile-controls.targeting .mobile-fire {
  animation: mobileConfirmPulse .72s infinite alternate;
  border-color: #fff39b;
}

.mobile-jump {
  right: max(105px, calc(var(--safe-right) + 100px));
  bottom: max(15px, calc(var(--safe-bottom) + 9px));
  width: 58px;
  height: 58px;
  border-color: rgba(151, 230, 255, .68);
}
.mobile-aim {
  right: max(108px, calc(var(--safe-right) + 103px));
  bottom: max(79px, calc(var(--safe-bottom) + 73px));
  width: 50px;
  height: 50px;
  border-color: rgba(255, 218, 93, .7);
}
.mobile-aim.active {
  color: #172034;
  background: linear-gradient(145deg, #fff19a, #ff9b42);
  box-shadow: 0 0 18px rgba(255, 199, 73, .5);
}
.mobile-reload {
  right: max(101px, calc(var(--safe-right) + 96px));
  bottom: max(140px, calc(var(--safe-bottom) + 134px));
  width: 48px;
  height: 48px;
  opacity: .72;
}
.mobile-reload.active { opacity: .96; border-color: rgba(255, 207, 80, .75); }
.mobile-ultimate {
  --super: 0deg;
  right: max(172px, calc(var(--safe-right) + 167px));
  bottom: max(15px, calc(var(--safe-bottom) + 9px));
  width: 60px;
  height: 60px;
  border: 3px solid transparent;
  background:
    linear-gradient(#29263d, #131a2c) padding-box,
    conic-gradient(var(--yellow) var(--super), rgba(80, 88, 111, .7) 0) border-box;
}
.mobile-ultimate.ready {
  box-shadow: 0 0 22px rgba(255, 215, 77, .52), inset 0 1px rgba(255, 255, 255, .18);
  animation: mobileReadyPulse 1s infinite;
}
.mobile-ultimate.targeting {
  color: #1d1829;
  background: linear-gradient(145deg, #fff188, #ff9b38);
}
.mobile-gadget {
  --gadget: 0deg;
  right: max(172px, calc(var(--safe-right) + 167px));
  bottom: max(79px, calc(var(--safe-bottom) + 73px));
  width: 56px;
  height: 56px;
  border: 3px solid transparent;
  background:
    linear-gradient(#202c3b, #111926) padding-box,
    conic-gradient(var(--cyan) var(--gadget), rgba(71, 91, 107, .7) 0) border-box;
}
.mobile-gadget.ready {
  color: #10202b;
  background: linear-gradient(145deg, #d5ffff, #39ddef);
  box-shadow: 0 0 20px rgba(49, 215, 237, .44);
}
.mobile-pause {
  top: max(10px, calc(var(--safe-top) + 7px));
  right: max(12px, calc(var(--safe-right) + 8px));
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(10, 17, 31, .74);
}
.mobile-pause > b { font-size: 16px; letter-spacing: -2px; }

@keyframes mobileReadyPulse {
  50% { filter: brightness(1.2); }
}
@keyframes mobileConfirmPulse {
  to { box-shadow: 0 0 28px rgba(255, 218, 70, .65); }
}

.touch-device .player-hud {
  left: max(10px, calc(var(--safe-left) + 7px));
  top: max(49px, calc(var(--safe-top) + 45px));
  bottom: auto;
  transform: scale(.62);
  transform-origin: top left;
}
.touch-device .weapon-hud {
  right: max(10px, calc(var(--safe-right) + 7px));
  top: max(54px, calc(var(--safe-top) + 50px));
  bottom: auto;
  transform: none;
}
.touch-device .weapon-hud .ability-stack,
.touch-device .ultimate-wrap { display: none; }
.touch-device .ammo-block {
  width: 142px;
  min-width: 142px;
  padding: 7px 10px;
}
.touch-device .ammo-text { font-size: 20px; }
.touch-device .ammo-cells { gap: 3px; margin: 2px 0 4px; }
.touch-device .ammo-cell { height: 6px; }
.touch-device .ammo-block small { font-size: 7px; }
.touch-device .top-bar {
  top: var(--safe-top);
  width: 330px;
  height: 45px;
  gap: 5px;
}
.touch-device .mission-tag,
.touch-device .enemy-roster-hud { display: none; }
.touch-device .team-score { min-width: 52px; padding: 3px 5px; }
.touch-device .team-score small { font-size: 7px; }.touch-device .team-score strong { font-size: 21px; }
.touch-device .match-goal { min-width: 78px; }.touch-device .match-goal b { font-size: 8px; }.touch-device .match-goal span { font-size: 7px; }
.touch-device .top-bar time { font-size: 11px; }
.touch-device .ally-status { left: max(7px, var(--safe-left)); top: max(91px, calc(var(--safe-top) + 85px)); gap: 3px; }
.touch-device .ally-status > div { width: 116px; padding: 4px 6px; }.touch-device .ally-status header { font-size: 7px; }
.touch-device .kill-feed {
  top: max(104px, calc(var(--safe-top) + 98px));
  right: max(8px, calc(var(--safe-right) + 5px));
  gap: 4px;
}
.touch-device .kill-feed div { padding: 5px 7px; font-size: 9px; }
.touch-device .kill-feed div:nth-child(n+3) { display: none; }
.touch-device .death-overlay { min-width: 210px; padding: 16px 20px; }
.touch-device .voice-subtitle {
  bottom: max(11px, calc(var(--safe-bottom) + 7px));
  max-width: 38vw;
  padding: 5px 9px;
  font-size: 10px;
}
.touch-device .targeting-hint,
.touch-device .mount-hint {
  top: 59%;
  font-size: 9px;
}
.touch-device .enemy-alert { top: max(48px, calc(var(--safe-top) + 44px)); }
.touch-device .status-message { font-size: 10px; }
.touch-device .overlay {
  padding:
    max(10px, var(--safe-top))
    max(12px, var(--safe-right))
    max(10px, var(--safe-bottom))
    max(12px, var(--safe-left));
}
.touch-device .overlay-card {
  max-height: calc(100vh - 20px - var(--safe-top) - var(--safe-bottom));
  padding: 16px;
  overflow-y: auto;
}
.touch-device .overlay-card h2 { margin-bottom: 5px; font-size: 26px; }
.touch-device .overlay-card p:not(.eyebrow) { margin: 6px 0; font-size: 11px; }
.touch-device .stats-grid {
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 10px 0;
}
.touch-device .stats-grid span { padding: 6px 3px; font-size: 7px; }
.touch-device .stats-grid b { margin-top: 2px; font-size: 13px; }
.touch-device .stack-actions { margin-top: 10px; }

.orientation-prompt {
  position: fixed;
  inset: 0;
  z-index: 60;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 26px;
  color: #eef7ff;
  background:
    radial-gradient(circle at 50% 42%, rgba(76, 111, 169, .22), transparent 35%),
    rgba(7, 11, 22, .97);
  text-align: center;
}
.orientation-prompt strong { font-size: 22px; }
.orientation-prompt span { color: var(--muted); font-size: 12px; }
.phone-turn {
  position: relative;
  width: 82px;
  height: 52px;
  margin-bottom: 8px;
  border: 3px solid var(--cyan);
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(49, 215, 237, .26);
  animation: phoneTurn 1.8s ease-in-out infinite;
}
.phone-turn::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 50%;
  width: 4px;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--yellow);
}
@keyframes phoneTurn {
  0%, 18% { transform: rotate(90deg); }
  58%, 100% { transform: rotate(0deg); }
}

@media (orientation: portrait) {
  .touch-device .orientation-prompt { display: grid; }
  .touch-device .mobile-controls { display: none !important; }
}

@media (max-height: 430px) {
  .touch-device .menu-screen {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 38vw);
    gap: 10px;
    padding-left: max(12px, var(--safe-left));
    padding-right: max(12px, var(--safe-right));
  }
  .touch-device .menu-copy h1 { font-size: clamp(36px, 10.8vh, 46px); }
  .touch-device .lead { margin: 7px 0; font-size: 10px; }
  .touch-device .primary,
  .touch-device .secondary { min-height: 39px; }
  .touch-device .settings-panel label { min-height: 27px; }
  .touch-device .mission-card { padding: 10px; }
  .touch-device .mission-card .enemy-legend { display: none; }
  .touch-device .mobile-move-stick { width: 106px; height: 106px; }
  .touch-device .mobile-move-stick > b { width: 47px; height: 47px; }
  .touch-device .mobile-fire { width: 74px; height: 74px; }
  .touch-device .mobile-jump { right: max(96px, calc(var(--safe-right) + 91px)); width: 52px; height: 52px; }
  .touch-device .mobile-aim { right: max(98px, calc(var(--safe-right) + 93px)); bottom: max(71px, calc(var(--safe-bottom) + 65px)); width: 48px; height: 48px; }
  .touch-device .mobile-reload { right: max(93px, calc(var(--safe-right) + 88px)); bottom: max(124px, calc(var(--safe-bottom) + 118px)); }
  .touch-device .mobile-ultimate { right: max(157px, calc(var(--safe-right) + 152px)); width: 55px; height: 55px; }
  .touch-device .mobile-gadget { right: max(157px, calc(var(--safe-right) + 152px)); bottom: max(73px, calc(var(--safe-bottom) + 67px)); width: 51px; height: 51px; }
  .touch-device .mobile-help { font-size: 8px; }
}
