/* Renn-HUD im Design des Startbildschirms (Farben und Schriften aus menu.css).
   Feste Buehne 1280x720 wie Phaser; die Map belegt die Mitte (x 160-1120),
   links und rechts bleiben je 160 px Randbalken fuer die Panels. */

#hud {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--schrift); color: #fff; user-select: none;
}
#hud[hidden] { display: none; }
#hud-stage {
  position: relative; width: 1280px; height: 720px; flex: none;
  transform-origin: center center;
}

.h-links, .h-rechts {
  position: absolute; top: 0; bottom: 0; width: 160px; box-sizing: border-box;
  padding: 10px 8px; display: flex; flex-direction: column; gap: 10px;
}
.h-links { left: 0; }
.h-rechts { right: 0; }

/* Spielerkarten */
.h-karte {
  position: relative; overflow: hidden; border-radius: 16px; padding: 8px 10px 8px 14px;
  background: linear-gradient(180deg, rgba(20,56,32,.94) 0%, rgba(11,35,20,.97) 100%);
  border: 2px solid var(--mint); box-shadow: 0 6px 14px rgba(0,0,0,.45);
}
.h-karte::before { /* Farbstreifen des Autos */
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--auto);
}
.h-name { display: flex; align-items: center; gap: 5px; font-family: var(--schrift-sniglet);
  font-size: 15px; color: var(--gelb-hell); }
