/* ============ ДЕБАФФЫ ============ */

/* Результат */
.debuffs-result {
  text-align: center;
  padding: 8px 0;
}

.debuffs-result-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

/* Подпись «Коэффициент» под заголовком результата */
.debuffs-result-note {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  opacity: 0.7;
  margin-bottom: 2px;
}

.debuffs-result-value {
  font-family: 'Cormorant', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

@media (min-width: 600px) {
  .debuffs-result-value { font-size: 40px; }
}

/* Yelmogus Crucible: заголовок с иконкой */
.crucible-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crucible-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Предупреждение под шансом */
.debuffs-warning {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  padding: 8px 4px 4px;
  line-height: 1.4;
}

/* Геммы: перерасход и пустой список */
.gem-count.is-error {
  border-color: #d46a5a;
  background: #2a1a1a;
  color: #ff8a7a;
}

.gems-empty {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  padding: 10px 0;
}

/* Шанс наложения с умения — поле ввода + итог */
.debuffs-skill { margin-top: 14px; }

.debuffs-skill-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.debuffs-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-slot);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
}

.debuffs-field-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.debuffs-input {
  height: 38px;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 18px;
  text-align: center;
  color: var(--gold);
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.debuffs-input:focus {
  border-color: var(--gold-dim);
  outline: none;
}

.debuffs-total {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
}

/* ============ СТАЗИС И СБРОС ============ */
.stasis-btn {
  position: absolute;
  top: 42px;
  right: 16px;
  z-index: 2;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  /* Цвет качества «Эпичное» (legendary) */
  background: #917faf;
  border: 2px solid #000;
  color: #000;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  animation: stasis-pulse 2s infinite;
}

.stasis-btn:hover {
  transform: scale(1.1);
}

@keyframes stasis-pulse {
  0% { box-shadow: 0 0 0 0 rgba(145, 127, 175, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(145, 127, 175, 0); }
  100% { box-shadow: 0 0 0 0 rgba(145, 127, 175, 0); }
}

.reset-row {
  display: flex;
  justify-content: center;
  padding: 8px 0 0;
}

/* ============ ПОПАП (СТАЗИС) ============ */

.calc-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.calc-popup-inner {
  background: var(--bg-panel, #151515);
  border: 1px solid var(--border, #444);
  border-radius: 12px;
  width: 100%;
  max-width: 450px;
  padding: 24px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  max-height: 90vh;
  overflow-y: auto;
}

.calc-popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
}

.calc-popup-close:hover {
  color: var(--gold);
}

.calc-popup-title {
  font-family: 'Cormorant', serif;
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 700;
}

.calc-popup-body {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.calc-popup-body strong {
  color: var(--gold-dim);
}

/* ============ УЗКИЕ ЭКРАНЫ ============ */

/* Чекбокс «Ниндзя» перекрывает заголовок результата — опускаем текст ниже */
@media (max-width: 379.98px) {
  .debuffs-result {
    padding-top: 44px;
  }
}

/* Пустые «Осколки» (мнемы) не должны схлопываться — держим квадрат */
@media (max-width: 399.98px) {
  .slot-mnem {
    aspect-ratio: 1 / 1;
  }
}

/* ============ ПЛАШКА ШТРАФА ДУАЛА ============ */
.slot {
  position: relative; /* Чтобы плашка позиционировалась относительно слота */
}

.slot-penalty-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 5px;
  font-size: 9px;
  font-weight: 700;
  color: #ff8a7a;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid #d46a5a;
  border-radius: 3px;
  z-index: 10; /* Чтобы быть поверх картинки */
  pointer-events: none; /* Чтобы не мешала кликать по слоту */
  text-shadow: 0 0 3px #000;
  font-family: 'Inter', sans-serif;
  line-height: 1.2;
}