/* ═══════════════════════════════════════════════════════════
   BOSS.CSS — 3-Phase Boss Matrix (boss.html)
   Page-specific styles. Requires main.css.
   ═══════════════════════════════════════════════════════════ */

/* ─── BOSS HERO ───────────────────────────────────────────── */
.boss-hero {
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.boss-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.boss-name {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
.boss-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.boss-area {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* HP Bar */
.boss-hp-wrap { min-width: 240px; }
.boss-hp-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-family: var(--mono);
}
.boss-hp-bar {
  height: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.boss-hp-fill {
  height: 100%;
  border-radius: 4px;
}
.boss-hp-fill.full { background: linear-gradient(90deg, #36d399, #22c55e); width: 100%; }

/* Phase dividers on HP bar */
.boss-hp-bar::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 35%; width: 1px;
  background: rgba(0,0,0,0.6);
  box-shadow: 26.5% 0 0 rgba(0,0,0,0.6);
}

/* ─── PHASE GRID ──────────────────────────────────────────── */
.phase-section { margin-bottom: 28px; }
.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.phase-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phase-card.phase-1 { border-top: 2px solid var(--green); }
.phase-card.phase-2 { border-top: 2px solid var(--orange); }
.phase-card.phase-3 { border-top: 2px solid var(--red); }

.phase-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.phase-num {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 3px;
}
.phase-name { font-size: 14px; font-weight: 700; color: var(--text); }
.phase-hp-range {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.phase-1 .phase-hp-range { background: var(--green-dim); color: var(--green); }
.phase-2 .phase-hp-range { background: var(--orange-dim); color: var(--orange); }
.phase-3 .phase-hp-range { background: var(--red-dim); color: var(--red); }

/* Attack list */
.attack-list { padding: 12px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.attack-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.attack-num {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  min-width: 14px;
  padding-top: 1px;
}
.attack-body { flex: 1; }
.attack-name { font-size: 13px; font-weight: 600; color: var(--text); }
.attack-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.attack-counter {
  font-size: 11px;
  color: var(--accent);
  margin-top: 3px;
  font-style: italic;
}
.attack-dmg {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
  padding-top: 2px;
}

/* Needs Validation state */
.phase-card.needs-validation {
  position: relative;
}
.needs-validation-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12,12,20,0.75);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-lg);
}
.needs-validation-overlay .badge { font-size: 11px; padding: 4px 10px; }
.needs-validation-overlay p { font-size: 12px; color: var(--text-muted); text-align: center; max-width: 160px; }

/* ─── WEAKNESS / RESISTANCE ───────────────────────────────── */
.resist-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.resist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.resist-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.resist-title.weak { color: var(--red); }
.resist-title.strong { color: var(--green); }
.resist-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.resist-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.resist-slot.weakness { border-color: rgba(255,68,68,0.2); }
.resist-slot.resistance { border-color: rgba(54,211,153,0.2); }
.resist-icon { font-size: 16px; }
.resist-label { font-size: 12px; font-weight: 600; color: var(--text); }
.resist-mod { font-size: 11px; font-family: var(--mono); margin-left: 4px; }
.resist-slot.weakness .resist-mod { color: var(--red); }
.resist-slot.resistance .resist-mod { color: var(--green); }

/* ─── BOTTOM GRID (PREP + LOOT) ───────────────────────────── */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}

/* Prep list */
.prep-list { display: flex; flex-direction: column; gap: 8px; }
.prep-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.prep-icon { font-size: 16px; flex-shrink: 0; }
.prep-body { flex: 1; }
.prep-name { font-size: 13px; font-weight: 600; color: var(--text); }
.prep-qty  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Loot table */
.loot-list { display: flex; flex-direction: column; gap: 8px; }
.loot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255,197,50,0.04);
  border: 1px solid rgba(255,197,50,0.12);
  border-radius: var(--radius);
}
.loot-left { display: flex; align-items: center; gap: 10px; }
.loot-icon { font-size: 16px; flex-shrink: 0; }
.loot-name { font-size: 13px; font-weight: 600; color: var(--text); }
.loot-type { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.loot-drop-rate {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}
.loot-xp-line {
  padding: 10px 12px;
  background: rgba(232,255,61,0.04);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.loot-xp-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.loot-xp-value { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--accent); }

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .phase-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .boss-header { flex-direction: column; }
  .boss-hp-wrap { min-width: unset; width: 100%; }
  .resist-section { grid-template-columns: 1fr; }
  .bottom-grid { grid-template-columns: 1fr; }
}
