:root {
  --bossfight-glow: 0 0 18px rgba(0, 255, 139, 0.35);
  --bossfight-border: 1px solid rgba(0, 255, 139, 0.35);
  --bossfight-panel-bg: rgba(10, 14, 13, 0.92);
}

.bossfight-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bossfight-overlay--active {
  pointer-events: none;
}

.bossfight-modal {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 7, 0.72);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.bossfight-modal--visible {
  display: flex;
  pointer-events: auto;
}

body.bossfight-lock {
  overflow: hidden;
}

.bossfight-panel {
  width: min(92vw, 540px);
  border-radius: 18px;
  border: var(--bossfight-border);
  background: linear-gradient(145deg, rgba(11, 15, 14, 0.98), rgba(4, 9, 7, 0.92));
  box-shadow: var(--bossfight-glow);
  padding: 22px 22px 20px;
}

.bossfight-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
  color: var(--lit-light-mid);
  margin-bottom: 8px;
}

.bossfight-eyebrow__quarter {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

.bossfight-title {
  font-size: 22px;
  margin: 0 0 8px;
}

.bossfight-subtitle {
  margin: 0 0 18px;
  color: rgba(217, 247, 232, 0.75);
}

.bossfight-story {
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 139, 0.25);
  background: rgba(7, 12, 10, 0.75);
  padding: 10px 12px;
  margin: 0 0 16px;
  display: grid;
  gap: 6px;
}

.bossfight-story p {
  margin: 0;
  font-size: 12px;
  color: rgba(217, 247, 232, 0.75);
  line-height: 1.35;
}

.bossfight-portrait {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 16px;
  border: 1px solid rgba(0, 255, 139, 0.3);
  background: radial-gradient(circle at top, rgba(0, 255, 139, 0.2), rgba(7, 12, 10, 0.9));
  position: relative;
  overflow: hidden;
  margin: 0 0 14px;
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.45);
  background-size: cover;
  background-position: center;
}

.bossfight-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 8, 7, 0), rgba(5, 8, 7, 0.65));
}

.bossfight-portrait__label {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(217, 247, 232, 0.8);
  z-index: 1;
}

.bossfight-portrait--defeated {
  background: radial-gradient(circle at top, rgba(0, 255, 139, 0.08), rgba(7, 12, 10, 0.95));
}

.bossfight-event,
.bossfight-breakpoints {
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(0, 255, 139, 0.85);
  letter-spacing: 0.04em;
  display: none;
}

.bossfight-breakpoints {
  color: rgba(217, 247, 232, 0.75);
}

.bossfight-event--visible,
.bossfight-breakpoints--visible {
  display: block;
}

.bossfight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.bossfight-metric {
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 139, 0.2);
  padding: 10px 12px;
  background: rgba(9, 12, 11, 0.7);
}

.bossfight-metric--full {
  grid-column: 1 / -1;
}

.bossfight-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(217, 247, 232, 0.6);
}

.bossfight-value {
  display: block;
  font-size: 18px;
  margin-top: 6px;
}

.bossfight-value--compact {
  font-size: 15px;
  letter-spacing: 0.04em;
}

.bossfight-value--hp {
  margin-bottom: 8px;
}

.bossfight-hpbar {
  width: 100%;
  height: 22px;
  border-radius: 999px;
  background: rgba(0, 255, 139, 0.16);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 255, 139, 0.3);
}

.bossfight-hpbar__fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, rgba(0, 255, 139, 0.75), rgba(0, 163, 89, 0.95));
  transition: width 0.2s ease;
  border-radius: inherit;
}

.bossfight-hpbar__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: rgba(11, 15, 14, 0.92);
  text-shadow: 0 0 6px rgba(0, 255, 139, 0.3);
  pointer-events: none;
  letter-spacing: 0.04em;
}

.bossfight-hpbar__markers {
  position: absolute;
  inset: 2px;
  pointer-events: none;
}

.bossfight-hpbar__marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(217, 247, 232, 0.55);
  box-shadow: 0 0 6px rgba(0, 255, 139, 0.35);
}

.bossfight-hpbar--compact {
  height: 14px;
}

@media (max-width: 700px) {
  .bossfight-panel {
    width: min(94vw, 420px);
    padding: 16px 16px 14px;
  }

  .bossfight-title {
    font-size: 18px;
  }

  .bossfight-subtitle {
    margin-bottom: 12px;
    font-size: 13px;
  }

  .bossfight-portrait {
    border-radius: 12px;
    margin-bottom: 10px;
  }

  .bossfight-story {
    padding: 8px 10px;
    margin-bottom: 12px;
    gap: 4px;
  }

  .bossfight-story p {
    font-size: 11px;
  }

  .bossfight-grid {
    gap: 8px;
    margin-bottom: 12px;
  }

  .bossfight-metric {
    padding: 8px 10px;
  }

  .bossfight-label {
    font-size: 10px;
  }

  .bossfight-value {
    font-size: 15px;
  }

  .bossfight-value--compact {
    font-size: 13px;
  }

  .bossfight-hpbar {
    height: 18px;
  }

  .bossfight-hpbar__text {
    font-size: 10px;
  }
}

.bossfight-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.bossfight-button {
  flex: 1;
  border-radius: 12px;
  border: none;
  padding: 12px 14px;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(0, 255, 139, 0.16), rgba(0, 163, 89, 0.35));
  color: var(--lit-text-main);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bossfight-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--bossfight-glow);
}

.bossfight-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.bossfight-button--ghost {
  background: transparent;
  border: 1px solid rgba(0, 255, 139, 0.35);
}

.bossfight-hint {
  font-size: 12px;
  color: rgba(217, 247, 232, 0.7);
}

.bossfight-active {
  margin: 10px 0 0;
  font-size: 12px;
  color: rgba(0, 255, 139, 0.85);
  letter-spacing: 0.04em;
  display: none;
}

.bossfight-active--visible {
  display: block;
}

.bossfight-hint--alert {
  font-weight: 600;
  color: #00ff8b;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 255, 139, 0.12);
  border: 1px solid rgba(0, 255, 139, 0.35);
  margin-top: 6px;
}

.bossfight-hide {
  display: none;
  margin-top: 10px;
}

.bossfight-checkbox {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: rgba(217, 247, 232, 0.8);
}

.bossfight-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--lit-neon-accent);
}

.bossfight-checkbox span {
  line-height: 1.2;
}

.bossfight-modal--denied .bossfight-grid {
  display: none;
}

.bossfight-modal--denied .bossfight-subtitle {
  margin-bottom: 12px;
}

.bossfight-modal--denied .bossfight-hide {
  display: block;
}

.bossfight-toast {
  position: absolute;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0, 255, 139, 0.18);
  border: 1px solid rgba(0, 255, 139, 0.4);
  color: var(--lit-text-main);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.bossfight-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}