.h-emoji { font-size: 17px; }
.h-p { margin-left: auto; font-family: var(--schrift); font-weight: 900; font-size: 10px; padding: 1px 6px;
  border-radius: 999px; background: rgba(0,0,0,.35); border: 1px solid rgba(110,231,183,.4); color: #d1fae5; }
.h-runde { margin-top: 4px; font-family: var(--schrift-arcade); font-size: 22px; color: #fff; line-height: 1.1; }
.h-runde b { color: var(--gelb-hell); font-weight: normal; }
.h-runde small { font-size: 15px; color: var(--mint-hell); }
.h-ziel { font-size: 17px; color: var(--gelb-hell); }
.h-zeit { font-family: var(--schrift-arcade); font-size: 18px; color: var(--mint-hell); font-variant-numeric: tabular-nums; }
.h-best { font-size: 12px; font-weight: 900; color: #d1fae5; font-variant-numeric: tabular-nums; }
.h-best small { font-size: 9px; letter-spacing: .15em; color: #6ee7b7; margin-right: 2px; }
.h-best i { font-style: normal; color: var(--gelb); }
.h-power:empty { display: none; }
.h-pu { display: inline-block; margin-top: 5px; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 900; letter-spacing: .03em; }
.h-pu.turbo { background: #0288d1; color: #fff; box-shadow: 0 0 10px rgba(41,182,246,.7); }
.h-pu.riese { background: #d81b60; color: #fff; box-shadow: 0 0 10px rgba(240,98,146,.7); }

/* Rundenzeiten rechts */
.h-kopf { text-align: center; padding: 5px 0; border-radius: 999px; font-size: 11px; font-weight: 900;
  letter-spacing: .15em; color: var(--gelb); background: rgba(2,44,34,.85); border: 1px solid rgba(16,185,129,.4); }
.h-liste { display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.h-block { border-radius: 14px; padding: 6px 9px; background: rgba(11,35,20,.9);
  border: 1px solid rgba(16,185,129,.35); }
.h-block-name { font-family: var(--schrift-sniglet); font-size: 13px; color: var(--gelb-hell);
  padding-bottom: 3px; margin-bottom: 3px; border-bottom: 1px solid rgba(16,185,129,.25); }
.h-block ol { list-style: none; margin: 0; padding: 0; }
.h-block li { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800;
  color: #d1fae5; font-variant-numeric: tabular-nums; line-height: 1.45; }
.h-block li span { color: #6ee7b7; }
.h-block li.best { color: var(--gelb-hell); }
.h-block li.rekord::after { content: ' ★'; color: var(--gelb); }
.h-block li.leer { color: rgba(167,243,208,.5); font-weight: 700; font-style: italic; }

/* Ergebnistafel nach dem Rennen */
.h-ergebnis {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 620px; box-sizing: border-box; padding: 22px 28px 18px; border-radius: 28px; text-align: center;
  background: linear-gradient(145deg, var(--holz-1), var(--holz-2)); border: 5px solid var(--holz-rand);
  box-shadow: inset 0 2px 5px rgba(255,255,255,.1), 0 20px 40px rgba(0,0,0,.6);
  animation: ergebnisRein .45s cubic-bezier(.2,1.4,.4,1);
}
.h-ergebnis[hidden] { display: none; }
@keyframes ergebnisRein { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } }
.h-erg-titel { font-family: var(--schrift-arcade); font-size: 44px; color: var(--gelb-hell);
  -webkit-text-stroke: 2px #0f391b; text-shadow: 3px 3px 0 #064e3b, 5px 5px 0 rgba(0,0,0,.5); }
.h-erg-rekord { margin: 8px auto 12px; display: inline-block; padding: 5px 16px; border-radius: 999px;
  font-size: 15px; font-weight: 800; color: var(--mint-hell); background: rgba(2,44,34,.75);
  border: 1px solid rgba(250,204,21,.5); }
.h-erg-rekord b { color: var(--gelb-hell); }
.h-ergebnis table { width: 100%; border-collapse: collapse; font-size: 18px; font-weight: 800; }
.h-ergebnis th { font-size: 11px; letter-spacing: .15em; color: #6ee7b7; text-transform: uppercase;
  font-weight: 900; padding: 4px 6px; text-align: left; }
.h-ergebnis td { padding: 7px 6px; text-align: left; border-top: 1px solid rgba(255,255,255,.1);
  font-variant-numeric: tabular-nums; }
.h-ergebnis td.platz { font-family: var(--schrift-arcade); color: var(--mint-hell); width: 36px; }
.h-ergebnis tr.sieger td { color: var(--gelb-hell); }
.h-ergebnis td.rekord { color: var(--gelb); }
.h-ergebnis td.rekord::after { content: ' ★'; }
.h-ergebnis.mit-eingabe { width: 860px; }

/* Arcade-Namenseingabe */
.h-eintrag { width: 260px; }
.h-slots { display: inline-flex; align-items: center; gap: 6px; }
.h-slot {
  position: relative; width: 34px; height: 42px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--schrift-arcade); font-size: 28px; color: var(--mint-hell);
  background: rgba(0,0,0,.4); border: 2px solid rgba(110,231,183,.35);
}
.h-slot.aktiv {
  color: #022c22; background: var(--gelb); border-color: #fef08a;
  box-shadow: 0 0 14px rgba(250,204,21,.8); animation: slotPuls .8s ease-in-out infinite;
}
@keyframes slotPuls { 50% { transform: scale(1.08); } }
.h-slot i { position: absolute; left: 0; right: 0; text-align: center; line-height: 1;
  font-style: normal; font-size: 11px; color: var(--gelb); }
.h-hoch { top: -15px; } .h-runter { bottom: -15px; }
.h-ok { margin-left: 4px; font-size: 22px; color: rgba(167,243,208,.6); }
.h-slots.fertig .h-slot { color: var(--gelb-hell); border-color: var(--gelb); }
.h-slots.fertig .h-ok { color: #22c55e; }
.h-name-fertig { font-family: var(--schrift-arcade); font-size: 26px; letter-spacing: .12em; color: var(--gelb-hell); }
.h-platz-neu { margin-left: 10px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 900;
  background: rgba(2,44,34,.8); border: 1px solid var(--gelb); color: var(--gelb-hell); }
.h-kein { color: rgba(167,243,208,.4); }
.h-erg-aufruf {
  margin: 0 auto 10px; display: inline-block; padding: 6px 20px; border-radius: 14px;
  font-family: var(--schrift-arcade); font-size: 20px; color: #022c22;
  background: linear-gradient(180deg, #fde047, #f59e0b); border: 2px solid #fef08a;
  box-shadow: 0 4px 0 var(--orange-schatten); animation: aufrufPuls 1.2s ease-in-out infinite;
}
@keyframes aufrufPuls { 50% { transform: scale(1.04); box-shadow: 0 4px 0 var(--orange-schatten), 0 0 22px rgba(250,204,21,.8); } }
.h-warn { color: var(--gelb-hell); animation: aufrufPuls 1s ease-in-out infinite; display: inline-block; }
.h-ergebnis td.h-eintrag { padding-top: 12px; padding-bottom: 12px; }

.h-erg-fuss { margin-top: 14px; font-size: 14px; font-weight: 800; color: var(--mint-hell); }
.h-taste { display: inline-block; padding: 0 .45em; border-radius: 6px; background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.25); font-weight: 900; color: #d1fae5; margin-right: 4px; }
