/* ═══════════════════════════════════════════════════════════════
   БОЁВКА — тёмный мистико-неоновый стиль
   - Чёрная арена с фиолетово-розовым свечением
   - Неоновые HP/стамина (розовый игрок vs фиолетовый враг)
   - Сворачиваемая панель комбо под HP
   ═══════════════════════════════════════════════════════════════ */

:root {
  --p1-neon: #ff5fa8;       /* розовый игрока (под Heathcliff-стиль) */
  --p1-neon-soft: rgba(255, 95, 168, 0.45);
  --p1-neon-glow: rgba(255, 95, 168, 0.7);

  --p2-neon: #a060ff;       /* фиолетовый врага */
  --p2-neon-soft: rgba(160, 96, 255, 0.45);
  --p2-neon-glow: rgba(160, 96, 255, 0.7);

  --battle-bg: #0a0510;
  --battle-panel: rgba(12, 8, 20, 0.92);
  --battle-border: rgba(190, 130, 230, 0.35);
}

#screen-battle { background: var(--battle-bg); }

.battle-arena {
  position: relative;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  overflow: hidden;
}

.battle-back {
  top: auto !important; bottom: 16px; left: 16px;
  font-size: 10px !important;
  padding: 6px 12px !important;
  background: rgba(0,0,0,0.7) !important;
  border-color: var(--battle-border) !important;
  color: #c8a8e6 !important;
  z-index: 60;
}

/* ═══════════ HUD ═══════════ */
.battle-hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  padding: 20px 36px 12px;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(10,5,16,0.6) 70%, transparent 100%);
  position: relative;
  z-index: 10;
}

.hud-side { display: flex; flex-direction: column; }

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.bar-row > .hp-track,
.bar-row > .stamina-track { flex: 1; }

.bar-icon {
  width: 24px; height: 24px;
  flex-shrink: 0;
  image-rendering: pixelated;
  opacity: 0.9;
}
.hud-right { align-items: flex-end; }
.hud-right .hud-name { text-align: right; }

.hud-name {
  font-family: 'Metamorphous', 'Cinzel', serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}
.hud-left  .hud-name { color: var(--p1-neon); text-shadow: 0 0 12px var(--p1-neon-soft), 0 1px 2px #000; }
.hud-right .hud-name { color: var(--p2-neon); text-shadow: 0 0 12px var(--p2-neon-soft), 0 1px 2px #000; }

/* ─── HP-полоса ─── */
.hp-track {
  position: relative;
  height: 18px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  box-shadow:
    inset 0 0 12px rgba(0,0,0,0.85),
    0 0 8px rgba(0,0,0,0.5);
}
.hud-left  .hp-track { border-color: var(--p1-neon-soft); box-shadow: inset 0 0 12px rgba(0,0,0,0.85), 0 0 14px var(--p1-neon-soft); }
.hud-right .hp-track { border-color: var(--p2-neon-soft); box-shadow: inset 0 0 12px rgba(0,0,0,0.85), 0 0 14px var(--p2-neon-soft); }

.hp-fill {
  height: 100%;
  width: 100%;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 -2px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}
.hud-left .hp-fill {
  background: linear-gradient(180deg, #ff8fc4 0%, var(--p1-neon) 55%, #b8336a 100%);
}
.hud-right .hp-fill {
  background: linear-gradient(180deg, #c89aff 0%, var(--p2-neon) 55%, #6730b8 100%);
}
.hp-track.right .hp-fill { float: right; }

.hp-fill.critical {
  background: linear-gradient(180deg, #ff5040 0%, #c0301f 55%, #4a1810 100%) !important;
  animation: hp-pulse 0.55s ease-in-out infinite;
}
@keyframes hp-pulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.6); }
}

.hp-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 0 4px #000, 0 1px 2px #000;
}

/* ─── СТАМИНА ─── */
.stamina-track {
  margin-top: 6px;
  height: 6px;
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.stamina-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ffcc44 0%, #ff8a30 100%);
  box-shadow: 0 0 8px rgba(255, 168, 60, 0.4);
  transition: width 0.18s ease;
}
.stamina-track.right .stamina-fill { float: right; }

/* ═══════════ ЦЕНТР HUD ═══════════ */
.hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.round-timer {
  font-family: 'Metamorphous', 'Cinzel', serif;
  font-weight: 700;
  font-size: 42px;
  color: #f0e0ff;
  text-shadow:
    0 0 20px rgba(200, 160, 255, 0.6),
    0 0 8px rgba(255, 100, 180, 0.4),
    0 2px 4px rgba(0,0,0,0.9);
  line-height: 1;
  letter-spacing: 0.05em;
}
.round-timer.warn {
  color: #ff6040;
  text-shadow: 0 0 20px rgba(255, 80, 60, 0.8), 0 2px 4px #000;
  animation: hp-pulse 0.5s ease-in-out infinite;
}

.round-indicator { display: flex; gap: 7px; }
.round-dot {
  width: 12px; height: 12px;
  border: 1.5px solid rgba(200, 160, 255, 0.4);
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  transition: all 0.3s ease;
}
.round-dot.won {
  background: radial-gradient(circle, #fff0ff, #ff5fa8 60%, #c03a80 100%);
  border-color: #ffb0d8;
  box-shadow: 0 0 12px var(--p1-neon-glow);
}

/* ═══════════ АРЕНА ═══════════ */
.arena-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.arena-bg {
  position: absolute; inset: 0;
  z-index: 0;
  background: url('../img/arena_act1_ch1.png?v=2') center / cover no-repeat;
}

/* пол арены — бойцы стоят на нём */
.arena-floor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 34%;
  background: url('../img/arena_floor.png') center bottom / cover no-repeat;
  z-index: 4;
  pointer-events: none;
}

/* тёмный градиент сверху для HUD-читаемости */
.arena-bg::before {
  content: ""; position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(160, 80, 220, 0.18) 0%, transparent 45%),
    radial-gradient(ellipse at 75% 55%, rgba(220, 80, 160, 0.15) 0%, transparent 45%),
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, transparent 30%);
  pointer-events: none;
}

