.dungeon-active-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: radial-gradient(circle at center, #0a1118 0%, #05080c 100%);
  padding: 30px;
  gap: 20px;
  font-family: "Space Mono", monospace;
  color: #e0e6ed;
  box-sizing: border-box;
  overflow: hidden;
}

.dungeon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  padding-bottom: 15px;
  flex-shrink: 0;
}

.turn-progress-container {
  width: 200px;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.turn-label {
  font-size: 9px;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 2px;
  margin-bottom: 5px;
  text-align: center;
}

.turn-timer-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.turn-timer-fill {
  height: 100%;
}
.player-phase .turn-label {
  color: #00d2ff;
}
.player-phase .turn-timer-fill {
  background: #00d2ff;
  box-shadow: 0 0 10px #00d2ff;
}
.enemy-phase .turn-label {
  color: #ff4444;
}
.enemy-phase .turn-timer-fill {
  background: #ff4444;
  box-shadow: 0 0 10px #ff4444;
}

.battle-arena {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.mobs-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.enemy-card {
  width: 180px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s;
  position: relative;
}

.enemy-card.attacking {
  border-color: #ff4444;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.4);
  z-index: 10;
}

.enemy-action-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 0, 0, 0.2);
}

.inner-progress {
  height: 100%;
  background: #ff4444;
  width: 0%;
  animation: enemyCharge 2s linear forwards;
}

@keyframes enemyCharge {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

.enemy-card.targetable:hover {
  border-color: #00d2ff;
  background: rgba(0, 210, 255, 0.05);
  cursor: crosshair;
}

.enemy-hp-mini {
  width: 100%;
  height: 4px;
  background: #000;
  margin-bottom: 15px;
}

.enemy-hp-mini .fill {
  height: 100%;
  background: #ff4444;
  transition: width 0.3s;
}

.player-section {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  height: 150px;
  flex-shrink: 0;
}

.player-hp-main {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}

.player-hp-main.taking-damage {
  animation: playerShake 0.3s infinite;
  border-color: #ff4444;
}

@keyframes playerShake {
  0% {
    transform: translate(1px, 1px);
  }
  25% {
    transform: translate(-2px, -1px);
  }
  50% {
    transform: translate(-1px, 2px);
  }
  75% {
    transform: translate(2px, 1px);
  }
  100% {
    transform: translate(0, 0);
  }
}

.hp-bar-large {
  height: 20px;
  background: #000;
  margin-top: 10px;
}
.hp-bar-large .fill {
  height: 100%;
  background: linear-gradient(90deg, #ff416c, #ff4b2b);
  transition: width 0.4s ease-out;
}

.combat-log-wrapper {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 212, 255, 0.1);
  overflow: hidden;
}
.combat-log {
  padding: 15px;
  height: 100%;
  overflow-y: auto;
  font-size: 0.75rem;
}
.log-entry {
  margin-bottom: 5px;
  color: #a0acba;
}
.log-arrow {
  color: #00d2ff;
  margin-right: 5px;
}

.ctrl-btn {
  width: 100%;
  height: 60px;
  background: #00d4ff;
  border: none;
  font-family: "Orbitron", sans-serif;
  font-weight: 900;
  cursor: pointer;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
}

.enemy-card.defeated {
  filter: grayscale(1) brightness(0.4);
}

.enemy-card.targetable {
  cursor: pointer;
  pointer-events: all;
}

.hp-bar-large .fill,
.enemy-hp-mini .fill {
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Рамка для вибраного моба */
.enemy-card.selected {
  border-color: #00d2ff;
  box-shadow:
    0 0 15px rgba(0, 210, 255, 0.4),
    inset 0 0 10px rgba(0, 210, 255, 0.2);
  transform: translateY(-5px);
}

.enemy-card.selectable:hover:not(.defeated) {
  cursor: crosshair;
  border-color: rgba(0, 210, 255, 0.5);
}

/* Іконка прицілу */
.target-aim {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  color: rgba(0, 210, 255, 0.3);
  pointer-events: none;
  z-index: 10;
  animation: pulseAim 1.5s infinite;
}

@keyframes pulseAim {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
}

/* Контейнер для логу та кнопки */
.combat-interface-row {
  display: flex;
  gap: 15px;
  height: 120px;
  margin-top: 10px;
}

.combat-log-wrapper {
  flex: 1;
}

/* Стильна кнопка атаки */
.btn-execute-combat {
  width: 180px;
  background: rgba(255, 0, 60, 0.1);
  border: 1px solid #ff003c;
  color: #ff003c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-execute-combat:hover:not(.disabled) {
  background: #ff003c;
  color: #000;
  box-shadow: 0 0 20px rgba(255, 0, 60, 0.4);
}

.btn-execute-combat.disabled {
  opacity: 0.3;
  border-color: #444;
  color: #444;
  cursor: not-allowed;
  background: transparent;
}

.btn-glitch-content {
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.btn-sub-text {
  font-size: 0.6rem;
  margin-top: 4px;
  opacity: 0.8;
}

.mob-stats-display {
  display: flex;
  gap: 8px;
  font-size: 0.65rem;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.6);
}

.player-stats-row {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.8rem;
  color: #00d2ff;
  font-family: "Orbitron", sans-serif;
  border-top: 1px solid rgba(0, 210, 255, 0.2);
  padding-top: 5px;
}
