.fight-ui-scaler {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

.fight-ui {
  position: absolute;
  top: 0; /* dynamisch von hud.js::updateScale überschrieben */
  left: 50%;
  width: 1920px;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr 200px 1fr;
  align-items: start;
  gap: 24px;
  box-sizing: border-box;
  font-family: Georgia, serif;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transform-origin: top center;
  transform: translateX(-50%) scale(1);
  transition: opacity 500ms ease;
}

.fight-ui * {
  box-sizing: border-box;
}

.fight-ui.is-visible {
  opacity: 1;
}

.fight-ui .player-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fight-ui .player-ui.left {
  align-items: flex-end;
}

.fight-ui .player-ui.right {
  align-items: flex-start;
}

.fight-ui .health-shell {
  position: relative;
  width: 100%;
  max-width: 640px;
  height: 42px;
  padding: 3px;
  border: 2px solid #bfc4c7;
  border-radius: 8px;
  background: linear-gradient(to bottom, #7e878c 0%, #d3d8db 18%, #7b8489 40%, #4f565a 100%);
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 8px rgba(0, 0, 0, 0.35);
}

.fight-ui .player-ui.left .health-shell {
  clip-path: polygon(2% 0, 100% 0, 98% 100%, 0 100%);
}

.fight-ui .player-ui.right .health-shell {
  clip-path: polygon(0 0, 98% 0, 100% 100%, 2% 100%);
  display: flex;
  justify-content: flex-end;
}

.fight-ui .health-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(
    90deg,
    #0f2617 0%,
    #183822 18%,
    #21472c 35%,
    #0f2817 55%,
    #173420 75%,
    #1b3b24 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 -8px 14px rgba(0, 0, 0, 0.25);
  transition: width 180ms linear;
}

.fight-ui .round-badge {
  width: 160px;
  height: 124px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%);
  background: linear-gradient(to bottom, #a9d25b 0%, #8fbd3b 40%, #5f9a25 70%, #347512 100%);
  border-top: 2px solid rgba(255, 255, 255, 0.3);
  border-bottom: 4px solid rgba(0, 0, 0, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.14),
    0 4px 10px rgba(0, 0, 0, 0.3);
  position: relative;
}

.fight-ui .round-badge::before {
  content: "∞";
  position: absolute;
  top: -10px;
  font-size: 42px;
  color: #555;
  text-shadow: 0 1px 0 #999;
}

.fight-ui .round-label {
  margin-top: 14px;
  font-size: 24px;
  line-height: 1;
  color: #4b4b4b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
}

.fight-ui .round-number {
  font-size: 52px;
  line-height: 1;
  color: #444;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.fight-ui .wins {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.fight-ui .win-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d8d8d8 0%, #bfbfbf 55%, #8f8f8f 100%);
  border: 2px solid #9c9c9c;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.5),
    inset 0 -2px 5px rgba(0, 0, 0, 0.18);
}

.fight-ui .win-dot.active {
  background: radial-gradient(circle at 35% 35%, #fff6a8 0%, #f1d94a 45%, #bf8f00 100%);
  border-color: #d3a300;
}

.clash-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
}

.clash-intro-text {
  font: 900 min(14vw, 220px)/1 "Impact", "Arial Black", sans-serif;
  color: #fff2a8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(255, 120, 0, 0.9),
    0 0 24px rgba(255, 40, 0, 0.7),
    0 6px 0 #111,
    0 10px 40px rgba(0, 0, 0, 0.85);
  transform: scale(3) rotate(-6deg);
  opacity: 0;
  will-change: transform, opacity;
  animation: clash-intro-text 900ms cubic-bezier(0.22, 1.2, 0.36, 1) forwards;
}

.clash-intro-burst {
  position: absolute;
  width: 14vmin;
  height: 14vmin;
  border-radius: 50%;
  border: 6px solid rgba(255, 220, 120, 0.95);
  box-shadow:
    0 0 40px rgba(255, 150, 30, 0.85),
    inset 0 0 24px rgba(255, 200, 80, 0.45);
  transform: scale(0.1);
  opacity: 0;
  will-change: transform, opacity, border-width;
  animation: clash-intro-burst 650ms 430ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

@keyframes clash-intro-text {
  0%   { transform: scale(3) rotate(-6deg); opacity: 0; }
  22%  { transform: scale(1) rotate(0deg);   opacity: 1; }
  55%  { transform: scale(1.04) rotate(0deg); opacity: 1; }
  70%  { transform: scale(1.15) rotate(0deg); opacity: 1; }
  100% { transform: scale(3.5) rotate(0deg);  opacity: 0; }
}

@keyframes clash-intro-burst {
  0%   { transform: scale(0.15); opacity: 0; border-width: 8px; }
  20%  { opacity: 1; }
  100% { transform: scale(9); opacity: 0; border-width: 1px; }
}

@media (prefers-reduced-motion: reduce) {
  .clash-intro-text,
  .clash-intro-burst {
    animation-duration: 400ms;
    animation-timing-function: linear;
  }
}