/* затемнение пола под бойцами */
.arena-bg::after {
  content: ""; position: absolute;
  bottom: 0; left: 0; right: 0; height: 22%;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 2, 12, 0.9) 100%);
  pointer-events: none;
}

/* туман у пола арены */
.arena-fog {
  position: absolute;
  bottom: 8%;
  left: -10%; right: -10%;
  height: 28%;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(200, 130, 230, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(255, 130, 200, 0.15) 0%, transparent 60%);
  filter: blur(20px);
  pointer-events: none;
  animation: fog-drift 14s ease-in-out infinite;
  z-index: 2;
}
@keyframes fog-drift {
  0%, 100% { transform: translateX(0) scaleY(1); opacity: 0.7; }
  50%      { transform: translateX(40px) scaleY(1.1); opacity: 1; }
}

/* парящие частицы (золотая пыль -> сиреневая) */
.arena-particle {
  position: absolute;
  width: 3px; height: 3px;
  background: radial-gradient(circle, #fff, rgba(220, 180, 255, 0.6) 50%, transparent 100%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 0 4px rgba(220, 180, 255, 0.8));
}

/* ═══════════ БОЙЦЫ ═══════════ */
.fighter {
  position: absolute;
  bottom: 34%;
  width: 520px; height: 660px;
  display: flex; align-items: flex-end; justify-content: center;
  transition: left 0.05s linear, transform 0.18s ease;
  z-index: 20;
  pointer-events: none;
  will-change: transform;
}
.fighter svg,
.fighter img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: 50% 100%;   /* прижать к низу бокса — бойцы стоят на полу, а не парят */
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,0.85));
}
.fighter-p1 { left: 18%; }
.fighter-p2 { left: 68%; }

/* нокдаун: широкий «лежачий» спрайт прижимаем низом к полу,
   чтобы тело лежало на земле, а не парило по центру бокса */
.fighter.knocked { transition: none; }
.fighter.knocked img,
.fighter.knocked svg {
  object-position: 50% 100%;
}

/* «шаги» — покачивание во время ходьбы (для врагов без walk-спрайтов) */
.fighter.stepping img,
.fighter.stepping svg {
  animation: step-bob 0.34s ease-in-out infinite;
  transform-origin: 50% 100%;
}
@keyframes step-bob {
  0%   { transform: translateY(0)     rotate(0deg); }
  25%  { transform: translateY(-7px)  rotate(-1.5deg); }
  50%  { transform: translateY(0)     rotate(0deg); }
  75%  { transform: translateY(-7px)  rotate(1.5deg); }
  100% { transform: translateY(0)     rotate(0deg); }
}

