/*
 * Enemy health bar, styled after Path of Exile 2's monster/boss life bar:
 * a dark, riveted bronze frame around a blood-red fill, with a glossy top
 * sheen and a lighter "chip damage" trail that briefly lags behind a hit
 * before catching down to the real value.
 */
.life-container {
  position: relative;
  height: 40px;
  border-radius: 3px;
  border: 1px solid #4a3418;
  background: linear-gradient(180deg, #16110b, #0a0806);
  box-shadow:
    inset 0 0 0 1px rgba(212, 175, 110, 0.25),
    inset 0 2px 3px rgba(0, 0, 0, 0.7),
    0 1px 2px rgba(0, 0, 0, 0.6);
  overflow: hidden;

  .life-ghost, .life {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
  }

  /* Trailing chip-damage layer: catches down to the real value on a delay,
     leaving a brief pale afterglow where health was just lost. */
  .life-ghost {
    background: linear-gradient(180deg, #e8c477, #b8863c);
    transition: width 1s ease-out 0.3s;
  }

  .life {
    background: linear-gradient(180deg, #b3121f, #6e0000);
    box-shadow: inset 0 2px 3px rgba(255, 96, 96, 0.35);
    transition: width 0.3s ease-out;
  }

  .name {
    position: relative;
    z-index: 2;
    margin: auto;
    color: #ecdcb8;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  }

  /* Glass sheen across the top third, same finish as the life orb's glass-streak */
  &::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.2),
      rgba(255, 255, 255, 0) 45%
    );
  }
}

