* { box-sizing: border-box; margin: 0; padding: 0; } html, body { width: 100%; height: 100%; overflow: hidden; background: #0a0a0a; font-family: system-ui, -apple-system, sans-serif; color: #fff; } /* WebGL only — do NOT target #minimap-canvas (that was pinning the map to top-left). */ #game-canvas { display: block; position: fixed; inset: 0; width: 100%; height: 100%; } #hud { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10; } #player-hud { position: absolute; top: 12px; left: 12px; z-index: 16; display: flex; align-items: center; gap: 0.55rem; pointer-events: none; } #player-hud[hidden] { display: none !important; } #player-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.75); background: #222; } #player-name { font-family: "Arial Black", "Helvetica Neue", Impact, sans-serif; font-size: 0.95rem; letter-spacing: 0.02em; color: #fff; text-shadow: 0 0 2px #000, 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000; } #damage-vignette { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient( ellipse at center, transparent 42%, rgba(140, 0, 0, 0.28) 68%, rgba(110, 0, 0, 0.72) 100% ); z-index: 11; } #weapon-hud { position: absolute; top: 58px; right: 12px; width: 72px; height: 72px; padding: 0; border: none; background-color: transparent; background-image: url('../assets/weapon-icons.png'); background-repeat: no-repeat; /* sheet is 8×6 cells */ background-size: 800% 600%; image-rendering: auto; } #weapon-hud[data-weapon="melee"] { background-position: calc(3 * 100% / 7) calc(0 * 100% / 5); } #weapon-hud[data-weapon="smoke"] { background-position: calc(4 * 100% / 7) calc(1 * 100% / 5); } #weapon-hud[data-weapon="grenade"] { background-position: calc(5 * 100% / 7) calc(1 * 100% / 5); } #weapon-hud[data-weapon="shotgun"] { background-position: calc(3 * 100% / 7) calc(2 * 100% / 5); } #weapon-hud[data-weapon="machinegun"] { background-position: calc(1 * 100% / 7) calc(3 * 100% / 5); } #weapon-hud[data-weapon="sniper"] { background-position: calc(6 * 100% / 7) calc(3 * 100% / 5); } #weapon-hud[data-weapon="flamethrower"] { background-position: calc(4 * 100% / 7) calc(3 * 100% / 5); } #ammo-hud { position: absolute; top: 136px; right: 12px; padding: 0.3rem 0.65rem; border: 1px solid #000; background: #000; color: #fff; font-size: 0.75rem; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; } #crosshair { position: fixed; top: 50%; left: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); pointer-events: none; z-index: 12; } #crosshair .ch { position: absolute; background: rgba(255, 255, 255, 0.92); box-shadow: 0 0 2px rgba(0, 0, 0, 0.85); } #crosshair .ch-top, #crosshair .ch-bottom { left: 50%; width: 2px; height: 6px; transform: translateX(-50%); } #crosshair .ch-left, #crosshair .ch-right { top: 50%; width: 6px; height: 2px; transform: translateY(-50%); } #crosshair .ch-top { top: 0; } #crosshair .ch-bottom { bottom: 0; } #crosshair .ch-left { left: 0; } #crosshair .ch-right { right: 0; } #crosshair .ch-dot { top: 50%; left: 50%; width: 2px; height: 2px; transform: translate(-50%, -50%); border-radius: 50%; } #crosshair.scoped { width: 28px; height: 28px; } #crosshair.scoped .ch-top, #crosshair.scoped .ch-bottom { height: 9px; } #crosshair.scoped .ch-left, #crosshair.scoped .ch-right { width: 9px; } #minimap-wrap { position: fixed; left: 12px; bottom: 32px; top: auto; right: auto; width: 148px; height: 148px; z-index: 15; pointer-events: none; } #minimap-canvas { display: block; position: relative; inset: auto; top: auto; left: auto; width: 148px; height: 148px; border-radius: 50%; background: #111; } kbd { font-family: inherit; font-size: inherit; } #prompt { position: absolute; bottom: 2.6rem; left: 50%; transform: translateX(-50%); padding: 0.35rem 0.75rem; border: 1px solid #000; background: #000; color: #fff; font-size: 0.75rem; } #panel { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(420px, 90vw); padding: 1.25rem 1.5rem; border: 1px solid #000; background: #000; color: #fff; pointer-events: auto; } #panel h2 { margin-bottom: 0.75rem; font-size: 1.1rem; } #panel p { line-height: 1.5; font-size: 0.9rem; } #panel-close { position: absolute; top: 0.4rem; right: 0.55rem; border: none; background: transparent; color: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1; } #controls-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 3px 8px; border-top: 1px solid #000; background: #000; color: #fff; font-size: 11px; line-height: 1.25; text-align: center; pointer-events: none; } #hp-hud { position: absolute; top: 10px; right: 14px; display: flex; align-items: center; gap: 0.35rem; padding: 0; border: none; background: transparent; color: #fff; pointer-events: none; } #hp-hud[hidden] { display: none !important; } #hp-hud .hp-icon { width: 28px; height: 28px; fill: #e11d2e; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.9)); flex-shrink: 0; } #hp-value { font-family: "Arial Black", "Helvetica Neue", Impact, sans-serif; font-size: 1.55rem; line-height: 1; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; color: #f4f4f4; text-shadow: 0 0 2px #000, 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000; } #hp-hud.dead #hp-value { color: #b0b0b0; } #hp-hud.dead .hp-icon { fill: #666; } /* Spectate identity — center, ~3/4 down the viewport */ #spectate-bar { position: absolute; left: 50%; top: 75%; transform: translate(-50%, -50%); z-index: 18; display: flex; align-items: center; gap: 0.85rem; pointer-events: auto; } #spectate-bar[hidden] { display: none !important; } .spec-arrow { width: 48px; height: 48px; padding: 0; border: 3px solid #fff; background: #000; color: #fff; font-size: 1.45rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.65); } .spec-arrow:hover { background: #1a1a1a; } .spec-arrow:active { background: #333; } #spec-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.9); background: #222; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); } #spec-name { font-family: "Arial Black", "Helvetica Neue", Impact, sans-serif; font-size: 1.15rem; letter-spacing: 0.02em; color: #fff; text-shadow: 0 0 2px #000, 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000; min-width: 4rem; text-align: center; } /* ── Start / lobby menus ─────────────────────────────────────────── */ .menu-root { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; padding: 1.5rem; background: radial-gradient(ellipse at 50% 20%, rgba(70, 50, 30, 0.4), transparent 55%), linear-gradient(180deg, #1a1510 0%, #0c0a08 100%); pointer-events: auto; } .menu-root[hidden] { display: none !important; } .menu-brand { font-family: "Arial Black", "Helvetica Neue", sans-serif; font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: 0.04em; text-transform: uppercase; color: #f2f4f7; text-shadow: 0 2px 0 #000; } .menu-sub { margin: 0.25rem 0 1.25rem; color: #9aa6b2; font-size: 0.95rem; } .menu-panel { width: min(920px, 100%); text-align: center; } .menu-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; } .menu-btn { pointer-events: auto; cursor: pointer; border: 2px solid #d8dde3; background: #11181f; color: #f5f7fa; padding: 0.7rem 1.4rem; font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; } .menu-btn:hover { background: #24303a; } .menu-btn.ghost { border-color: #5a6570; background: transparent; font-size: 0.8rem; padding: 0.45rem 0.85rem; } .menu-user { position: absolute; top: 14px; left: 16px; font-size: 0.8rem; color: #b7c2cc; } .menu-error { position: absolute; top: 40px; left: 16px; right: 16px; color: #ff8e8e; font-size: 0.85rem; } .menu-lobby { text-align: left; max-height: min(78vh, 720px); display: flex; flex-direction: column; } /* Author `display:flex` beats UA [hidden]; force hide when leaving lobbies */ .menu-panel[hidden], .menu-lobby[hidden] { display: none !important; } .lobby-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; } .lobby-toolbar h2 { flex: 1; font-size: 1.15rem; } .lobby-actions { display: flex; gap: 0.5rem; } .lobby-meta { color: #9aa6b2; font-size: 0.8rem; margin-bottom: 0.75rem; } .lobby-list { overflow: auto; display: flex; flex-direction: column; gap: 0.65rem; padding-right: 0.25rem; } .lobby-card { border: 1px solid #3a322a; background: #100e0c; padding: 0.65rem 0.75rem; } .lobby-card-head { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.85rem; color: #ece6df; } .lobby-seats { display: flex; flex-wrap: wrap; gap: 0.4rem; } .lobby-seats.teams { flex-wrap: nowrap; justify-content: space-between; align-items: center; gap: 0.6rem; } .team-col { display: flex; flex-wrap: wrap; gap: 0.35rem; max-width: 42%; } .team-col.team-x { justify-content: flex-start; } .team-col.team-y { justify-content: flex-end; } .team-mid { flex: 0 0 auto; } .seat-btn { pointer-events: auto; cursor: pointer; border: 1px solid #5a5048; background: #1a1510; color: #ece6df; font-size: 0.78rem; font-weight: 700; min-width: 2rem; padding: 0.35rem 0.55rem; } .seat-btn.team-x { border-color: #c44b3c; background: #3a1814; color: #ffd4ce; } .seat-btn.team-y { border-color: #3b7ec4; background: #142433; color: #cfe4ff; } .seat-btn .seat-who { display: block; font-size: 0.62rem; font-weight: 500; opacity: 0.85; } .seat-btn.filled { opacity: 0.9; cursor: default; } .seat-btn.spectate-btn { border-color: #5dce8a; color: #b8f0d0; background: #142018; font-weight: 600; } .seat-btn:disabled { cursor: default; }