/* «дыхание» в стойке — мягкое покачивание для врагов без кадра idle_2,
   чтобы ВСЕ враги выглядели живыми, а не статичной картинкой */
.fighter.idle-breath img,
.fighter.idle-breath svg {
  animation: idle-breath 2.4s ease-in-out infinite;
  transform-origin: 50% 100%;
}
@keyframes idle-breath {
  0%, 100% { transform: translateY(0)    scaleY(1);     }
  50%      { transform: translateY(-4px) scaleY(1.018); }
}

/* стойка блока — лёгкое приседание/упор, читается даже без смены спрайта */
.fighter.blocking img,
.fighter.blocking svg {
  transform: translateY(2px) scaleY(0.97);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,0.85)) brightness(0.92);
}

/* подсветка-подложка под бойцом убрана по просьбе */

/* анимации атак — те же что раньше */
.fighter.attack-light  { animation: punch-light 0.22s ease; }
.fighter.attack-medium { animation: punch-medium 0.32s ease; }
.fighter.attack-heavy  { animation: punch-heavy 0.42s ease; }
.fighter-p2.attack-light  { animation: punch-light-r 0.22s ease; }
.fighter-p2.attack-medium { animation: punch-medium-r 0.32s ease; }
.fighter-p2.attack-heavy  { animation: punch-heavy-r 0.42s ease; }

@keyframes punch-light    { 0%, 100% { transform: translateX(0); }                      50% { transform: translateX(20px); } }
@keyframes punch-light-r  { 0%, 100% { transform: translateX(0); }                      50% { transform: translateX(-20px); } }
@keyframes punch-medium   { 0%, 100% { transform: translateX(0) rotate(0); }            50% { transform: translateX(35px) rotate(-6deg); } }
@keyframes punch-medium-r { 0%, 100% { transform: translateX(0) rotate(0); }            50% { transform: translateX(-35px) rotate(6deg); } }
@keyframes punch-heavy    { 0%, 100% { transform: translateX(0) translateY(0) rotate(0); }
                            25% { transform: translateX(-15px) rotate(6deg); }
                            60% { transform: translateX(50px) translateY(-12px) rotate(-10deg); } }
@keyframes punch-heavy-r  { 0%, 100% { transform: translateX(0) translateY(0) rotate(0); }
                            25% { transform: translateX(15px) rotate(-6deg); }
                            60% { transform: translateX(-50px) translateY(-12px) rotate(10deg); } }

/* прыжок — вертикальная дуга, длится столько же, сколько таймер _jump (500ms) */
.fighter.jumping { animation: jump-arc 0.5s ease; }
@keyframes jump-arc {
  0%   { transform: translateY(0); }
  45%  { transform: translateY(-95px); }
  55%  { transform: translateY(-95px); }
  100% { transform: translateY(0); }
}

