/* אדם נגד מכונה — game styles (kit tokens come from ../_kit/wall.css) */

:root {
  --hvm-human: #38BDF8;
  --hvm-machine: #8B5CF6;
  --hvm-together: #4F7CF7;
}

/* ---------- halves ---------- */
.hvm-half {
  position: absolute;
  top: 128px;
  height: 836px;
  width: 676px;
  border-radius: 30px;
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, transparent), transparent 55%),
    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--c) 8%, transparent), transparent 70%);
  box-shadow: inset 0 0 60px color-mix(in srgb, var(--c) 6%, transparent);
  transition: border-color 900ms ease, background 900ms ease;
}
.hvm-half.is-human { left: 908px; --c: var(--hvm-human); }
.hvm-half.is-machine { left: 16px; --c: var(--hvm-machine); }
.hvm-half.is-together { --c: var(--hvm-together); }
.hvm-half-tab {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translate(-50%, 0);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 26px 10px;
  border-radius: 0 0 20px 20px;
  background: color-mix(in srgb, var(--c) 18%, #071226);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  border-top: none;
  font-family: var(--wall-font-head);
  font-weight: 600;
  font-size: 22px;
  color: rgba(244, 247, 251, 0.78);
  white-space: nowrap;
}
.hvm-half-tab b {
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
  color: var(--wall-ink);
  min-width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px var(--c);
}
.hvm-half-tab .hvm-tab-done { color: var(--wall-good); font-weight: 700; }

/* ---------- targets ---------- */
.hvm-target {
  position: absolute;
  width: 108px;
  height: 108px;
  margin: -54px 0 0 -54px;
  border-radius: 50%;
  --c: var(--hvm-human);
}
.hvm-target .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--c) 78%, transparent);
  background: radial-gradient(circle at 50% 45%, rgba(18, 34, 66, 0.95), rgba(6, 15, 31, 0.95) 70%);
  box-shadow: 0 0 22px color-mix(in srgb, var(--c) 38%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 20%, transparent);
  transition: background 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}
.hvm-target canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--c) 70%, white));
  transition: opacity 300ms ease;
}
.hvm-target .tag {
  position: absolute;
  left: 50%;
  bottom: -16px;
  transform: translateX(-50%);
  padding: 3px 12px 4px;
  border-radius: 999px;
  font-family: var(--wall-font-head);
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  color: #06101f;
  background: var(--tag-c, var(--c));
  opacity: 0;
  transition: opacity 250ms ease;
}
.hvm-target .check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 250ms ease;
}
.hvm-target .check svg { width: 46px; height: 46px; filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.9)); }
.hvm-target.is-done .ring {
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--done-c, var(--c)) 55%, #0b1730), color-mix(in srgb, var(--done-c, var(--c)) 28%, #060f1f) 75%);
  border-color: var(--done-c, var(--c));
  box-shadow: 0 0 34px color-mix(in srgb, var(--done-c, var(--c)) 60%, transparent);
}
.hvm-target.is-done canvas { opacity: 0.28; }
.hvm-target.is-done .check { opacity: 1; }
.hvm-target.is-done .tag { opacity: 1; }
.hvm-target.is-wrong .ring {
  border-color: var(--wall-bad);
  box-shadow: 0 0 34px rgba(244, 63, 94, 0.75);
}
.hvm-target.is-candidate .ring {
  border-color: var(--wall-warn);
  border-style: dashed;
  box-shadow: 0 0 36px rgba(251, 191, 36, 0.55);
}
.hvm-target .qmark {
  position: absolute;
  top: -14px;
  right: -10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--wall-warn);
  color: #1b1300;
  font-family: var(--wall-font-head);
  font-weight: 800;
  font-size: 26px;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.8);
}
.hvm-target.is-candidate .qmark { display: flex; }

