:root { --ink: #f4f1ea; --accent: #ffcf5a; --danger: #ff4d5a; --panel: rgba(12, 16, 26, .62); color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0f18; color: var(--ink); font-family: "Segoe UI", system-ui, sans-serif; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; }

.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(ellipse at 50% 40%, rgba(20, 28, 48, .55), rgba(5, 7, 12, .88)); z-index: 20; text-align: center; padding: 16px; }
.screen[hidden] { display: none; }
.screen h1, .screen h2 { margin: 0; font-size: clamp(38px, 7vw, 76px); letter-spacing: .06em; text-transform: uppercase; font-weight: 800;
  text-shadow: 0 4px 30px rgba(255, 207, 90, .35); }
.tag { margin: 0; opacity: .85; font-size: 17px; }
.btn { font: 700 20px/1 inherit; letter-spacing: .08em; text-transform: uppercase; padding: 16px 44px; border: 0; border-radius: 10px;
  background: linear-gradient(180deg, #ffd873, #f0a93a); color: #1c1407; cursor: pointer; box-shadow: 0 8px 26px rgba(240, 169, 58, .35); }
.btn:hover { filter: brightness(1.08); }
.keys { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; max-width: 760px; opacity: .8; font-size: 14px; }
kbd { display: inline-block; min-width: 22px; padding: 2px 6px; margin: 0 2px; border-radius: 5px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); font: 600 12px/1.3 inherit; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud[hidden] { display: none; }
#vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(200, 0, 20, .55)); opacity: 0; transition: opacity .15s; }
#crosshair, #hitmarker { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#crosshair i { position: absolute; background: rgba(255, 255, 255, .9); box-shadow: 0 0 2px rgba(0, 0, 0, .8); }
#crosshair i:nth-child(1), #crosshair i:nth-child(2) { width: 2px; height: 8px; left: -1px; }
#crosshair i:nth-child(1) { top: calc(-8px - var(--gap, 6px)); } #crosshair i:nth-child(2) { top: var(--gap, 6px); }
#crosshair i:nth-child(3), #crosshair i:nth-child(4) { height: 2px; width: 8px; top: -1px; }
#crosshair i:nth-child(3) { left: calc(-8px - var(--gap, 6px)); } #crosshair i:nth-child(4) { left: var(--gap, 6px); }
#hitmarker { opacity: 0; transition: opacity .12s; }
#hitmarker i { position: absolute; width: 10px; height: 2px; background: #fff; box-shadow: 0 0 3px rgba(0, 0, 0, .8); }
#hitmarker i:nth-child(1) { transform: translate(-16px, -12px) rotate(45deg); } #hitmarker i:nth-child(2) { transform: translate(6px, -12px) rotate(-45deg); }
#hitmarker i:nth-child(3) { transform: translate(-16px, 10px) rotate(-45deg); } #hitmarker i:nth-child(4) { transform: translate(6px, 10px) rotate(45deg); }
#hitmarker.kill i { background: var(--danger); }


#feed { position: absolute; top: 18px; right: 18px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; font-size: 14px; }
#feed div { background: var(--panel); padding: 4px 10px; border-radius: 6px; animation: fade 4s forwards; }
@keyframes fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
#vitals { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); }
#vitals .bar { width: 180px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
#hpFill { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #5ee08a, #b7f08a); transition: width .15s; }

#ammo { position: absolute; right: 26px; bottom: 26px; background: var(--panel); padding: 10px 16px; border-radius: 10px; font-size: 16px; }
#ammo b { font-size: 34px; margin-right: 4px; }
#ammo em { display: block; font-style: normal; font-size: 12px; letter-spacing: .12em; color: var(--accent); }
#banner { position: absolute; top: 34%; left: 50%; transform: translateX(-50%); font: 800 34px/1.2 inherit; letter-spacing: .06em; text-transform: uppercase; text-shadow: 0 3px 18px rgba(0, 0, 0, .7); }


/* store defense HUD */
#round { position: absolute; left: 26px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-start; }
#round span { font: 800 12px/1 inherit; letter-spacing: .3em; text-transform: uppercase; color: #ffb0a8; text-shadow: 0 2px 6px rgba(0,0,0,.8); }
#round b { font: 900 86px/0.95 Impact, "Segoe UI", sans-serif; color: #e3242b; text-shadow: 0 0 2px #2a0004, 0 4px 18px rgba(0,0,0,.7), 0 0 30px rgba(227,36,43,.35); transform: rotate(-4deg); transition: color .4s; }
#round b.flash { color: #fff; }
#wins { position: absolute; left: 28px; bottom: 132px; display: flex; gap: 8px; }
#wins div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 4px; background: var(--panel); border-radius: 5px; }
#wins div i { display: block; width: 22px; height: 4px; border-radius: 1px; background: #a47a4c; }
#wins div i.off { background: rgba(255,255,255,.12); }
#wins div.open { outline: 2px solid var(--danger); }
#points { position: absolute; right: 26px; bottom: 112px; text-align: right; }
#points b { font: 900 34px/1 "Segoe UI", sans-serif; color: var(--accent); text-shadow: 0 3px 12px rgba(0,0,0,.75); }
#popups { position: absolute; right: 0; bottom: 36px; width: 120px; height: 90px; pointer-events: none; }
#popups span { position: absolute; right: 0; bottom: 0; font: 800 18px/1 "Segoe UI", sans-serif; color: #ffe36b; text-shadow: 0 2px 6px rgba(0,0,0,.8); animation: pop 1s forwards; }
#popups span.neg { color: #ff8a8a; }
@keyframes pop { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-70px); opacity: 0; } }
#ammo { display: flex; align-items: baseline; gap: 6px; }
#ammo #wname { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .8; margin-right: 6px; }
#prompt { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); background: var(--panel); padding: 8px 16px; border-radius: 8px; font-size: 16px; text-align: center; min-width: 260px; }
#prompt[hidden] { display: none; }
#prompt em { font-style: normal; color: var(--accent); font-weight: 800; }
#prompt em.no { color: var(--danger); }
#prompt .bar { margin-top: 6px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.15); overflow: hidden; }
#prompt .bar i { display: block; height: 100%; width: 0; background: var(--accent); }
#camhint { position: absolute; left: 26px; top: 18px; font-size: 12px; opacity: .55; }
#banner { color: #fff; }
#banner.round { color: #e3242b; font-size: 54px; font-family: Impact, "Segoe UI", sans-serif; letter-spacing: .08em; }
@media (max-width: 640px) { #round b { font-size: 56px; } #wins { bottom: 96px; } #points { bottom: 96px; } #prompt { min-width: 0; width: 86%; } }
.link { background: none; border: 0; color: var(--ink); opacity: .7; font: 600 14px/1 inherit; text-decoration: underline; cursor: pointer; }
.link:hover { opacity: 1; }
.link[hidden] { display: none; }

/* co-op lobby */
.btn.alt { background: linear-gradient(180deg, #7fd1ff, #3b8fd9); color: #08131f; box-shadow: 0 8px 26px rgba(59, 143, 217, .3); }
.btn:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; }
#coop .row { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
#coop .or { opacity: .6; }
#coop input { font: 700 20px/1 "Segoe UI", sans-serif; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.35); color: var(--ink); }
#coopCodeIn { width: 130px; text-transform: uppercase; letter-spacing: .2em; text-align: center; }
#coop .field { display: flex; gap: 10px; align-items: center; font-size: 15px; }
#coop .code { font-size: 18px; margin: 0; }
#coop .code b { font-size: 30px; letter-spacing: .2em; color: var(--accent); margin: 0 8px; }
#coopRoster { list-style: none; padding: 0; margin: 8px 0; font-size: 17px; min-width: 260px; }
#coopRoster li { padding: 4px 0; } #coopRoster em { font-style: normal; opacity: .65; font-size: 13px; margin-left: 6px; }
#mates { position: absolute; left: 26px; top: 46px; background: var(--panel); padding: 8px 12px; border-radius: 8px; font-size: 13px; line-height: 1.6; }

/* ===================== menu & panels, after the concept art (design/reference) ===================== */
@font-face { font-family: 'Anton'; src: url(../assets/fonts/anton.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Permanent Marker'; src: url(../assets/fonts/permanent-marker.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; src: url(../assets/fonts/barlow-condensed-600.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; src: url(../assets/fonts/barlow-condensed-700.woff2) format('woff2'); font-display: swap; }
:root { --ui: 'Barlow Condensed', 'Segoe UI', sans-serif; --gold-1: #ffd75e; --gold-2: #f2a91c; --slate-1: rgba(52, 58, 67, .93); --slate-2: rgba(25, 29, 35, .93); --red: #e3242b; }

/* every screen sits over the live store: darken the edges, not the middle */
.screen { background: radial-gradient(ellipse at 50% 45%, rgba(5, 7, 10, .15) 30%, rgba(5, 7, 10, .7) 100%); }
.screen.menu { justify-content: flex-start; gap: 0; padding: 4vh 16px 3vh; backdrop-filter: blur(1.5px);
  background: radial-gradient(ellipse 60% 45% at 50% 52%, rgba(255, 196, 120, .22), rgba(255, 170, 90, 0) 70%),
    radial-gradient(ellipse at 50% 42%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .6) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, .25), rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, .55)); }

/* the logo: white distressed block letters, a red brush DEFENSE, a tricolour stroke */
.logo { position: relative; display: flex; flex-direction: column; align-items: center; margin-top: 1vh; pointer-events: none; }
.logo-top { font: 400 clamp(44px, 7.4vw, 132px)/0.95 'Anton', Impact, sans-serif; text-transform: uppercase; letter-spacing: .01em; transform: rotate(-3deg);
  color: #f1eee7; background: var(--grunge-white, #f1eee7); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .55)) drop-shadow(0 10px 22px rgba(0, 0, 0, .5)); }
.logo-bottom { display: flex; align-items: center; gap: .18em; margin-top: -.12em; transform: rotate(-4deg) translateX(.3em);
  font: 400 clamp(48px, 8.2vw, 148px)/1 'Permanent Marker', 'Segoe UI', sans-serif; text-transform: uppercase; }
.logo-bottom span { color: var(--red); background: var(--grunge-red, var(--red)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  transform: skewX(-10deg); filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .6)) drop-shadow(0 8px 20px rgba(120, 0, 0, .45)); padding: 0 .06em; }
.logo-bottom .dash { display: block; width: .55em; height: .08em; border-radius: .04em; background: var(--red); transform: skewX(-20deg); box-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.tricolor { width: min(520px, 62vw); height: auto; margin-top: -.6vw; transform: rotate(-3deg) translateX(1.5vw); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .55)); }

/* buttons: one gold call to action, slate for the rest */
.menu-buttons { display: flex; flex-direction: column; gap: 14px; margin-top: 3.2vh; width: min(480px, 88vw); }
.mbtn { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 70px; padding: 0 28px;
  font: 700 clamp(19px, 1.9vw, 26px)/1 var(--ui); letter-spacing: .09em; text-transform: uppercase; cursor: pointer;
  color: #e9ecf1; background: linear-gradient(180deg, var(--slate-1), var(--slate-2)); border: 1px solid rgba(255, 255, 255, .16); border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -2px 0 rgba(0, 0, 0, .35), 0 8px 22px rgba(0, 0, 0, .45); transition: transform .08s, filter .12s; }
.mbtn svg { position: absolute; left: 34px; width: 30px; height: 30px; fill: currentColor; }
.mbtn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.mbtn:active { transform: translateY(1px); }
.mbtn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.mbtn:disabled { filter: grayscale(.8) brightness(.6); cursor: not-allowed; transform: none; }
.mbtn.primary { color: #17120a; background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); border-color: #ffe7a0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -3px 0 rgba(120, 70, 0, .35), 0 10px 26px rgba(0, 0, 0, .5), 0 0 28px rgba(242, 169, 28, .25); }
.mbtn::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--scuff, none); mix-blend-mode: multiply; opacity: .5; pointer-events: none; }
.mbtn.small { min-height: 50px; width: auto; padding: 0 26px; font-size: 19px; }

/* keycaps along the bottom */
.keyhints { margin-top: auto; display: flex; flex-direction: column; gap: 12px; align-items: center; font: 600 17px/1 var(--ui); color: #e8e8e8; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }
.keyhints div { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.keyhints em { font-style: normal; margin: 0 22px 0 8px; letter-spacing: .02em; }
.kc { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border: 1.5px solid rgba(255, 255, 255, .6); border-radius: 5px;
  background: rgba(12, 14, 18, .6); font: 700 18px/1 var(--ui); color: #fff; box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .12), 0 2px 6px rgba(0, 0, 0, .5); }
.kc.wide { min-width: 70px; }

/* panels (settings, co-op, game over) */
.panel { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 30px 38px; max-width: min(640px, 94vw);
  background: linear-gradient(180deg, rgba(24, 28, 34, .9), rgba(14, 16, 20, .92)); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6); backdrop-filter: blur(6px); font-family: var(--ui); }
.panel h2 { font: 400 clamp(34px, 4.6vw, 56px)/1 'Anton', Impact, sans-serif; letter-spacing: .02em; text-transform: uppercase; text-shadow: 0 4px 14px rgba(0, 0, 0, .6); }
#over .panel h2 { color: var(--red); font-family: 'Permanent Marker', sans-serif; transform: rotate(-2deg); }
.panel .tag { font-size: 18px; max-width: 460px; }
.panel .row { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
#overSub { font-size: 19px; margin: 0; max-width: 520px; line-height: 1.4; }
.setting { display: grid; grid-template-columns: 190px 1fr 56px; align-items: center; gap: 14px; width: min(520px, 84vw); font-size: 19px; }
.setting input[type=range] { width: 100%; accent-color: var(--gold-2); }
.setting input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--gold-2); justify-self: start; }
.setting select { font: 600 17px var(--ui); padding: 6px 8px; border-radius: 6px; background: #1b1f25; color: #e9ecf1; border: 1px solid rgba(255, 255, 255, .2); }
.setting output { text-align: right; opacity: .75; }
#coop input { font-family: var(--ui); }
#round b { font-family: 'Permanent Marker', Impact, sans-serif; font-weight: 400; }
#banner.round { font-family: 'Permanent Marker', Impact, sans-serif; }
@media (max-width: 640px) { .keyhints { display: none; } .mbtn svg { left: 18px; width: 24px; height: 24px; } .setting { grid-template-columns: 1fr 1fr 44px; } }