/* удары/блоки */
.fighter.hit       { animation: get-hit 0.3s ease; }
.fighter-p2.hit    { animation: get-hit-r 0.3s ease; }
@keyframes get-hit {
  0%   { transform: translateX(0);    filter: brightness(1) drop-shadow(0 12px 18px rgba(0,0,0,0.85)); }
  20%  { transform: translateX(-30px); filter: brightness(2.5) drop-shadow(0 0 18px #ff4080); }
  60%  { transform: translateX(10px); filter: brightness(1.3); }
  100% { transform: translateX(0);    filter: brightness(1) drop-shadow(0 12px 18px rgba(0,0,0,0.85)); }
}
@keyframes get-hit-r {
  0%   { transform: translateX(0);    filter: brightness(1) drop-shadow(0 12px 18px rgba(0,0,0,0.85)); }
  20%  { transform: translateX(30px); filter: brightness(2.5) drop-shadow(0 0 18px #ff4080); }
  60%  { transform: translateX(-10px); filter: brightness(1.3); }
  100% { transform: translateX(0);    filter: brightness(1) drop-shadow(0 12px 18px rgba(0,0,0,0.85)); }
}

.fighter.blocked    { animation: blocked-hit 0.2s ease; }
.fighter-p2.blocked { animation: blocked-hit-r 0.2s ease; }
@keyframes blocked-hit {
  0%, 100% { transform: translateX(0); filter: brightness(1) drop-shadow(0 12px 18px rgba(0,0,0,0.85)); }
  50%      { transform: translateX(-12px); filter: brightness(1.5) drop-shadow(0 0 14px #5ad4ff); }
}
@keyframes blocked-hit-r {
  0%, 100% { transform: translateX(0); filter: brightness(1) drop-shadow(0 12px 18px rgba(0,0,0,0.85)); }
  50%      { transform: translateX(12px); filter: brightness(1.5) drop-shadow(0 0 14px #5ad4ff); }
}

/* ═══════════ ИНДИКАТОРЫ УРОНА ═══════════ */
.fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
}
.dmg-popup {
  position: absolute;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 30px;
  color: #fff;
  text-shadow: 0 0 12px #ff5080, 0 0 6px #000, 0 2px 4px #000;
  pointer-events: none;
  animation: dmg-rise 0.85s ease-out forwards;
  letter-spacing: 0.06em;
}
.dmg-popup.heavy {
  font-size: 42px;
  color: #fff0a0;
  text-shadow: 0 0 16px #ff8030, 0 0 8px #ff5040, 0 2px 4px #000;
}
.dmg-popup.blocked {
  color: #b0d8ff;
  text-shadow: 0 0 12px #5a8ed4, 0 2px 4px #000;
}
@keyframes dmg-rise {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-50px) scale(1.25); }
}

.floating-text {
  position: absolute;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 0 10px currentColor, 0 0 6px #000, 0 2px 4px #000;
  pointer-events: none;
  animation: float-up 1.1s ease-out forwards;
}
@keyframes float-up {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-40px); }
}

/* ═══════════ ROUND BANNER ═══════════ */
.round-banner {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  font-family: 'Metamorphous', 'Cinzel', serif;
  font-weight: 700;
  font-size: 72px;
  color: #fff0ff;
  text-shadow:
    0 0 30px rgba(255, 95, 168, 0.8),
    0 0 60px rgba(160, 96, 255, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.2em;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  white-space: nowrap;
}
.round-banner.show {
  animation: banner-show 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes banner-show {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  15%  { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  25%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
}

/* ═══════════ SCREEN SHAKE ═══════════ */
.arena-stage.shake-light  { animation: shake-light 0.25s ease; }
.arena-stage.shake-strong { animation: shake-strong 0.4s ease; }
@keyframes shake-light {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, 3px); }
  80% { transform: translate(2px, -1px); }
}
@keyframes shake-strong {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-8px, 4px); }
  20% { transform: translate(8px, -5px); }
  35% { transform: translate(-6px, 6px); }
  50% { transform: translate(7px, -3px); }
  70% { transform: translate(-4px, 4px); }
  85% { transform: translate(3px, -2px); }
}

/* ═══════════ COMBO HINTS — свернутая панель под HP ═══════════ */
.combo-hints {
  position: absolute;
  top: 132px;             /* под HUD с запасом */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  background: var(--battle-panel);
  border: 1px solid var(--battle-border);
  border-radius: 4px;
  box-shadow:
    0 4px 24px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 0 20px rgba(160, 100, 230, 0.18);
  z-index: 25;
  backdrop-filter: blur(8px);
  overflow: hidden;
  max-width: 90vw;
  transition: all 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* свёрнутое состояние — узкая полоса с иконкой */
.combo-hints.collapsed {
  height: 32px;
}
.combo-hints.collapsed .combo-list {
  display: none;
}
.combo-hints.collapsed .combo-toggle {
  padding: 6px 14px;
}

/* развёрнутое состояние */
.combo-hints:not(.collapsed) {
  height: auto;
}

.combo-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--battle-border);
  cursor: pointer;
  padding: 10px 14px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: #d8b8ff;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}
.combo-toggle:hover {
  background: rgba(160, 100, 230, 0.12);
  color: #fff;
}
.combo-toggle .arrow {
  display: inline-block;
  font-size: 9px;
  transition: transform 0.3s ease;
  color: rgba(220, 180, 255, 0.7);
}
.combo-hints.collapsed .combo-toggle .arrow {
  transform: rotate(-90deg);
}

.combo-tab-key {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 9px;
  background: rgba(160, 100, 230, 0.18);
  border: 1px solid rgba(200, 160, 255, 0.5);
  border-radius: 2px;
  color: #e8d4ff;
  letter-spacing: 0.1em;
}

/* список комбо */
.combo-list {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 4px;
  overflow-x: auto;
}
.combo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 14px;
  border-right: 1px solid rgba(190, 130, 230, 0.15);
  min-width: 110px;
}
.combo-item:last-child { border-right: none; }

.combo-item .combo-name {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--p1-neon);
  text-shadow: 0 0 6px var(--p1-neon-soft);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.combo-item .combo-keys {
  display: flex;
  gap: 4px;
  align-items: center;
}
.combo-item .combo-keys .ck {
  font-family: 'Metamorphous', 'Cinzel', serif;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  background: url('../img/keycap.png') center / 100% 100% no-repeat;
  color: #f0e0ff;
  text-shadow: 0 0 4px rgba(200,120,255,0.9), 0 1px 2px #000;
  min-width: 18px;
  text-align: center;
}
.combo-item .combo-keys .ck-arrow {
  color: rgba(220, 180, 255, 0.5);
  font-size: 11px;
}

/* ═══════════ БАЗОВЫЕ КОНТРОЛЫ — снизу ═══════════ */
.controls-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--battle-panel);
  border: 1px solid var(--battle-border);
  border-radius: 4px;
  padding: 8px 18px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #d8b8ff;
  text-transform: uppercase;
  z-index: 30;
  max-width: 92vw;
  justify-content: center;
  backdrop-filter: blur(6px);
  box-shadow:
    0 4px 18px rgba(0,0,0,0.6),
    0 0 16px rgba(160, 100, 230, 0.14);
}
.controls-hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: url('../img/keycap.png') center / 100% 100% no-repeat;
  margin-right: 5px;
  font-family: 'Metamorphous', 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  color: #f0e0ff;
  text-shadow: 0 0 4px rgba(200,120,255,0.9), 0 1px 2px #000;
  vertical-align: middle;
}

