/* ═══════════════════════════════════════════════
   BOSS BATTLE — Performance Review Arena
   Light Professional Theme
   ═══════════════════════════════════════════════ */

.battle-screen { overflow: hidden; }

.battle-wrapper {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HUD Bar */
.battle-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.hud-back {
  font-family: var(--font-ui); font-size: 0.6rem; letter-spacing: 0.1em;
  color: var(--text-dim); text-decoration: none;
  transition: color 0.15s;
}
.hud-back:hover { color: var(--text-primary); }
.hud-title {
  font-family: var(--font-ui); font-size: 0.85rem; font-weight: 900;
  letter-spacing: 0.2em; color: var(--text-bright);
  display: flex; align-items: center; gap: 12px;
}
.hud-icon { font-size: 1rem; }
.hud-quarter { font-family: var(--font-ui); font-size: 0.6rem; letter-spacing: 0.1em; color: var(--text-dim); }

/* Arena */
.arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  padding: 24px 32px 16px;
  flex-shrink: 0;
  align-items: start;
}

/* Combatant */
.combatant {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.boss-side { align-items: flex-end; }

/* Portrait */
.combatant-portrait { position: relative; width: fit-content; }
.portrait-frame {
  width: 80px; height: 80px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-size: 1.4rem; font-weight: 700;
}
.protoss-frame { background: rgba(37,99,235,0.08); border: 2px solid var(--technology); color: var(--technology); }
.boss-frame    { background: rgba(220,38,38,0.08); border: 2px solid var(--danger);     color: var(--danger); }
.portrait-glow {
  position: absolute;
  inset: -6px;
  border-radius: 8px;
  opacity: 0;
}
.protoss-glow-ring { border: 1px solid rgba(37,99,235,0.15); }
.boss-glow-ring    { border: 1px solid rgba(220,38,38,0.15); }

.combatant-info { display: flex; flex-direction: column; gap: 8px; }
.combatant-info-right { align-items: flex-end; }
.c-name  { font-family: var(--font-ui); font-size: 0.9rem; font-weight: 700; color: var(--text-bright); letter-spacing: 0.1em; }
.c-class { font-size: 0.7rem; color: var(--text-dim); }

/* HP bars */
.hp-row {
  display: flex; align-items: center; gap: 10px;
  width: 320px;
}
.combatant-info-right .hp-row { flex-direction: row-reverse; }
.hp-label {
  font-family: var(--font-ui); font-size: 0.5rem; letter-spacing: 0.15em;
  color: var(--text-dim); width: 80px; flex-shrink: 0;
}
.combatant-info-right .hp-label { text-align: right; }
.hp-bar-outer {
  flex: 1; height: 12px;
  background: var(--bg-panel-alt);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.hp-bar-fill {
  height: 100%; border-radius: 6px;
  transition: width 0.6s ease;
}
.player-hp-fill  { background: linear-gradient(to right, var(--operations), var(--success)); }
.morale-fill     { background: linear-gradient(to right, rgba(37,99,235,0.5), var(--technology)); }
.boss-hp-fill    { background: linear-gradient(to right, #ef5350, #ff7043); }
.boss-morale-fill{ background: linear-gradient(to right, #7c3aed, #a78bfa); }
.hp-text {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-ui); font-size: 0.5rem; color: #fff;
}

/* Status chips */
.status-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.boss-chips   { justify-content: flex-end; }
.chip {
  font-family: var(--font-ui); font-size: 0.5rem; letter-spacing: 0.1em;
  padding: 4px 8px; border-radius: 2px;
}
.chip-green  { background: rgba(5,150,105,0.08);  color: var(--success); border: 1px solid rgba(5,150,105,0.2); }
.chip-orange { background: rgba(217,119,6,0.08); color: var(--warning); border: 1px solid rgba(217,119,6,0.2); }
.chip-red    { background: rgba(220,38,38,0.08);  color: var(--danger);  border: 1px solid rgba(220,38,38,0.2); }
.chip-blue   { background: rgba(8,145,178,0.08); color: var(--operations); border: 1px solid rgba(8,145,178,0.2); }
.chip-gold   { background: rgba(37,99,235,0.08); color: var(--technology); border: 1px solid rgba(37,99,235,0.2); }

/* VS Block */
.vs-block {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding-top: 12px;
}
.vs-text {
  font-family: var(--font-ui); font-size: 1.6rem; font-weight: 900;
  color: var(--border-glow);
}
.round-label {
  font-family: var(--font-ui); font-size: 0.6rem; letter-spacing: 0.2em;
  color: var(--text-dim);
}
.vs-divider { width: 1px; height: 40px; background: var(--border); }

/* Outcome track */
.outcome-preview { text-align: center; }
.op-label {
  font-family: var(--font-ui); font-size: 0.48rem; letter-spacing: 0.2em;
  color: var(--text-dim); display: block; margin-bottom: 6px;
}
.outcome-track {
  display: flex; flex-direction: column; gap: 3px;
  align-items: center;
}
.ot-item {
  font-family: var(--font-ui); font-size: 0.48rem; letter-spacing: 0.15em;
  padding: 4px 12px; border-radius: 2px;
  background: var(--bg-panel-alt); color: var(--text-dim);
  border: 1px solid transparent;
  transition: all 0.4s;
  width: 100px; text-align: center;
}
.ot-active {
  background: rgba(37,99,235,0.08); color: var(--technology);
  border-color: rgba(37,99,235,0.2);
}
.ot-promote { background: rgba(5,150,105,0.08); color: var(--success); }
.ot-pip     { background: rgba(220,38,38,0.08);  color: var(--danger); }

/* Battle Log */
.battle-log-wrap {
  flex: 1;
  padding: 0 32px;
  overflow: hidden;
  min-height: 0;
}
.battle-log {
  height: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.log-entry { font-size: 0.78rem; line-height: 1.5; padding: 4px 8px; border-radius: 2px; }
.log-system  { color: var(--text-dim); border-left: 2px solid var(--border); }
.log-player  { color: var(--success); border-left: 2px solid var(--success); background: rgba(5,150,105,0.04); }
.log-boss    { color: var(--danger);  border-left: 2px solid var(--danger);  background: rgba(220,38,38,0.04); }
.log-crit    { color: var(--technology); border-left: 2px solid var(--technology); background: rgba(37,99,235,0.04); font-weight: 700; }
.log-bad     { color: var(--warning); border-left: 2px solid var(--warning); }

/* Action Bar */
.action-bar {
  padding: 16px 32px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.action-bar-label {
  font-family: var(--font-ui); font-size: 0.55rem; letter-spacing: 0.2em;
  color: var(--text-dim); margin-bottom: 10px;
}
.actions {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.action-btn {
  font-family: var(--font-ui); font-size: 0.65rem; letter-spacing: 0.1em;
  padding: 12px 18px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer; border-radius: 3px;
  transition: all 0.15s;
  display: flex; flex-direction: column; gap: 4px;
  text-align: left;
  flex: 1; min-width: 150px;
}
.action-btn:hover:not(:disabled) {
  border-color: var(--technology);
  background: rgba(37,99,235,0.04);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.action-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.action-name { font-size: 0.7rem; color: var(--text-bright); font-weight: 700; }
.action-stat { font-size: 0.55rem; color: var(--text-dim); }
.action-effect { font-size: 0.6rem; }
.action-hit { color: var(--success); }
.action-miss { color: var(--warning); }

/* Shake animation */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(5px); }
}
.shake { animation: shake 0.4s ease; }

@keyframes float-dmg {
  0%   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-80px) scale(1.4); }
}
.dmg-float {
  position: fixed; z-index: 100;
  font-family: var(--font-ui); font-size: 1.5rem; font-weight: 900;
  pointer-events: none;
  animation: float-dmg 1s ease forwards;
}

/* Result overlay */
.result-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 50;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.result-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.result-icon  { font-size: 3.5rem; margin-bottom: 12px; }
.result-title {
  font-family: var(--font-ui); font-size: 1.8rem; font-weight: 900;
  letter-spacing: 0.2em; color: var(--text-bright);
  margin-bottom: 8px;
}
.result-sub { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 20px; }
.result-rewards {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 24px;
  padding: 14px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.reward-row {
  display: flex; justify-content: space-between;
  font-family: var(--font-ui); font-size: 0.65rem;
}
.reward-key { color: var(--text-dim); }
.reward-val { color: var(--xp-color); }
.result-actions { display: flex; gap: 12px; justify-content: center; }
