:root {
  --ink: #fffaf0;
  --muted: #d9d2c3;
  --accent: #ffb238;
  --red: #ff5a4e;
  --panel: rgba(24, 20, 34, 0.7);
  --display: 'Bungee', 'Arial Black', system-ui, sans-serif;
}
.sound-credits { display: inline-block; margin-left: 16px; color: var(--muted); font-size: 11px; }
.sound-credits:hover, .sound-credits:focus-visible { color: var(--accent); }

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #9fd4ff;
  color: var(--ink);
  font: 600 15px/1.35 'Nunito', system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

#game,
#game canvas,
.labels { position: fixed; inset: 0; }
.labels { pointer-events: none; }
#game { z-index: 0; isolation: isolate; }
#game canvas { display: block; width: 100%; height: 100%; }
body:not(.playing) .labels { visibility: hidden; }

.label { text-align: center; font-weight: 800; font-size: 13px; white-space: nowrap; text-shadow: 0 1px 2px #000, 0 0 5px #000; }
.label .hp { width: 50px; height: 4px; margin: 2px auto 0; border-radius: 2px; overflow: hidden; background: rgba(0, 0, 0, 0.55); }
.label .hp i { display: block; width: 100%; height: 100%; background: #6dff8e; }

kbd { padding: 1px 6px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(0, 0, 0, 0.35); font: 800 12px 'Nunito', sans-serif; }

/* HUD */
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; display: none; }
body.playing #hud { display: block; }

#crosshair { --kick: 0px; position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#crosshair::after { content: ''; position: absolute; left: -1px; top: -1px; width: 2px; height: 2px; background: #fff; box-shadow: 0 0 2px #000; }
#crosshair i { position: absolute; background: #fff; box-shadow: 0 0 2px #000; transition: background 0.08s; }
#crosshair i:nth-child(1) { left: -1px; top: calc(-12px - var(--kick)); width: 2px; height: 6px; }
#crosshair i:nth-child(2) { left: -1px; top: calc(6px + var(--kick)); width: 2px; height: 6px; }
#crosshair i:nth-child(3) { top: -1px; left: calc(-12px - var(--kick)); width: 6px; height: 2px; }
#crosshair i:nth-child(4) { top: -1px; left: calc(6px + var(--kick)); width: 6px; height: 2px; }
#hit-marker { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(45deg); opacity: 0; color: #fff; filter: drop-shadow(0 1px 2px #000); }
#hit-marker.on { opacity: 1; }
#hit-marker i { position: absolute; background: currentColor; border-radius: 1px; }
#hit-marker i:nth-child(1) { left: -1px; top: -21px; width: 2px; height: 8px; }
#hit-marker i:nth-child(2) { left: -1px; top: 13px; width: 2px; height: 8px; }
#hit-marker i:nth-child(3) { top: -1px; left: -21px; width: 8px; height: 2px; }
#hit-marker i:nth-child(4) { top: -1px; left: 13px; width: 8px; height: 2px; }
#hit-marker.headshot { color: #ffc754; filter: drop-shadow(0 0 3px #ffb238); }
#hit-marker.kill { color: #9dffca; filter: drop-shadow(0 0 4px #4dff88); }

#timer { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); padding: 4px 14px; border-radius: 10px; background: var(--panel); font: 400 22px var(--display); }
#room-info { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); padding: 5px 10px; border-radius: 6px; background: var(--panel); color: var(--muted); font-size: 10px; letter-spacing: 1px; white-space: nowrap; }

#mini { position: absolute; top: 14px; left: 16px; min-width: 170px; padding: 8px 12px; border-radius: 10px; background: var(--panel); }
#mini div { display: flex; justify-content: space-between; gap: 12px; }
#mini .me { color: var(--accent); }

#feed { position: absolute; top: 14px; right: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
#feed div { padding: 5px 10px; border-radius: 8px; background: var(--panel); font-weight: 800; animation: slide 0.25s ease-out; }
#feed .tag { margin: 0 6px; padding: 1px 6px; border-radius: 4px; font-size: 11px; color: #1d1a26; background: var(--accent); }
#feed .tag.crush { background: #ff8a5c; }
#feed .tag.self { background: #aaa; }
#feed .my-kill { border-left: 3px solid #9dffca; background: #102b24e8; }
#feed .my-death { border-left: 3px solid #ff8b7e; background: #361a21e8; }
.reduced-fx #feed div { animation: none; }

#health { position: absolute; left: 20px; bottom: 18px; }
.lbl { font: 400 12px var(--display); color: var(--muted); }
#health .row { display: flex; align-items: center; gap: 10px; }
#hpnum { font: 400 40px/1 var(--display); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.bar { width: 200px; height: 12px; border-radius: 6px; overflow: hidden; background: rgba(0, 0, 0, 0.45); }
.bar i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #4dff88, #c4ff5c); }
.bar.small { display: inline-block; width: 70px; height: 7px; margin-left: 6px; vertical-align: middle; }
.bar.small i { background: var(--accent); }

#weapons { position: absolute; right: 20px; bottom: 18px; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--panel); }

#popups { position: absolute; left: 50%; top: 65%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(85vw, 320px); }
#kill-count { position: absolute; left: 50%; top: 59%; transform: translateX(-50%); color: #ffe0a5; font: 800 12px/1.1 'Nunito', sans-serif; letter-spacing: 1px; text-shadow: 0 2px 4px #000; opacity: 0; transition: opacity .2s ease-out; }
#kill-count.on { opacity: 1; }
.reduced-fx #kill-count { transition: none; }
.pop { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border: 1px solid #ffffff18; border-left: 3px solid var(--accent); border-radius: 3px; background: #121a25ed; text-align: left; overflow-wrap: anywhere; color: var(--ink); animation: elimination 2.2s ease-out forwards; }
.pop-icon { flex: 0 0 24px; color: var(--accent); font: 400 30px/1 system-ui, sans-serif; text-align: center; }
.pop small { display: block; color: #ffd587; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; }
.pop strong { display: block; margin-top: 2px; font-size: 16px; font-weight: 800; }
.pop { animation-duration: 2.8s; box-shadow: 0 5px 24px #0005; }
.pop > span:nth-child(2) { flex: 1; min-width: 0; }
.pop .pop-reward { flex-shrink: 0; text-align: right; border-left: 1px solid #ffffff26; padding-left: 12px; }
.pop .pop-reward strong { color: #ffe09a; font-size: 15px; }
.pop .pop-reward small { color: #8fffc4; margin-top: 3px; letter-spacing: .5px; }
.pop.multi { border-color: #ffc75490; background: #352918f2; }
.pop.multi .pop-icon { text-shadow: 0 0 14px #ffc754; }
#kill-burst { position: absolute; left: calc(50% - 29px); top: calc(50% - 29px); width: 58px; height: 58px; border: 1px solid #9dffca90; border-radius: 50%; box-shadow: 0 0 14px #4dff8830; opacity: 0; }
#kill-burst.on { opacity: 1; }
#heal-notice { position: absolute; left: 32px; bottom: 132px; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid #89ffc04d; border-radius: 5px; background: #112c24eb; color: #9dffca; opacity: 0; transition: opacity .25s; }
#heal-notice.on { opacity: 1; }
#heal-notice strong { font-size: 21px; font-variant-numeric: tabular-nums; }
#heal-notice span { font-size: 11px; }
#health { padding: 8px 12px; background: var(--panel); border: 1px solid #ffffff16; border-radius: 8px; transition: background .25s, border-color .25s; }
#health.healing { background: #10382ce8; border-color: #8affbd80; box-shadow: 0 0 26px #4dff8820; }
#health.healing #hpnum, #health.healing #health-feedback { color: #9dffca; }
.health-rule { color: var(--muted); font-size: 10px; }
.reduced-fx #heal-notice, .reduced-fx #health { transition: none; }
#match-position { position: absolute; top: 85px; left: 50%; transform: translateX(-50%); color: #fff0ce; padding: 4px 10px; border-radius: 4px; background: #121a25b8; font-size: 11px; white-space: nowrap; }
#match-position:empty { display: none; }
@keyframes elimination {
  0% { opacity: 0; transform: translateY(10px) scale(.9); }
  12%, 75% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-8px); }
}
#spawn-protection { position: absolute; left: 50%; bottom: 15%; transform: translateX(-50%); display: none; padding: 7px 14px; border: 1px solid #80dfff80; border-radius: 20px; color: #bdecff; background: #123b50dc; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; }
#spawn-protection.on { display: block; }
.label.shielded::after { content: 'PROTECTED'; display: block; color: #a8e7ff; font-size: 9px; letter-spacing: 1px; margin-top: 3px; }
.label.shielded .hp { outline: 1px solid #a8e7ff; }
.respawn-track { width: 180px; height: 5px; margin: 18px auto 0; border-radius: 4px; overflow: hidden; background: #ffffff25; }
.respawn-track i { display: block; width: 100%; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.reduced-fx .pop { animation: none; }

#scores { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px)); padding: 16px 20px; border-radius: 14px; background: rgba(20, 16, 30, 0.88); display: none; }
#scores.on { display: block; }
#scores h3 { margin: 0 0 8px; font: 400 18px var(--display); }
#scores table { width: 100%; border-collapse: collapse; }
#scores th { text-align: left; color: var(--muted); font-weight: 800; }
#scores td, #scores th { padding: 4px 6px; }
#scores th:not(:first-child), #scores td:not(:first-child) { text-align: right; width: 40px; }
#scores tr.me td { color: var(--accent); }

#hurt { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; box-shadow: inset 0 0 200px 50px rgba(255, 40, 30, 0.7); }
#hurt.on { animation: damage-flash .4s ease-out; }
@keyframes damage-flash { from { opacity: var(--hurt-strength, .4); } to { opacity: 0; } }
.reduced-fx #hurt { box-shadow: inset 0 0 70px 10px #ff281e50; }

/* Overlays */
.overlay { position: fixed; inset: 0; z-index: 10; display: none; place-items: center; }
#menu { display: grid; background: radial-gradient(ellipse at center, rgba(20, 16, 30, 0.15), rgba(20, 16, 30, 0.7)); }
body.playing #menu { display: none; }
#paused { z-index: 8; background: rgba(20, 16, 30, 0.5); }
#paused h2 { color: var(--accent); text-shadow: 0 4px 0 #b4561f; }
#paused.on { display: grid; }
#death { z-index: 7; pointer-events: none; background: rgba(60, 10, 0, 0.3); }
#death.on { display: grid; }
#death p { margin: 8px 0 0; font-size: 18px; }

.card { width: min(460px, calc(100vw - 32px)); text-align: center; }
h1 {
  margin: 0;
  font: 400 clamp(40px, 9vw, 72px)/1 var(--display);
  color: var(--accent);
  text-shadow: 0 4px 0 #b4561f, 0 8px 0 #5c2a10, 0 14px 30px rgba(0, 0, 0, 0.45);
}
h2 { margin: 0; font: 400 52px/1 var(--display); color: var(--red); text-shadow: 0 4px 0 #5c1510; }
.tag { margin: 16px 0 22px; font-size: 18px; font-weight: 800; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.sub { color: var(--muted); }

input {
  width: 100%;
  padding: 14px 16px;
  border: 3px solid #2a2338;
  border-radius: 12px;
  outline: none;
  background: #fffaf0;
  color: #2a2338;
  font: 800 18px 'Nunito', sans-serif;
  text-align: center;
  user-select: text;
}
input:focus { border-color: var(--accent); }

.play {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  box-shadow: 0 6px 0 #b4561f;
  color: #2a1606;
  font: 400 22px var(--display);
  cursor: pointer;
}
.play:active { transform: translateY(3px); box-shadow: 0 3px 0 #b4561f; }
.controls { margin-top: 18px; line-height: 2; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.hint { margin-top: 4px; font-size: 14px; color: var(--muted); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }

#banner { position: fixed; left: 50%; top: 22%; z-index: 9; transform: translateX(-50%); display: none; padding: 14px 26px; border-radius: 14px; background: var(--panel); font: 400 28px var(--display); color: var(--accent); text-align: center; white-space: nowrap; }
#banner.on { display: block; animation: slide 0.3s ease-out; }
#offline { position: fixed; top: 60px; left: 50%; z-index: 20; display: none; transform: translateX(-50%); padding: 10px 16px; border-radius: 10px; background: var(--red); font-weight: 800; }
#offline.on { display: block; }

@keyframes fade { from { opacity: 1; } to { opacity: 0; } }
@keyframes slide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; } }
@keyframes pop {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.6); }
  15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -50px) scale(1); }
}

@media (max-width: 640px) {
  #mini, #weapons { display: none; }
  .bar { width: 130px; }
}

/* Clear action feedback without blocking input or changing aim. */
#low-health {position:fixed;inset:0;z-index:3;pointer-events:none;opacity:0;border:2px solid #ee6b64;box-shadow:inset 0 0 85px #d93b3540;transition:opacity .25s;}
#low-health.on {opacity:1;}
#action-feedback {position:absolute;left:50%;top:62%;transform:translateX(-50%);padding:6px 12px;border-radius:6px;background:#162337cc;color:#ffe1a0;font-size:12px;letter-spacing:1px;font-weight:800;opacity:0;transition:opacity .12s;pointer-events:none;text-align:center;max-width:80vw;}
#action-feedback.on {opacity:1;}
#damage-number {position:absolute;left:calc(50% + 34px);top:calc(50% - 38px);color:#fffaf0;font-size:28px;font-weight:800;font-variant-numeric:tabular-nums;text-shadow:0 2px 4px #000;opacity:0;pointer-events:none;}
#damage-number.on {opacity:1;}
#damage-number.headshot {color:#ffc754;}
#damage-direction {position:fixed;left:50%;top:50%;width:200px;height:200px;transform:translate(-50%,-50%);z-index:4;pointer-events:none;opacity:0;}
.damage-arc {position:absolute;inset:0;}
.damage-arc::before {content:'';position:absolute;top:0;left:68px;width:64px;height:24px;border-top:4px solid #ff8b7e;border-radius:50%;filter:drop-shadow(0 0 3px #b71919);}
.damage-arc::after {content:'';position:absolute;top:7px;left:95px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid #ff8b7e;}
#damage-direction.on {opacity:1;}
#crosshair.kill-confirm i {background:#ffc754;box-shadow:0 0 9px #ffb32e;}
#health .bar i,#rocketfill {transition:width .09s linear;}
#rocket-status {display:inline-block;min-width:42px;margin-left:8px;color:#f6b595;font-size:11px;}
#rocket-status.ready {color:#b7efd9;}
.feedback-settings {display:flex;justify-content:center;gap:8px;margin:14px 0;}
.feedback-settings button {min-height:40px;padding:8px 12px;background:#24334bdd;color:#fff;border:1px solid #ffffff50;border-radius:8px;font:800 11px 'Nunito',sans-serif;cursor:pointer;}
.feedback-settings button:focus-visible {outline:2px solid #ffc754;outline-offset:3px;}
.reduced-fx #action-feedback,.reduced-fx #low-health,.reduced-fx #hpfill,.reduced-fx #rocketfill {transition:none;}

/* Keep confirmation close to the aim point and preserve a readable damage history. */
#health .bar { position: relative; }
#health .bar i { position: absolute; inset: 0 auto 0 0; }
#health #hptrail { background: #fff0cd; transition: width .35s ease-out; }
#health.critical #hpfill { background: #ff6257; }
#health.critical #hpnum { color: #ff9b8e; }
#health-feedback { height: 18px; margin-top: 5px; color: #b7efd9; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
#health.critical #health-feedback { color: #ffb4a6; }
#damage-taken { float: right; color: #ff9b8e; font: 800 16px/1 'Nunito', sans-serif; opacity: 0; }
#damage-taken.on { opacity: 1; }
#hit-label { position: absolute; left: calc(50% + 35px); top: calc(50% - 5px); opacity: 0; color: #fffaf0; font-size: 10px; font-weight: 800; letter-spacing: 1.3px; text-shadow: 0 1px 4px #000; }
#hit-label.on { opacity: 1; }
#hit-label.headshot { color: #ffc754; }
#crosshair.headshot i { background: #ffc754; box-shadow: 0 0 5px #ffb32e; }
#rocket-reticle { position: absolute; top: calc(50% + 38px); left: calc(50% - 48px); width: 96px; height: 3px; background: #151322b3; opacity: 0; }
#rocket-reticle.on { opacity: 1; }
#rocket-reticle i { display: block; height: 100%; background: var(--accent); transform-origin: left; }
#rocket-reticle span { display: block; margin-top: 5px; text-align: center; color: #ffe0a5; font-size: 9px; letter-spacing: 1px; text-shadow: 0 1px 3px #000; }
#rocket-reticle.ready i { background: #9dffca; }
#rocket-reticle.ready span { color: #9dffca; }
#timer.urgent { color: #ffb4a6; box-shadow: inset 0 0 0 1px #ff625780; }
.reduced-fx #health #hptrail { transition: none; }

.overlay .card { padding: 8px; }
.aim-settings { margin-top: 18px; padding: 14px 16px; border: 1px solid #ffffff26; border-radius: 12px; background: #181422dc; text-align: left; }
.aim-settings label { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 12px; font-size: 13px; }
.aim-settings output { color: var(--accent); font-variant-numeric: tabular-nums; }
.aim-settings input[type="range"] { grid-column: 1 / -1; width: 100%; height: 24px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; accent-color: var(--accent); cursor: pointer; }
.aim-settings input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.aim-settings small { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; }

/* Use the whole viewport instead of stacking every control in a scrollable card. */
#menu { padding: clamp(16px, 4vw, 64px); background: linear-gradient(100deg, #141522e8, #172235b8 55%, #141522c9); }
#menu > .card { width: 100%; height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(240px, .8fr); grid-template-rows: 1fr auto; align-items: center; gap: 20px clamp(24px, 5vw, 100px); text-align: left; }
.menu-main, .menu-options { min-width: 0; }
#menu h1 { font-size: clamp(36px, min(7.6vw, 10vh), 100px); }
#menu .tag { margin: 16px 0; font-size: clamp(14px, 1.6vw, 20px); max-width: 440px; }
#menu #name, #menu .play { max-width: 460px; }
.menu-options { padding: clamp(16px, 2.5vw, 32px); border: 1px solid #ffffff26; border-radius: 20px; background: #151725df; box-shadow: 0 16px 48px #0003; }
.menu-options h3 { margin: 0 0 18px; color: var(--accent); font: 400 18px var(--display); }
.menu-options .aim-settings { margin: 0; padding: 0; background: none; border: 0; }
.menu-options .feedback-settings { justify-content: flex-start; margin: 20px 0 14px; flex-wrap: wrap; }
.menu-options .hint { margin: 0; line-height: 1.5; font-size: 12px; }
#menu .controls { grid-column: 1 / -1; margin: 0; padding-top: 12px; border-top: 1px solid #ffffff26; text-align: center; font-size: 13px; }
@media (max-width: 600px) {
  #menu { padding: 16px; }
  #menu > .card { grid-template-columns: 1fr; grid-template-rows: 1fr auto auto; gap: 14px; text-align: center; }
  #menu h1 { font-size: clamp(30px, min(9vw, 8vh), 50px); }
  #menu h1 br { display: none; }
  #menu .tag { margin: 12px auto; font-size: 13px; }
  #menu #name { padding: 10px; font-size: 16px; }
  #menu .play { padding: 10px; font-size: 18px; margin-top: 8px; }
  .menu-options { padding: 14px; text-align: left; border-radius: 12px; }
  .menu-options h3 { margin-bottom: 10px; font-size: 14px; }
  .menu-options .feedback-settings { margin: 10px 0 0; }
  .menu-options .hint { display: none; }
  .menu-options .aim-settings small { display: none; }
  #menu .controls { padding-top: 8px; font-size: 11px; line-height: 1.8; }
}

#round-backdrop { position: fixed; inset: 0; z-index: 14; pointer-events: none; background: radial-gradient(ellipse at 50% 40%, #202b3680, #070c16eb), #0c1421b8; opacity: 0; visibility: hidden; transition: opacity .65s ease, visibility 0s .65s; }
body.round-over #round-backdrop { opacity: 1; visibility: visible; transition-delay: 0s; }
#round-outcome, #round-results { --outcome-color: #f4cb55; --outcome-glow: #edbe4217; --cinematic-ease: cubic-bezier(.22, 1, .36, 1); }
#round-outcome[data-outcome="loss"], #round-results[data-outcome="loss"] { --outcome-color: #e4b9b4; --outcome-glow: #d5918412; }
#round-outcome[data-outcome="draw"], #round-results[data-outcome="draw"] { --outcome-color: #b6dce8; --outcome-glow: #84bfd012; }
#round-outcome { z-index: 16; overflow: hidden; padding: 20px; background: transparent; opacity: 1; transition: opacity .55s ease; }
#round-outcome.on { display: grid; }
#round-outcome.leaving { opacity: 0; pointer-events: none; }
.outcome-content { position: relative; width: min(900px, 100%); text-align: center; transition: transform .65s var(--cinematic-ease); }
#round-outcome.leaving .outcome-content { transform: translateY(-18px); }
.outcome-eyebrow { margin: 0 0 22px; color: #aeb9c8; font-size: 10px; letter-spacing: 5px; }
.outcome-placement { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin-bottom: 8px; }
.outcome-placement strong { font: 400 clamp(42px, 9vh, 76px)/1 Impact, 'Arial Narrow', sans-serif; color: var(--outcome-color); }
.outcome-placement span { font-size: 11px; letter-spacing: 2px; color: #a1abba; }
.outcome-emblem { width: 34px; height: 34px; color: var(--outcome-color); margin-top: 10px; }
.outcome-emblem g { display: none; }
[data-outcome="win"] .outcome-win, [data-outcome="loss"] .outcome-loss, [data-outcome="draw"] .outcome-draw { display: initial; }
#outcome-title { margin: 12px 0 18px; font: 400 clamp(48px, 12vw, 132px)/1.05 Impact, 'Arial Narrow', sans-serif; color: var(--outcome-color); text-shadow: 0 3px 20px #0006; letter-spacing: 7px; }
#outcome-message { margin: 0 0 22px; color: #e1e5eb; font-size: clamp(12px, 2.5vw, 16px); }
#outcome-stats { display: inline-block; margin: 0; padding: 12px 22px; border-top: 1px solid #ffffff20; color: #b3becc; font-size: 11px; letter-spacing: 2px; }
#outcome-stats:empty { display: none; }
.outcome-track { width: 120px; height: 1px; margin: 28px auto 14px; background: #ffffff16; overflow: hidden; }
.outcome-track i { display: block; width: 100%; height: 100%; background: var(--outcome-color); transform-origin: left; }
.outcome-next { color: #a7b2c3; font-size: 10px; letter-spacing: 3px; }
.outcome-burst { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 20%, var(--outcome-glow) 48%, transparent 75%); opacity: 0; pointer-events: none; }
#round-outcome.on .outcome-eyebrow { animation: cinematic-rise .8s var(--cinematic-ease) .06s both; }
#round-outcome.on .outcome-placement, #round-outcome.on .outcome-emblem { animation: cinematic-rise .95s var(--cinematic-ease) .14s both; }
#round-outcome.on #outcome-title { animation: cinematic-title 1.1s var(--cinematic-ease) .24s both; }
#round-outcome.on #outcome-message, #round-outcome.on #outcome-stats { animation: cinematic-rise .85s var(--cinematic-ease) .48s both; }
#round-outcome.on .outcome-track, #round-outcome.on .outcome-next { animation: cinematic-fade .65s ease .65s both; }
#round-outcome.on .outcome-track i { animation: outcome-progress var(--outcome-duration) linear forwards; }
#round-outcome.on .outcome-burst { animation: cinematic-sweep 2.5s ease .15s both; }
@keyframes cinematic-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cinematic-title { from { opacity: 0; transform: translateY(20px) scale(1.035); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes cinematic-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cinematic-sweep { 0% { opacity: 0; transform: translateX(-35%); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateX(35%); } }
@keyframes results-reveal { from { opacity: 0; transform: translateY(28px) scale(.975); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes outcome-progress { to { transform: scaleX(0); } }
body.reduced-fx #round-outcome, body.reduced-fx #round-outcome *, body.reduced-fx #round-results *, body.reduced-fx #round-backdrop { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { #round-outcome, #round-outcome *, #round-results *, #round-backdrop { animation: none !important; transition: none !important; } }
@media (max-height: 600px) { .outcome-eyebrow { margin-bottom: 12px; } .outcome-emblem { display: none; } .outcome-placement strong { font-size: 42px; } #outcome-title { font-size: clamp(42px, 9vw, 76px); margin: 8px 0 14px; } #outcome-message { margin: 8px 0 12px; } .outcome-track { margin-top: 14px; } }

#round-results { z-index: 15; background: transparent; padding: 20px; }
#round-results.on { display: grid; }
#round-results.on .results-card { animation: results-reveal .8s var(--cinematic-ease) .16s both; }
#round-results.on .results-summary { animation: cinematic-rise .65s var(--cinematic-ease) .36s both; }
#round-results.on #results-rows tr { animation: cinematic-rise .55s var(--cinematic-ease) calc(.42s + var(--row) * .045s) both; }
.results-card { width: min(760px, 100%); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; padding: clamp(16px, 3vw, 32px); border: 1px solid #ffffff20; border-top: 2px solid var(--outcome-color); border-radius: 5px; background: #141d2aef; box-shadow: 0 24px 90px #0006; text-align: left; }
.results-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
#results-outcome { color: var(--outcome-color); font: 400 20px/1 Impact, 'Arial Narrow', sans-serif; letter-spacing: 2px; }
.results-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px 0; margin-bottom: 16px; border-top: 1px solid #ffffff16; border-bottom: 1px solid #ffffff16; }
.results-summary > div { display: flex; flex-direction: column; gap: 6px; padding-left: 16px; border-left: 1px solid #ffffff16; }
.results-summary > div:first-child { padding-left: 0; border-left: 0; }
.results-summary span { color: #a7b2c3; font-size: 10px; letter-spacing: 2px; }
.results-summary strong { color: #ecedf0; font: 400 clamp(28px, 5vw, 40px)/1 Impact, 'Arial Narrow', sans-serif; }
.results-summary > div:first-child strong { color: var(--outcome-color); }
.results-eyebrow { color: var(--accent); font-size: 11px; letter-spacing: 3px; margin: 0 0 8px; }
#results-title { font: 400 clamp(26px, 4vw, 40px)/1.1 Impact, 'Arial Narrow', sans-serif; letter-spacing: 2px; color: var(--ink); text-shadow: none; margin: 12px 0 0; }
#results-personal { color: #aeb9c8; margin: 12px 0 20px; font-size: 13px; }
.results-table { min-height: 0; overflow: auto; }
.results-table table { width: 100%; border-collapse: collapse; text-align: left; }
.results-table th { padding: 8px 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.results-table td { padding: 10px; border-top: 1px solid #ffffff12; }
.results-table th:nth-child(n+3), .results-table td:nth-child(n+3) { text-align: right; }
.results-table tr:first-child td { color: var(--accent); }
.results-table tr.me { background: var(--outcome-glow); font-weight: 800; box-shadow: inset 2px 0 var(--outcome-color); }
.results-next { margin: 20px 0 0; color: var(--muted); }
#results-countdown { color: var(--accent); font-variant-numeric: tabular-nums; }
body.round-over #hud, body.round-over .labels, body.round-over #hurt, body.round-over #low-health, body.round-over #damage-direction, body.round-over #banner { visibility: hidden; }
@media (max-height: 560px) {
  .results-card { padding: 12px 20px; }
  #results-title { font-size: 26px; margin-top: 4px; }
  .results-summary { padding: 8px 0; margin-bottom: 8px; }
  .results-summary strong { font-size: 26px; }
  .results-summary > div { gap: 3px; }
  #results-personal, .results-next { margin: 8px 0; }
  .results-table td { padding: 5px 10px; }
}
@media (max-height: 560px) {
  #menu { padding: 12px 20px; }
  #menu > .card { gap: 10px 24px; }
  #menu .tag { margin: 12px 0; }
  .menu-options { padding: 12px 16px; }
  .menu-options h3 { margin-bottom: 8px; font-size: 14px; }
  .menu-options .hint, .menu-options .aim-settings small { display: none; }
  .menu-options .feedback-settings { margin: 8px 0 0; }
  .aim-settings label { gap: 3px; margin-bottom: 6px; }
  #paused h2 { font-size: 32px; }
  #paused .aim-settings { margin-top: 12px; padding: 10px; }
}
@media (max-width: 600px) and (max-height: 560px) {
  #menu { padding: 10px; }
  #menu > .card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 8px 12px; }
  #menu h1 { font-size: clamp(18px, 4.7vw, 28px); }
  #menu h1 br { display: initial; }
  #menu .tag { font-size: 11px; margin: 12px 0; }
  .menu-options { padding: 10px; }
  .menu-options h3 { font-size: 11px; }
  .menu-options .aim-settings label { font-size: 11px; }
  .menu-options .feedback-settings { gap: 4px; }
  .menu-options .feedback-settings button { padding: 5px 7px; min-height: 30px; font-size: 9px; }
}

.match-actions { width: 100%; max-width: 460px; display: grid; gap: 10px; }
.match-actions .play { margin: 10px 0 4px; }
.secondary { padding: 11px 14px; border: 1px solid #ffffff40; border-radius: 9px; background: #263246; color: var(--ink); font: 800 12px 'Nunito', sans-serif; cursor: pointer; }
.secondary:hover { background: #33445e; border-color: var(--accent); }
.secondary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button:disabled { opacity: .55; cursor: wait; }
.join-room-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
#room-code { min-width: 0; padding: 9px 10px; border-width: 2px; border-radius: 9px; font-size: 14px; letter-spacing: 3px; text-transform: uppercase; }
#lobby-status { margin: 0; min-height: 32px; color: var(--muted); font-size: 12px; line-height: 1.4; }
#lobby-status.error { color: #ffad9d; }
.room-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
body.waiting #menu, body.waiting #hud, body.waiting #paused { display: none; }
#waiting-room { z-index: 12; padding: 20px; background: linear-gradient(90deg, #101725b3, #10172555); }
#waiting-room.on { display: grid; }
.waiting-card { display: flex; flex-direction: column; width: min(540px, 100%); max-height: calc(100dvh - 40px); min-height: 0; text-align: center; padding: 20px; border-radius: 18px; border: 1px solid #ffffff26; background: #111725eb; }
.map-picker { margin: 0 0 20px; padding: 0 0 16px; border: 0; border-bottom: 1px solid #ffffff20; }
.map-picker legend { padding: 0; margin-bottom: 10px; font-size: 11px; letter-spacing: 1.4px; color: var(--muted); }
#map-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 180px; overflow-y: auto; padding: 2px; }
#map-options button { min-height: 44px; padding: 8px 5px; border-radius: 8px; border: 1px solid #ffffff30; background: #263246; color: var(--ink); font: 800 12px 'Nunito', sans-serif; cursor: pointer; }
#map-options button[aria-pressed="true"] { border-color: var(--accent); background: #ffb23820; color: #ffd587; box-shadow: inset 0 -2px var(--accent); }
#map-options button:focus-visible, #waiting-map-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#map-description { min-height: 30px; margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.waiting-map-label { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 8px 0 0; font-size: 11px; color: var(--muted); }
#waiting-map-select { border: 1px solid #ffffff40; border-radius: 8px; padding: 8px 12px; background: #263246; color: var(--ink); font: inherit; font-size: 14px; }
#waiting-map-select:disabled { opacity: .75; }
@media (max-height: 650px), (max-width: 600px) {
  .map-picker { margin-bottom: 10px; padding-bottom: 8px; }
  .map-picker legend { margin-bottom: 6px; }
  #map-description { display: none; }
  #map-options button { min-height: 34px; font-size: 10px; padding: 5px 3px; }
  .waiting-card { padding: 12px; }
}
#waiting-title { color: var(--ink); font-size: clamp(24px, 5vw, 40px); text-shadow: none; }
.waiting-card p { margin: 10px 0; color: var(--muted); font-size: 13px; }
#waiting-code { margin: 8px 0 14px; color: var(--accent); font: 400 36px/1 var(--display); letter-spacing: 8px; }
#waiting-copy { align-self: center; }
#waiting-copy-status:empty { display: none; }
#waiting-members { list-style: none; padding: 0; margin: 0; overflow-y: auto; min-height: 0; border: 1px solid #ffffff20; border-radius: 12px; background: #ffffff05; }
#waiting-members li { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid #ffffff14; gap: 12px; text-align: left; }
#waiting-members li:last-child { border-bottom: 0; }
#waiting-members small { color: var(--accent); font-size: 10px; letter-spacing: 1px; }
#waiting-status { min-height: 36px; }
#start-match { flex-shrink: 0; margin: 0 0 18px; }
#waiting-leave { align-self: center; flex-shrink: 0; }
@media (max-height: 560px) {
  #waiting-room { padding: 12px; }
  .waiting-card { max-height: calc(100dvh - 24px); }
  .waiting-card p { margin: 5px 0; font-size: 11px; }
  #waiting-title { font-size: 24px; }
  #waiting-code { font-size: 26px; margin: 6px 0; }
  #waiting-members li { padding: 6px 12px; }
  #start-match { padding: 8px; font-size: 18px; margin-bottom: 12px; }
}
#pause-room { color: var(--accent); font-weight: 800; }
#menu { overflow-y: auto; }
#menu > .card { height: auto; min-height: 100%; }
#death h2 { font-size: clamp(28px, 7vw, 52px); }
@media (max-height: 650px) { #map-options { max-height: 82px; } }
#copy-status { min-height: 16px; margin: 8px 0; color: var(--muted); font-size: 12px; }
@media (max-width: 600px) {
  .match-actions { margin: 0 auto; gap: 7px; }
  #menu .tag { margin: 8px auto; }
  .match-actions .secondary { padding: 8px 10px; }
  #menu > .card { gap: 10px; }
}
@media (max-height: 650px) {
  #menu .tag { display: none; }
  #menu h1 { margin-bottom: 12px; }
  #menu #name { padding: 8px 10px; font-size: 15px; }
  #menu .match-actions .play { padding: 9px; font-size: 18px; }
  .match-actions { gap: 6px; }
  .match-actions .secondary { padding: 8px; font-size: 11px; }
  #lobby-status { font-size: 10px; min-height: 28px; }
}
@media (max-height: 400px) {
  #menu h1 { font-size: clamp(18px, 4vw, 28px); margin-bottom: 8px; }
  #menu h1 br { display: none; }
  #menu .controls { display: none; }
  #menu > .card { grid-template-rows: 1fr; }
  #paused .card { width: min(780px, calc(100vw - 24px)); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; align-items: center; }
  #paused .aim-settings { grid-column: 2; grid-row: 1 / span 5; }
  #paused h2 { font-size: 26px; }
  #paused p { margin: 3px 0; }
  #paused .play { font-size: 16px; padding: 8px; margin-top: 0; }
}