/* ═══════════ ВСПЛЫВАЮЩЕЕ УВЕДОМЛЕНИЕ О ДРОПЕ ═══════════ */
.loot-toast {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  background: linear-gradient(180deg, rgba(30, 18, 50, 0.97), rgba(15, 8, 25, 0.97));
  border: 2px solid var(--p1-neon);
  border-radius: 6px;
  padding: 24px 36px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  box-shadow:
    0 12px 40px rgba(0,0,0,0.85),
    0 0 50px var(--p1-neon-soft),
    inset 0 1px 0 rgba(255,255,255,0.12);
  font-family: 'Cinzel', serif;
  text-align: center;
  min-width: 280px;
}
.loot-toast.show {
  animation: loot-toast 4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes loot-toast {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  10%  { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  85%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
}
.loot-toast .loot-title {
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--p1-neon);
  text-shadow: 0 0 10px var(--p1-neon-soft);
  margin-bottom: 12px;
}
.loot-toast .loot-icon {
  font-size: 48px;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 12px var(--p1-neon-glow));
}
.loot-toast .loot-name {
  font-size: 18px;
  letter-spacing: 0.18em;
  color: #fff;
  margin-bottom: 4px;
}
.loot-toast .loot-rarity {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(220, 180, 255, 0.7);
}

/* ── Ability HUD (активные способности) ── */
.ability-hud {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 6, 18, 0.85);
  border: 1px solid rgba(200, 140, 255, 0.25);
  border-radius: 4px;
  padding: 6px 12px;
  z-index: 20;
  min-width: 130px;
  flex-direction: column;
}
.ab-key {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 13px;
  color: #f0e0ff;
  background: rgba(200, 140, 255, 0.15);
  border: 1px solid rgba(200, 140, 255, 0.4);
  border-radius: 3px;
  padding: 3px 7px;
  letter-spacing: 0.1em;
}
.ab-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.ab-name {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 700;
}
.ab-status {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  opacity: 0.8;
}
.ab-cd-bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.ab-cd-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s linear;
}

/* Hide story/chapter overlays if they leak into the battle screen */
#screen-battle:not(.hidden) ~ .req-overlay,
#screen-battle:not(.hidden) ~ #req-modal-overlay,
#screen-battle:not(.hidden) ~ #chap-map-overlay {
  display: none !important;
}

/* Hide chapter title text ("ECHOES IN THE DUST" etc.) during battle */
#screen-battle:not(.hidden) ~ .req-overlay .req-chapter-title,
#screen-battle:not(.hidden) ~ #req-modal-overlay .req-chapter-title {
  display: none !important;
}
