/* Spectator mode (js/ui/spectator.js): a watch strip at the top, one panel per side, the key line at
   the bottom. Shared by Line War (main.js) and Hunters vs Farmers (js/ui/hvf/game.js). */
.spec-hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--ui); color: var(--ink); z-index: 6; }
.spec-hud [data-ui], .spec-hud button { pointer-events: auto; }
.spec-hud [hidden] { display: none !important; }

.spec-top { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; align-items: center; white-space: nowrap;
  padding: 6px 12px; background: linear-gradient(180deg, rgba(14,17,13,.94), rgba(20,24,18,.86)); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.spec-hvf .spec-top { top: 66px; }
.spec-tag { font: 700 13px var(--head); color: #1b1408; background: var(--gold); border-radius: 4px; padding: 1px 7px; letter-spacing: .06em; text-transform: uppercase; }
.spec-follow { font-weight: 600; min-width: 190px; color: var(--ink); }
.spec-speed, .spec-fog { display: flex; gap: 3px; align-items: center; }
.spec-fog::before { content: 'Fog'; color: var(--ink3); font-size: 12px; margin-right: 4px; }
.spec-chip { font: 600 13px var(--ui); color: var(--ink2); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 5px; padding: 2px 8px; cursor: pointer; }
.spec-chip:hover { color: var(--ink); border-color: var(--line-strong); }
.spec-chip.on { color: #1b1408; background: var(--gold); border-color: var(--gold); }

.spec-side { position: absolute; top: 60px; width: 220px; max-height: calc(100% - 280px); overflow-y: auto; padding: 8px 10px 10px;
  background: rgba(14,17,13,.86); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; }
.spec-hvf .spec-side { top: 112px; }
.spec-side.l { left: 10px; }
.spec-side.r { right: 10px; }
.spec-side h3 { margin: 0 0 6px; font: 700 17px var(--head); color: var(--team, var(--gold)); border-bottom: 2px solid var(--team, var(--line)); padding-bottom: 2px; }
.spec-side dl { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.spec-side dt { color: var(--ink3); }
.spec-side dd { margin: 0; text-align: right; font-weight: 600; }
.spec-chars { display: flex; flex-direction: column; gap: 4px; }
.spec-char { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 6px; text-align: left; padding: 4px 6px;
  color: var(--ink); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font: inherit; }
.spec-char kbd { grid-row: span 2; align-self: center; }
.spec-char b { font-weight: 600; }
.spec-char small { color: var(--ink2); grid-column: 2; }
.spec-char.on { border-color: var(--gold); background: rgba(242,196,90,.14); box-shadow: inset 0 0 0 1px var(--gold-dim); }
.spec-char.down { opacity: .6; }
.spec-hud.panels-off .spec-side { display: none; }

.spec-help { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 420px); text-align: center; font-size: 12px; color: var(--ink2);
  background: rgba(10,12,10,.7); border-radius: 8px; padding: 4px 10px; }
.spec-help b { color: var(--ink); }
.spec-help .pad-only { display: block; margin-top: 2px; }
.spec-alerts { position: absolute; top: 110px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.spec-hvf .spec-alerts { top: 160px; }
.spec-alert { padding: 4px 12px; border-radius: 6px; background: rgba(14,17,13,.9); border: 1px solid var(--line); font-weight: 600; transition: opacity .4s; }
.spec-alert.good { color: #9fe0a8; } .spec-alert.bad { color: #ff9a8a; } .spec-alert.warn { color: var(--amber); }
.spec-alert.out { opacity: 0; }
.spec-paused { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); font: 800 44px var(--head); color: var(--gold); text-shadow: 0 2px 12px #000; letter-spacing: .1em; }

/* HvF spectator: the player HUD's role bar is replaced by the panels; the minimap stays */
.hvf-hud.spectator .hv-main, .hvf-hud.spectator .hv-res { display: none; }
.hvf-hud.spectator .hv-top { grid-template-columns: auto auto auto auto; }
@media (max-width: 900px) { .spec-side { width: 170px; font-size: 12px; } .spec-help { max-width: calc(100% - 40px); bottom: 190px; } }
.hvf-hud.spectator .hv-alerts { top: 160px; }
