/* In-match unified HUD (top) and results overlay. */

/* Unified HUD — top center, condensed, retro Quake 3 feel */
#match-hud {
  position: fixed;
  top: 0.35rem;
  left: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.4rem 0.6rem;
  flex-wrap: nowrap;
  justify-content: center;
  max-width: calc(100vw - 0.75rem);
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(10,8,6,0.88), rgba(5,4,3,0.94));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: var(--bevel), 0 2px 16px rgba(0,0,0,0.7), 0 0 8px rgba(204,34,0,0.12);
  transform: translateX(-50%);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow: hidden;
  white-space: nowrap;
}

.hud-brand {
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(204,34,0,0.4);
}

.hud-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1;
  font-size: 0.7rem;
}

.hud-detail strong {
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.hud-detail span {
  color: var(--faint);
  font-size: 0.58rem;
  font-family: var(--font-mono);
}

.hud-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1;
}

.hud-label {
  color: var(--muted);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hud-stat strong {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.hud-stat strong[data-status="complete"] {
  color: var(--warn);
}

.hud-stat strong[data-status="live"] {
  color: var(--ok);
}

.bot-hud-progress {
  width: 4rem;
  height: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 1px;
  background: rgba(0,0,0,0.5);
  overflow: hidden;
  align-self: center;
  flex-shrink: 0;
}

.bot-hud-progress #bot-hud-progress {
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--accent) 0 4px, var(--accent-bright) 4px 8px);
  box-shadow: 0 0 6px rgba(204,34,0,0.5);
  transition: width 180ms linear;
}

#leave-match {
  font-size: 0.62rem;
  padding: 0.2rem 0.5rem;
  white-space: nowrap;
}

#leave-match.leave-highlight {
  animation: leave-pulse 0.8s ease-in-out 2;
  border-color: var(--accent);
  color: var(--accent-bright);
}

@keyframes leave-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(204, 34, 0, 0); }
  50% { box-shadow: 0 0 0 6px rgba(204, 34, 0, 0.35); }
}

/* Results overlay */
.results-dialog {
  width: min(44rem, 100%);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}

/* Mobile: smaller HUD */
@media (max-width: 640px) {
  #match-hud {
    gap: 0.3rem 0.5rem;
    padding: 0.25rem 0.4rem;
    font-size: 0.7rem;
  }
  .hud-brand { font-size: 0.5rem; }
  .hud-stat strong { font-size: 0.7rem; }
  .bot-hud-progress { width: 4rem; }
}