/* The match HUD extras and the class menu. The HUD uses RAYCAST's boxes and fonts (app.css:
   .hp-box, .ammo-box, .killfeed, .kf); these rules add the shooter's pieces: crosshair, hit
   markers, damage direction, grenade warnings, the cook timer, flash/smoke overlays and the scope. */

.tag.purple { color: var(--purple); border-color: rgba(166, 133, 255, 0.4); }

.lo-minimap { aspect-ratio: 1; width: min(15%, 170px); }

.lo-hud {
  --ok: var(--green);
  --warn: var(--gold);
  --bad: var(--red);
  --class: #4f8cff;
  position: absolute; inset: 0; pointer-events: none; user-select: none;
  font-family: var(--mono); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.lo-hud.lo-hidden { display: none; }
.lo-hud > * { position: absolute; }
.lo-hud kbd {
  display: inline-block; min-width: 1.5em; padding: 0 4px; margin-right: 3px;
  font: 700 10px/1.5 var(--mono); text-align: center; color: var(--text); text-shadow: none;
  background: var(--panel-3); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px;
}

/* health (bottom left) and weapon (bottom right), in RAYCAST's boxes */
.lo-vitals { left: 16px; bottom: 12px; min-width: 150px; }
.lo-class-tag { color: var(--class); font-weight: 800; }
.lo-class-tag small { color: var(--muted); font-weight: 600; letter-spacing: 0.06em; }
.lo-hp-fill { width: 100%; transform-origin: left; transition: transform 0.12s, background 0.2s; }
.lo-move-state { height: 11px; margin-top: 3px; font-size: 9px; letter-spacing: 0.2em; color: var(--muted); }
.lo-loadout { right: 16px; bottom: 12px; min-width: 170px; text-align: right; }
.lo-ammo-mag.low { color: var(--red); }
.lo-reload-bar { height: 3px; margin: 3px 0 2px auto; background: rgba(255, 255, 255, 0.12); opacity: 0; }
.lo-reload-bar div { height: 100%; background: var(--class); transform-origin: left; }
.lo-utils { display: flex; gap: 6px; justify-content: flex-end; margin-top: 5px; }
.lo-util { display: flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.1); font-size: 11px; }
.lo-util b { font-weight: 600; }
.lo-util span { font-weight: 800; color: var(--class); }
.lo-util.empty { opacity: 0.4; }
.lo-util.active { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }

/* kill feed: RAYCAST's .kf rows, with the weapon and headshots */
.lo-killfeed .kf.you { box-shadow: inset 0 0 0 1px rgba(255, 197, 66, 0.6); }
.lo-killfeed .kf b { font-weight: 800; }
.lo-killfeed .kf span { color: var(--muted); font-size: 0.85em; }
.lo-killfeed .kf i { font-style: normal; color: var(--gold); font-weight: 800; }

