/* Fighting finale */
.quest-fight {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 10px;
  background: #0a0a0a;
  color: #fff;
}

.fight-arena-shell {
  width: min(1080px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #131313;
  border: 2px solid #e6dfd2;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.55);
}

.fight-titlebar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 13px;
  background: #242424;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.fight-titlebar span,
.fight-titlebar b {
  display: block;
}

.fight-titlebar span {
  color: #f5b51b;
  letter-spacing: 0.13em;
  font-size: 7px;
}

.fight-titlebar b {
  margin-top: 3px;
  font-size: 12px;
}

.fight-titlebar button {
  border: 0;
  background: none;
  color: #fff;
  font-size: 26px;
}

.fight-hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  background: #171717;
}

.fight-side {
  min-width: 0;
}

.fight-side b {
  display: block;
  overflow: hidden;
  margin-bottom: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.06em;
  font-size: 9px;
}

.boss-side {
  text-align: right;
}

.fight-health {
  height: 16px;
  padding: 2px;
  background: #080808;
  border: 1px solid #eee;
}

.fight-health i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f4bd24, #db3e27);
  transform-origin: left center;
  transition: width 0.08s linear;
}

.boss-side .fight-health i {
  transform-origin: right center;
}

.fight-clock {
  text-align: center;
}

.fight-clock span,
.fight-clock b {
  display: block;
}

.fight-clock span {
  color: #f5b51b;
  font-size: 7px;
}

.fight-clock b {
  font-size: 25px;
  line-height: 1;
}

.fight-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #101419;
}

.fight-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 205px);
  aspect-ratio: 16 / 9;
  background: #1b2730;
  image-rendering: pixelated;
}

.fight-announcer {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #f5b51b;
  text-align: center;
  white-space: nowrap;
  letter-spacing: -0.05em;
  font: 900 clamp(30px, 7vw, 78px) / 0.85 "Arial Narrow", Arial, sans-serif;
  text-shadow: 4px 4px 0 #111;
  pointer-events: none;
}

.fight-combo {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 9px 12px;
  background: rgba(12, 12, 12, 0.9);
  border-right: 4px solid #f5b51b;
  text-align: right;
}

.fight-combo span,
.fight-combo b {
  display: block;
}

.fight-combo span {
  color: #f5b51b;
  font-size: 7px;
}

.fight-combo b {
  margin-top: 4px;
  font-size: 13px;
}

.fight-start-panel,
.fight-result {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  overflow-y: auto;
  padding: 28px;
  background: rgba(6, 8, 10, 0.86);
  text-align: center;
  backdrop-filter: blur(4px);
}

.fight-start-panel > span,
.fight-result > span {
  color: #f5b51b;
  letter-spacing: 0.15em;
  font-size: 9px;
}

.fight-start-panel h3,
.fight-result h3 {
  margin: 10px 0;
  font-size: clamp(32px, 5vw, 58px);
}

.fight-start-panel p,
.fight-result p {
  max-width: 680px;
  margin: 0 auto 20px;
  color: #c3beb5;
  line-height: 1.55;
}

.fight-keys {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin: 0 auto 20px;
}

.fight-keys span {
  padding: 7px 9px;
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 10px;
}

.fight-keys kbd {
  min-width: 24px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  margin-right: 3px;
  background: #f5b51b;
  color: #111;
  font-weight: 900;
}

.fight-discount {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 10px;
  margin: 2px 0 18px;
}

.fight-discount b {
  color: #f5b51b;
  font-size: clamp(70px, 12vw, 132px);
  line-height: 0.75;
}

.fight-discount span {
  max-width: 130px;
  text-align: left;
  text-transform: uppercase;
  font-size: 11px;
}

.fight-result-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.fight-footer {
  padding: 9px 13px;
  background: #191919;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.fight-help {
  display: flex;
  justify-content: center;
  gap: 18px;
  color: #aaa69e;
  font-size: 8px;
}

.fight-help b {
  color: #f5b51b;
}

.fight-mobile-controls {
  display: none;
  justify-content: space-between;
  gap: 10px;
}

.fight-mobile-controls > div {
  display: flex;
  gap: 6px;
}

.fight-mobile-controls button {
  min-width: 56px;
  min-height: 48px;
  padding: 6px;
  background: #292929;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  font-size: 9px;
  font-weight: 800;
  touch-action: none;
}

.fight-mobile-controls button.active {
  background: #f5b51b;
  color: #111;
}