/* ---------- machine reticle ---------- */
.hvm-reticle {
  position: absolute;
  left: 0;
  top: 0;
  width: 156px;
  height: 156px;
  margin: -78px 0 0 -78px;
  opacity: 0;
  pointer-events: none;
  --rc: var(--hvm-machine);
  transition: opacity 250ms ease;
}
.hvm-reticle.is-on { opacity: 1; }
.hvm-reticle i {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 4px solid var(--rc);
  filter: drop-shadow(0 0 8px var(--rc));
  transition: transform 220ms ease;
}
.hvm-reticle i:nth-child(1) { left: 0; top: 0; border-right: none; border-bottom: none; border-radius: 10px 0 0 0; }
.hvm-reticle i:nth-child(2) { right: 0; top: 0; border-left: none; border-bottom: none; border-radius: 0 10px 0 0; }
.hvm-reticle i:nth-child(3) { left: 0; bottom: 0; border-right: none; border-top: none; border-radius: 0 0 0 10px; }
.hvm-reticle i:nth-child(4) { right: 0; bottom: 0; border-left: none; border-top: none; border-radius: 0 0 10px 0; }
.hvm-reticle.is-lock i:nth-child(1) { transform: translate(16px, 16px); }
.hvm-reticle.is-lock i:nth-child(2) { transform: translate(-16px, 16px); }
.hvm-reticle.is-lock i:nth-child(3) { transform: translate(16px, -16px); }
.hvm-reticle.is-lock i:nth-child(4) { transform: translate(-16px, -16px); }
.hvm-reticle .scan {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--rc), transparent);
  box-shadow: 0 0 12px var(--rc);
  animation: hvm-scan 900ms ease-in-out infinite alternate;
}
@keyframes hvm-scan { from { transform: translateY(0); } to { transform: translateY(128px); } }
.hvm-reticle.is-lock .scan { opacity: 0; }
.hvm-callout {
  position: absolute;
  left: 50%;
  top: -48px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 6px;
  border-radius: 12px;
  background: rgba(6, 15, 31, 0.92);
  border: 1px solid var(--rc);
  font-family: var(--wall-font-head);
  font-weight: 700;
  font-size: 22px;
  white-space: nowrap;
  color: var(--wall-ink);
  box-shadow: 0 0 18px color-mix(in srgb, var(--rc) 40%, transparent);
}
.hvm-callout .pct { direction: ltr; font-variant-numeric: tabular-nums; color: var(--pc, #C4B5FD); }
.hvm-reticle.is-error { --rc: var(--wall-bad); }
.hvm-reticle.is-ask { --rc: var(--wall-warn); }
.hvm-reticle.is-good { --rc: var(--wall-good); }

/* ---------- centre column ---------- */
.hvm-center {
  position: absolute;
  left: 700px;
  width: 200px;
  top: 128px;
  height: 836px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hvm-medal {
  margin-top: 8px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--wall-font-head);
  font-weight: 800;
  font-size: 40px;
  color: var(--wall-ink);
  background:
    radial-gradient(circle at 50% 40%, #13254a, #070f22 70%) padding-box,
    linear-gradient(135deg, var(--hvm-human), var(--hvm-machine)) border-box;
  border: 4px solid transparent;
  box-shadow: 0 0 40px rgba(79, 124, 247, 0.35);
}
.hvm-medal.is-plus { font-size: 64px; box-shadow: 0 0 60px rgba(79, 124, 247, 0.7); }
.hvm-eye {
  margin-top: 26px;
  width: 196px;
  box-sizing: border-box;
  padding: 14px 10px 16px;
  border-radius: 22px;
  background: rgba(8, 17, 36, 0.86);
  border: 1px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hvm-eye-title {
  font-family: var(--wall-font-head);
  font-weight: 700;
  font-size: 20px;
  color: #C4B5FD;
  text-align: center;
  line-height: 1.15;
}
.hvm-eye-title small {
  display: block;
  font-family: var(--wall-font-body);
  font-weight: 500;
  font-size: 15px;
  color: rgba(196, 181, 253, 0.7);
  margin-top: 3px;
}
.hvm-eye-frame { position: relative; width: 176px; height: 176px; border-radius: 10px; overflow: hidden; background: #050b18; }
.hvm-eye-frame canvas { width: 176px; height: 176px; display: block; image-rendering: pixelated; }
.hvm-eye-frame .sweep {
  position: absolute;
  left: 0;
  right: 0;
  height: 26px;
  top: -26px;
  background: linear-gradient(180deg, transparent, rgba(196, 181, 253, 0.32), transparent);
  animation: hvm-sweep 1.3s linear infinite;
}
@keyframes hvm-sweep { from { transform: translateY(0); } to { transform: translateY(228px); } }
.hvm-eye-find {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--wall-font-head);
  font-weight: 600;
  font-size: 20px;
  color: rgba(244, 247, 251, 0.7);
}
.hvm-eye-find b { font-size: 40px; font-weight: 800; color: var(--wall-ink); line-height: 1; font-variant-numeric: tabular-nums; }
.hvm-bars { width: 100%; display: flex; flex-direction: column; gap: 7px; }
.hvm-bar { display: grid; grid-template-columns: 34px 1fr 48px; align-items: center; gap: 6px; font-family: var(--wall-font-head); font-weight: 700; font-size: 18px; }
.hvm-bar .lbl { text-align: center; font-variant-numeric: tabular-nums; }
.hvm-bar .trk { height: 10px; border-radius: 6px; background: rgba(244, 247, 251, 0.08); overflow: hidden; }
.hvm-bar .trk i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(270deg, #C4B5FD, var(--hvm-machine)); transition: width 260ms ease; transform-origin: right; }
.hvm-bar .val { direction: ltr; text-align: left; font-size: 16px; color: rgba(244, 247, 251, 0.7); font-variant-numeric: tabular-nums; }
.hvm-conf {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(244, 247, 251, 0.08);
}
.hvm-conf span { font-family: var(--wall-font-body); font-weight: 600; font-size: 16px; color: rgba(244, 247, 251, 0.6); }
.hvm-conf b { direction: ltr; font-family: var(--wall-font-head); font-weight: 800; font-size: 44px; line-height: 1; color: var(--cc, var(--wall-good)); text-shadow: 0 0 18px color-mix(in srgb, var(--cc, #34D399) 50%, transparent); font-variant-numeric: tabular-nums; }
.hvm-status {
  margin-top: 16px;
  width: 196px;
  min-height: 70px;
  text-align: center;
  font-family: var(--wall-font-head);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  color: var(--sc, rgba(244, 247, 251, 0.85));
}
.hvm-status small { display: block; font-family: var(--wall-font-body); font-weight: 500; font-size: 17px; color: rgba(244, 247, 251, 0.6); margin-top: 4px; }

/* dims the board while a banner is up */
.hvm-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(70% 60% at 50% 50%, rgba(2, 6, 13, 0.72), rgba(2, 6, 13, 0.42));
  transition: opacity 380ms ease;
}
.hvm-scrim.is-on { opacity: 1; }

/* top-row targets: callout under the reticle so it never covers the half tab */
.hvm-reticle.is-below .hvm-callout { top: auto; bottom: -48px; }