.lo-smoke { inset: 0; background: radial-gradient(circle, rgba(150, 154, 160, 0.95), rgba(120, 125, 132, 0.99)); opacity: 0; }
.lo-low { inset: 0; opacity: 0; background: radial-gradient(ellipse at center, transparent 50%, rgba(160, 0, 10, 0.5) 100%); }
.lo-flash { inset: 0; background: #fff; opacity: 0; }
.lo-center, .lo-scoreboard { display: none; }

.lo-scope { inset: 0; display: none; }
.lo-scope.on { display: block; }
.lo-scope .lens {
  position: absolute; left: 50%; top: 50%; width: 92%; max-width: 92vh; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; box-shadow: 0 0 0 200vmax #000, inset 0 0 40px 14px rgba(0, 0, 0, 0.85);
  background:
    linear-gradient(#000, #000) center / 2px 100% no-repeat,
    linear-gradient(#000, #000) center / 100% 2px no-repeat,
    radial-gradient(circle, #e5484d 0 2px, transparent 3px);
}

.lo-crosshair { left: 50%; top: 50%; --gap: 6px; }
.lo-crosshair i { position: absolute; background: rgba(255, 255, 255, 0.92); box-shadow: 0 0 2px #000; }
.lo-crosshair .ch.t, .lo-crosshair .ch.b { width: 2px; height: 8px; left: -1px; }
.lo-crosshair .ch.l, .lo-crosshair .ch.r { width: 8px; height: 2px; top: -1px; }
.lo-crosshair .ch.t { bottom: var(--gap); }
.lo-crosshair .ch.b { top: var(--gap); }
.lo-crosshair .ch.l { right: var(--gap); }
.lo-crosshair .ch.r { left: var(--gap); }
.lo-crosshair .dot { width: 2px; height: 2px; left: -1px; top: -1px; }
.lo-crosshair[data-mode="dot"] .ch, .lo-crosshair[data-mode="hidden"] i { display: none; }

.lo-hitmarker { left: 50%; top: 50%; width: 26px; height: 26px; transform: translate(-50%, -50%) rotate(45deg); opacity: 0; }
.lo-hitmarker::before, .lo-hitmarker::after { content: ""; position: absolute; background: #fff; }
.lo-hitmarker::before { left: 12px; top: 0; width: 2px; height: 26px; clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%, 0 65%, 100% 65%, 100% 100%, 0 100%); }
.lo-hitmarker::after { top: 12px; left: 0; height: 2px; width: 26px; clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%); }
.lo-hitmarker.show { opacity: 1; }
.lo-hitmarker.head::before, .lo-hitmarker.head::after { background: var(--gold); }
.lo-hitmarker.kill::before, .lo-hitmarker.kill::after { background: var(--red); }

.lo-dmg-ring { left: 50%; top: 50%; }
.lo-dmg-ring .dmg-ind { position: absolute; left: -60px; top: -150px; width: 120px; height: 150px; transform-origin: 60px 150px; }
.lo-dmg-ring .dmg-ind::before {
  content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 22px;
  border-top: 5px solid rgba(255, 50, 60, 0.9); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.lo-nade-warn { left: 50%; top: 50%; }
.lo-nade-warn .nade {
  position: absolute; left: -34px; top: -11px; width: 68px; height: 22px; align-items: center; justify-content: center;
  font: 800 10px var(--mono); letter-spacing: 0.05em; color: #fff; background: rgba(220, 38, 38, 0.85); border-radius: 4px;
  animation: lo-pulse 0.5s steps(2) infinite alternate;
}
.lo-nade-warn .nade.fire { background: rgba(234, 120, 20, 0.9); }
@keyframes lo-pulse { to { filter: brightness(1.4); } }

.lo-cook { left: 50%; top: calc(50% + 44px); transform: translateX(-50%); width: 42px; height: 42px; display: none; }
.lo-cook.on { display: block; }
.lo-cook svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.lo-cook circle { fill: rgba(0, 0, 0, 0.45); stroke-width: 4; }
.lo-cook .track { stroke: rgba(255, 255, 255, 0.2); }
.lo-cook .fill { fill: none; stroke: var(--warn); stroke-dasharray: 100.5; stroke-dashoffset: 100.5; }
.lo-cook.danger .fill { stroke: var(--bad); }
.lo-cook span { position: absolute; inset: 0; display: grid; place-items: center; font: 800 11px var(--mono); }

.lo-toast {
  left: 50%; top: 22%; transform: translate(-50%, 6px); padding: 5px 14px; border-radius: 6px;
  font: 800 14px var(--mono); background: rgba(5, 7, 12, 0.75); border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0; transition: opacity 0.2s, transform 0.2s; white-space: nowrap;
}
.lo-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- class menu */
.lo-menu {
  position: absolute; inset: 0; overflow-y: auto; padding: 16px; pointer-events: auto;
  background: rgba(2, 3, 6, 0.72); font-family: var(--sans); text-shadow: none;
}
.lo-menu-inner { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.lo-menu-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.lo-menu-head h2 { margin: 0 0 4px; font: 900 clamp(18px, 2.6vw, 26px) var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.lo-class-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.lo-card {
  --c: #4f8cff; text-align: left; color: var(--text); font: inherit; cursor: pointer;
  padding: 12px; border-radius: 10px; background: rgba(10, 12, 18, 0.9);
  border: 1px solid var(--line-2); border-top: 3px solid var(--c);
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
}
.lo-card:hover { transform: translateY(-2px); background: rgba(18, 22, 31, 0.95); }
.lo-card.selected { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 10px 30px -12px var(--c); }
.lo-card-head { display: flex; align-items: center; gap: 6px; }
.lo-card-head h3 { margin: 0; flex: 1; font: 900 17px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c); }
.lo-card-head .hp { font: 700 12px var(--mono); color: var(--muted); }
.lo-card-art {
  display: block; width: 144px; height: 60px; margin: 10px auto 0; padding: 4px calc(50% - 72px) 2px;
  box-sizing: content-box; border-radius: 6px; background: rgba(255, 255, 255, 0.04); image-rendering: pixelated;
}
.lo-card kbd, .lo-menu kbd {
  display: inline-block; min-width: 1.5em; padding: 0 5px; font: 700 11px/1.5 var(--mono); text-align: center; color: var(--text);
  background: var(--panel-3); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px;
}
.lo-card .blurb { margin: 8px 0 10px; font-size: 12.5px; line-height: 1.45; color: #b9c2ce; min-height: 3.6em; }
.lo-card .arms { display: grid; gap: 5px; margin-bottom: 9px; }
.lo-card .arms small { display: block; font: 700 10px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.lo-card .arms b { font-size: 13.5px; font-weight: 650; }
.lo-card .gear { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.lo-card .gchip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 2px 8px 2px 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.lo-card .gchip.lethal { border-color: rgba(239, 68, 68, 0.4); }
.lo-card .gchip.tactical { border-color: rgba(96, 165, 250, 0.4); }
.lo-stats { display: grid; gap: 4px; }
.lo-stat { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.lo-stat i { height: 5px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.lo-stat u { display: block; height: 100%; background: var(--c); }
.lo-menu-bottom {
  display: grid; grid-template-columns: minmax(200px, 1fr) minmax(260px, 1.5fr) auto; gap: 18px; align-items: start;
  padding: 14px; border-radius: 10px; background: rgba(10, 12, 18, 0.9); border: 1px solid var(--line-2);
}
.lo-binds { display: grid; gap: 8px; min-width: 0; }
.lo-binds-head { display: flex; align-items: center; gap: 10px; }
.lo-binds-head b { font: 800 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.lo-binds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 16px; }
.lo-bind { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.lo-bind > kbd { display: block; }
.lo-bind.fixed > kbd { border-style: dashed; color: var(--muted); }
.lo-bind-key {
  padding: 0 5px; font: 700 11px/1.5 var(--mono); color: var(--text); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--panel-3); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px;
}
.lo-bind-key:hover { border-color: var(--blue); }
.lo-bind-key:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.lo-bind-key.listening { color: var(--gold); border-color: var(--gold); background: rgba(255, 197, 66, 0.1); animation: pulse 1s infinite; }
@media (max-width: 860px) {
  .lo-menu-bottom { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- bomb rounds */
.bomb-hint {
  left: 50%; bottom: 22%; transform: translateX(-50%); padding: 4px 12px; border-radius: 6px;
  font: 800 13px var(--mono); color: #ffcf7a; background: rgba(5, 7, 12, 0.7); border: 1px solid rgba(255, 165, 58, 0.35);
  white-space: nowrap;
}
.bomb-act {
  left: 50%; top: 62%; transform: translateX(-50%); width: min(280px, 40%); text-align: center;
  font: 800 13px var(--mono); letter-spacing: 0.08em;
}
.bomb-act .track { height: 8px; margin-top: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.5); }
.bomb-act .track i { display: block; height: 100%; background: #ff8a3a; transform-origin: left; transform: scaleX(0); }
.bomb-act.defuse .track i { background: #4fc3ff; }
.hud-score.planted .clock .t { color: #ff4d4d; }
.hud-score.planted .clock .ph { color: #ff8a7a; }
.center-msg .watch-note { font-size: 12px; opacity: 0.85; }
