/* CHARACTER DEPLOYMENT AND TEAM SELECTION */

/* DEPLOYMENT INSTRUCTIONS */
.deployment-instruction {
  color: #00e2ff;
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.2em;
  font-weight: 500;
}

/* DEPLOYABLE CHARACTERS CONTAINER */
.deployment-characters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

/* DEPLOYABLE CHARACTER CARDS - RARITY BASED BORDERS */
.deployable-character {
  width: 125px;
  height: 175px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border: 3px solid;
  transition: all 0.2s ease;
  position: relative;
  /* Mobile touch optimization */
  touch-action: manipulation;
  min-height: 60px;
  box-sizing: border-box;
}

/* RARITY-BASED BORDER COLORS FOR DEPLOYABLE CHARACTERS */

/* TIER 1 - COMMON (Gray-White) - Monk, Archer */
.deployable-character.Monk,
.deployable-character.Archer {
  border-color: rgba(200, 200, 200, 0.6);
  box-shadow: 0 0 15px rgba(200, 200, 200, 0.3);
}

.deployable-character.Monk.selected,
.deployable-character.Archer.selected {
  border-color: rgba(200, 200, 200, 0.8);
  box-shadow: 0 0 25px rgba(200, 200, 200, 0.5);
}

/* TIER 2 - UNCOMMON (Green) - Wizard, Nerd */
.deployable-character.Wizard,
.deployable-character.Nerd {
  border-color: rgba(76, 175, 80, 0.6);
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

.deployable-character.Wizard.selected,
.deployable-character.Nerd.selected {
  border-color: rgba(76, 175, 80, 0.8);
  box-shadow: 0 0 25px rgba(76, 175, 80, 0.6);
}

/* TIER 3 - RARE (Blue) - Bandit, Mage, Sinreaper, Guardian */
.deployable-character.Bandit,
.deployable-character.Mage,
.deployable-character.Sinreaper,
.deployable-character.Guardian {
  border-color: rgba(33, 150, 243, 0.6);
  box-shadow: 0 0 15px rgba(33, 150, 243, 0.4);
}

.deployable-character.Bandit.selected,
.deployable-character.Mage.selected,
.deployable-character.Sinreaper.selected,
.deployable-character.Guardian.selected {
  border-color: rgba(33, 150, 243, 0.8);
  box-shadow: 0 0 25px rgba(33, 150, 243, 0.6);
}

/* TIER 4 - EPIC (Purple) - Samurai, Druid, Gambler */
.deployable-character.Samurai,
.deployable-character.Druid,
.deployable-character.Gambler {
  border-color: rgba(156, 39, 176, 0.6);
  box-shadow: 0 0 15px rgba(156, 39, 176, 0.4);
}

.deployable-character.Samurai.selected,
.deployable-character.Druid.selected,
.deployable-character.Gambler.selected {
  border-color: rgba(156, 39, 176, 0.8);
  box-shadow: 0 0 25px rgba(156, 39, 176, 0.6);
}

/* TIER 5 - MYTHIC (Crimson Red) - Joker, Barbarian, Musician */
.deployable-character.Joker,
.deployable-character.Barbarian,
.deployable-character.Musician {
  border-color: rgba(220, 20, 60, 0.7);
  box-shadow: 0 0 22px rgba(220, 20, 60, 0.5), 0 0 35px rgba(220, 20, 60, 0.3);
  animation: mythicCharacterPulse 2.8s ease-in-out infinite;
}

.deployable-character.Joker.selected,
.deployable-character.Barbarian.selected,
.deployable-character.Musician.selected {
  border-color: rgba(220, 20, 60, 0.9);
  box-shadow: 0 0 30px rgba(220, 20, 60, 0.7), 0 0 50px rgba(220, 20, 60, 0.5);
}

/* TIER 6 - LEGENDARY (Gold) - Priest */
.deployable-character.Priest {
  border-color: rgba(255, 152, 0, 0.8);
  box-shadow: 0 0 25px rgba(255, 152, 0, 0.6), 0 0 45px rgba(255, 193, 7, 0.4);
  animation: legendaryPulse 3s ease-in-out infinite;
}

.deployable-character.Priest.selected {
  border-color: rgba(255, 152, 0, 1);
  box-shadow: 0 0 35px rgba(255, 152, 0, 0.8), 0 0 55px rgba(255, 193, 7, 0.6);
}

/* CHARACTER-SPECIFIC THEMES */

/* MONK - Orange Theme (TIER 1 - COMMON) */
.deployable-character.Monk,
.deployable-character.Monk.selected,
.selected-slot.Monk {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(255, 140, 0, 0.15) 30%, 
    rgba(255, 140, 0, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Monk .deployable-character-type {
  color: #FF8C00;
  text-shadow: 0 0 8px rgba(255, 140, 0, 0.6);
}

.deployable-character.Monk .character-svg-small {
  filter: drop-shadow(0 0 8px #FF8C00);
}

/* ARCHER - Pink Theme (TIER 1 - COMMON) */
.deployable-character.Archer {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(255, 0, 170, 0.15) 30%, 
    rgba(255, 0, 170, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Archer .deployable-character-type {
  color: #ff00aa;
  text-shadow: 0 0 8px rgba(255, 0, 170, 0.6);
}

.deployable-character.Archer .character-svg-small {
  filter: drop-shadow(0 0 8px #ff00aa);
}

/* WIZARD - Teal/Cyan Theme (TIER 2 - UNCOMMON) */
.deployable-character.Wizard {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(0, 206, 209, 0.15) 30%, 
    rgba(0, 206, 209, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Wizard .deployable-character-type {
  color: #00CED1;
  text-shadow: 0 0 8px rgba(0, 206, 209, 0.6);
}

.deployable-character.Wizard .character-svg-small {
  filter: drop-shadow(0 0 8px #00CED1);
}

/* BANDIT - Green Theme (TIER 3 - RARE) */
.deployable-character.Bandit,
.deployable-character.Bandit.selected,
.selected-slot.Bandit {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(27, 94, 32, 0.15) 30%, 
    rgba(27, 94, 32, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Bandit .deployable-character-type {
  color: #4caf50;
  text-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.deployable-character.Bandit .character-svg-small {
  filter: drop-shadow(0 0 8px #1B5E20);
}

/* MAGE - Purple Theme (TIER 3 - RARE) */
.deployable-character.Mage,
.deployable-character.Mage.selected,
.selected-slot.Mage {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(124, 58, 237, 0.15) 30%, 
    rgba(124, 58, 237, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Mage .deployable-character-type {
  color: #7C3AED;
  text-shadow: 0 0 8px rgba(124, 58, 237, 0.6);
}

.deployable-character.Mage .character-svg-small {
  filter: drop-shadow(0 0 8px #7C3AED);
}

/* SINREAPER - Grey Theme (TIER 3 - RARE) */
.deployable-character.Sinreaper,
.deployable-character.Sinreaper.selected,
.selected-slot.Sinreaper {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(105, 105, 105, 0.15) 30%, 
    rgba(105, 105, 105, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Sinreaper .deployable-character-type {
  color: #C0C0C0;
  text-shadow: 0 0 8px rgba(128, 128, 128, 0.6);
}

.deployable-character.Sinreaper .character-svg-small {
  filter: drop-shadow(0 0 8px #696969);
}

/* GUARDIAN - Blue Theme (TIER 3 - RARE) */
.deployable-character.Guardian {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(30, 87, 153, 0.15) 30%, 
    rgba(30, 87, 153, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Guardian.selected {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(30, 87, 153, 0.25) 30%, 
    rgba(30, 87, 153, 0.35) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Guardian .deployable-character-type {
  color: #3498db;
  text-shadow: 0 0 8px rgba(30, 87, 153, 0.6);
}

.deployable-character.Guardian .character-svg-small {
  filter: drop-shadow(0 0 8px #1E5799);
}

/* MUSICIAN - Purple mythic theme performer */
.deployable-character.Musician {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.9) 0%,
    rgba(75, 0, 130, 0.3) 30%,
    rgba(139, 0, 139, 0.4) 70%,
    rgba(0, 0, 0, 0.9) 100%);
}

.deployable-character.Musician .deployable-character-type {
  color: #E8BFFF;
  text-shadow: 0 0 8px rgba(232, 191, 255, 0.8);
}

.deployable-character.Musician .character-svg-small {
  filter: drop-shadow(0 0 8px #8B008B);
}

.selected-slot.Musician {
  border-color: #9C27B0;
  box-shadow: 0 0 12px rgba(156, 39, 176, 0.6);
}

/* NERD - Yellow Theme (TIER 2 - UNCOMMON) */
.deployable-character.Nerd {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(255, 215, 0, 0.10) 30%, 
    rgba(255, 215, 0, 0.20) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Nerd.selected {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(255, 215, 0, 0.20) 30%, 
    rgba(255, 215, 0, 0.30) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Nerd .deployable-character-type {
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.deployable-character.Nerd .character-svg-small {
  filter: drop-shadow(0 0 8px #FFD700);
}

.selected-slot.Nerd {
  border-color: #FFD700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

/* PRIEST - Gold Theme (TIER 6 - LEGENDARY) */
.deployable-character.Priest {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(255, 215, 0, 0.15) 30%, 
    rgba(255, 215, 0, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Priest.selected {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(255, 215, 0, 0.25) 30%, 
    rgba(255, 215, 0, 0.35) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Priest .deployable-character-type {
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.deployable-character.Priest .character-svg-small {
  filter: drop-shadow(0 0 8px #FFD700);
}

/* WOLF - Grey Theme (SUMMONED UNIT) */
.deployable-character.Wolf,
.deployable-character.Wolf.selected,
.selected-slot.Wolf {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(105, 105, 105, 0.15) 30%, 
    rgba(105, 105, 105, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Wolf .deployable-character-type {
  color: #C0C0C0;
  text-shadow: 0 0 8px rgba(128, 128, 128, 0.6);
}

.deployable-character.Wolf .character-svg-small {
  filter: drop-shadow(0 0 8px #696969);
}

/* LOCKED CHARACTER STATE */
.deployable-character.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

/* SELECTED CHARACTER STATE */
.deployable-character.selected {
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(0, 226, 255, 0.6);
}

/* ACTIVE STATE FOR DEPLOYABLE CHARACTERS */
.deployable-character:active:not(.locked) {
  transform: scale(0.98);
}

/* DEPLOYABLE CHARACTER ELEMENTS */
.deployable-character-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  height: 35px;
  flex-shrink: 0;
}

.deployable-character-type {
  font-family: 'Audiowide', cursive;
  margin-bottom: 6px;
  font-size: 1.1em;
  font-weight: 600;
  text-align: center;
  flex-shrink: 0;
}

.deployable-character-value {
  font-family: 'Exo 2', sans-serif;
  font-size: 0.95em;
  margin-bottom: 8px;
  font-weight: 500;
  text-align: center;
  flex-shrink: 0;
}

/* SELECTED TEAM SECTION */
.selected-team {
  margin-bottom: 30px;
}

.selected-team h3 {
  color: #00e2ff;
  font-family: 'Audiowide', cursive;
  font-size: 1.5em;
  margin-bottom: 20px;
  text-shadow: 0 0 15px rgba(0, 226, 255, 0.6);
  text-align: center;
}

/* SELECTED CHARACTERS GRID */
.selected-characters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 15px;
  justify-content: center;
  max-width: 280px;
  margin-bottom: 25px;
  aspect-ratio: 1;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* SLOT POSITIONS */
#selected-slot-1 { grid-area: 1 / 1; } /* Top Left */
#selected-slot-2 { grid-area: 1 / 2; } /* Top Right */
#selected-slot-3 { grid-area: 2 / 1; } /* Bottom Left */
#selected-slot-4 { grid-area: 2 / 2; } /* Bottom Right */

/* SELECTED SLOT BASE STYLING */
.selected-slot {
  background: rgba(0, 0, 0, 0.3);
  border: 3px dashed rgba(0, 226, 255, 0.3);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  padding: 15px;
  text-align: center;
}

/* FILLED SLOT STYLING */
.selected-slot.filled {
  border-style: solid;
  border-color: rgba(0, 226, 255, 0.6);
  background: rgba(0, 226, 255, 0.1);
}

/* LOCKED SLOT CONTAINER */
.selected-slot.locked-slot-container {
  background: rgba(100, 100, 100, 0.2);
  border: 3px dashed rgba(100, 100, 100, 0.4);
  cursor: not-allowed;
  opacity: 0.6;
}

.selected-slot.locked-slot-container:active {
  transform: none;
}

/* LOCKED SLOT ICON */
.locked-slot {
  color: #999;
  font-size: 1.1em;
  opacity: 0.7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  line-height: 1.2;
  padding: 5px;
  word-wrap: break-word;
}

/* Responsive font sizing for locked slots */
@media (max-width: 600px) {
  .locked-slot {
    font-size: 0.95em;
    gap: 4px;
  }
}

@media (max-width: 400px) {
  .locked-slot {
    font-size: 0.85em;
    gap: 3px;
  }
}

/* LOCKED SLOT WITH NOT-ALLOWED CURSOR */
.selected-slot.locked-slot-container[style*="not-allowed"] {
  cursor: not-allowed;
}

.selected-slot.locked-slot-container[style*="not-allowed"]:active {
  transform: none;
  cursor: not-allowed;
}

/* CHARACTER-SPECIFIC SLOT STYLING */
.selected-slot.Monk {
  border-color: rgba(255, 140, 0, 0.6);
  background: rgba(255, 140, 0, 0.1);
  box-shadow: 0 0 12px rgba(255, 140, 0, 0.4);
}

.selected-slot.Archer {
  border-color: rgba(255, 0, 170, 0.6);
  background: rgba(255, 0, 170, 0.1);
  box-shadow: 0 0 12px rgba(255, 0, 170, 0.4);
}

/* UNCOMMON CHARACTERS (Green) */
.selected-slot.Wizard,
.selected-slot.Nerd {
  border-color: rgba(76, 175, 80, 0.6);
  background: rgba(76, 175, 80, 0.1);
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.4);
}

/* RARE CHARACTERS (Blue) */
.selected-slot.Bandit,
.selected-slot.Mage,
.selected-slot.Sinreaper,
.selected-slot.Guardian {
  border-color: rgba(33, 150, 243, 0.6);
  background: rgba(33, 150, 243, 0.1);
  box-shadow: 0 0 12px rgba(33, 150, 243, 0.4);
}

/* EPIC CHARACTERS (Purple) */
.selected-slot.Samurai,
.selected-slot.Druid,
.selected-slot.Gambler {
  border-color: rgba(156, 39, 176, 0.6);
  background: rgba(156, 39, 176, 0.1);
  box-shadow: 0 0 12px rgba(156, 39, 176, 0.4);
}

/* MYTHIC CHARACTERS (Crimson Red) */
.selected-slot.Joker,
.selected-slot.Barbarian {
  border-color: rgba(220, 20, 60, 0.6);
  background: rgba(220, 20, 60, 0.1);
  box-shadow: 0 0 12px rgba(220, 20, 60, 0.5);
}

/* LEGENDARY CHARACTERS (Orange-Gold) */
.selected-slot.Priest {
  border-color: rgba(255, 215, 0, 0.6);
  background: rgba(255, 215, 0, 0.1);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

/* SUMMONED UNITS */
.selected-slot.Wolf {
  border-color: rgba(105, 105, 105, 0.6);
  background: rgba(105, 105, 105, 0.1);
  box-shadow: 0 0 12px rgba(105, 105, 105, 0.4);
}

/* EMPTY SLOT STYLING */
.empty-slot {
  color: rgba(0, 226, 255, 0.5);
  font-size: 2em;
  font-weight: 300;
  text-align: center;
}

/* SELECTED CHARACTER INFO */
.selected-character-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.selected-character-icon {
  font-size: 2.5em;
  margin-bottom: 5px;
}

.selected-character-type {
  font-size: 0.9em;
  font-weight: 600;
  color: #e5edff;
  font-family: 'Exo 2', sans-serif;
}

/* START BATTLE BUTTON */
.start-battle-btn {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(0, 226, 255, 0.1) 30%, 
    rgba(0, 226, 255, 0.15) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
  color: #00e2ff;
  border: 2px solid rgba(0, 226, 255, 0.5);
  border-radius: 20px;
  padding: 20px 35px;
  font-size: 1.4em;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Audiowide', cursive;
  text-shadow: 0 0 10px rgba(0, 226, 255, 0.8);
  box-shadow: 0 0 20px rgba(0, 226, 255, 0.2), inset 0 0 10px rgba(0, 226, 255, 0.05);
  transition: all 0.2s ease;
  margin-top: 25px;
  /* Mobile touch optimization */
  min-height: 65px;
  touch-action: manipulation;
  text-align: center;
  /* Ensure text is centered */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.start-battle-btn:active:not(:disabled) {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(0, 226, 255, 0.2) 30%, 
    rgba(0, 226, 255, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
  transform: scale(0.97);
  box-shadow: 0 0 25px rgba(0, 226, 255, 0.4);
}

.start-battle-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: linear-gradient(to bottom, rgba(100, 100, 100, 0.3), rgba(80, 80, 80, 0.3));
  color: #888;
  border-color: rgba(100, 100, 100, 0.4);
  box-shadow: none;
}

/* ADVANCED DEPLOYMENT FEATURES */

/* CHARACTER SELECTION STATES */
.deployable-character.character-selected {
  border-color: #00e2ff !important;
  box-shadow: 0 0 25px rgba(0, 226, 255, 0.8), 
              0 0 40px rgba(0, 226, 255, 0.4) !important;
  transform: translateY(-5px) scale(1.05);
  background: linear-gradient(135deg, 
    rgba(0, 226, 255, 0.2) 0%, 
    rgba(0, 226, 255, 0.1) 30%, 
    rgba(0, 226, 255, 0.15) 70%, 
    rgba(0, 226, 255, 0.2) 100%) !important;
  animation: characterSelectedPulse 2s ease-in-out infinite;
}

@keyframes characterSelectedPulse {
  0%, 100% {
    box-shadow: 0 0 25px rgba(0, 226, 255, 0.8), 
                0 0 40px rgba(0, 226, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 35px rgba(0, 226, 255, 1), 
                0 0 50px rgba(0, 226, 255, 0.6);
  }
}

/* SLOT SELECTION STATES */
.selected-slot.slot-available {
  border-color: #00e2ff !important;
  border-style: dashed;
  border-width: 3px;
  background: linear-gradient(135deg, 
    rgba(0, 226, 255, 0.1) 0%, 
    rgba(0, 226, 255, 0.05) 50%, 
    rgba(0, 226, 255, 0.1) 100%);
  box-shadow: 0 0 20px rgba(0, 226, 255, 0.4);
  cursor: pointer;
  animation: slotAvailablePulse 1.5s ease-in-out infinite;
}

@keyframes slotAvailablePulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 226, 255, 0.4);
    border-color: rgba(0, 226, 255, 0.6);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 226, 255, 0.7);
    border-color: rgba(0, 226, 255, 0.9);
  }
}

.selected-slot.slot-invalid {
  border-color: #ff4757 !important;
  border-style: dashed;
  border-width: 3px;
  background: linear-gradient(135deg, 
    rgba(255, 71, 87, 0.15) 0%, 
    rgba(255, 71, 87, 0.08) 50%, 
    rgba(255, 71, 87, 0.15) 100%);
  box-shadow: 0 0 20px rgba(255, 71, 87, 0.4);
  cursor: not-allowed;
  animation: slotInvalidShake 0.5s ease-in-out;
}

@keyframes slotInvalidShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* DUPLICATE CHARACTER WARNING */
.character-duplicate-warning {
  position: absolute;
  top: -10px;
  right: -10px;
  background: linear-gradient(135deg, #ff4757, #ff3742);
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  z-index: 10;
  animation: warningPulse 1s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(255, 71, 87, 0.6);
  border: 2px solid #fff;
}

@keyframes warningPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.6);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(255, 71, 87, 0.9);
  }
}

/* SLOT PLACEMENT SUCCESS */
.selected-slot.slot-placement-success {
  border-color: #2ed573 !important;
  background: linear-gradient(135deg, 
    rgba(46, 213, 115, 0.2) 0%, 
    rgba(46, 213, 115, 0.1) 50%, 
    rgba(46, 213, 115, 0.2) 100%);
  box-shadow: 0 0 25px rgba(46, 213, 115, 0.6);
  animation: slotSuccessPulse 0.6s ease-out;
}

@keyframes slotSuccessPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 25px rgba(46, 213, 115, 0.6);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(46, 213, 115, 0.9);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 25px rgba(46, 213, 115, 0.6);
  }
}

/* ENHANCED INSTRUCTION STYLING */
.deployment-instruction.selection-mode {
  color: #00e2ff;
  text-shadow: 0 0 15px rgba(0, 226, 255, 0.8);
  animation: instructionGlow 2s ease-in-out infinite;
  font-size: 1.1em;
  background: linear-gradient(135deg, rgba(0, 226, 255, 0.1), rgba(76, 175, 80, 0.1));
  padding: 12px 20px;
  border-radius: 15px;
  border: 2px solid rgba(0, 226, 255, 0.3);
  margin-bottom: 20px;
  animation: enhancedInstructionGlow 3s ease-in-out infinite;
}

@keyframes instructionGlow {
  0%, 100% {
    text-shadow: 0 0 15px rgba(0, 226, 255, 0.8);
  }
  50% {
    text-shadow: 0 0 25px rgba(0, 226, 255, 1);
  }
}

@keyframes enhancedInstructionGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(0, 226, 255, 0.3);
    border-color: rgba(0, 226, 255, 0.3);
  }
  33% {
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
    border-color: rgba(76, 175, 80, 0.4);
  }
  66% {
    box-shadow: 0 0 18px rgba(0, 226, 255, 0.35);
    border-color: rgba(0, 226, 255, 0.35);
  }
}

/* AUTO-ASSIGNMENT ANIMATIONS */
.deployable-character.character-auto-assigned {
  animation: characterAutoAssignedSuccess 0.6s ease-out;
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(76, 175, 80, 0.8), 0 0 35px rgba(76, 175, 80, 0.4);
}

@keyframes characterAutoAssignedSuccess {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.9), 0 0 40px rgba(76, 175, 80, 0.5);
  }
  100% {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.8), 0 0 35px rgba(76, 175, 80, 0.4);
  }
}

.deployable-character.character-duplicate-error {
  animation: characterDuplicateError 1s ease-out;
  border-color: #ff4757;
}

@keyframes characterDuplicateError {
  0%, 100% {
    transform: translateX(0);
    border-color: inherit;
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-3px);
    border-color: #ff4757;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.6);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(3px);
    border-color: #ff4757;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.6);
  }
}

.selected-slot.slot-auto-assignment-success {
  animation: slotAutoAssignmentSuccess 0.8s ease-out;
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(76, 175, 80, 0.9), 0 0 45px rgba(76, 175, 80, 0.5);
  border-color: #4CAF50;
}

@keyframes slotAutoAssignmentSuccess {
  0% {
    transform: scale(1);
    box-shadow: inherit;
    border-color: inherit;
  }
  25% {
    transform: scale(1.15);
    box-shadow: 0 0 35px rgba(76, 175, 80, 1), 0 0 50px rgba(76, 175, 80, 0.6);
    border-color: #4CAF50;
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(76, 175, 80, 0.95), 0 0 55px rgba(76, 175, 80, 0.55);
    border-color: #4CAF50;
  }
  100% {
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.9), 0 0 45px rgba(76, 175, 80, 0.5);
    border-color: #4CAF50;
  }
}

/* ENHANCED INTERACTION CONTROLS */
.deployable-character .character-svg-small,
.deployable-character-icon .character-svg-small,
.deployable-character object {
  pointer-events: none !important;
}

.deployable-character {
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.deployable-character:not(.locked) {
  cursor: pointer;
}

.deployable-character:not(.locked):active {
  transform: scale(0.98);
}

.deployment-characters,
.deployable-character,
.deployable-character * {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
}

@keyframes mythicCharacterPulse {
  0%, 100% {
    box-shadow: 0 0 22px rgba(220, 20, 60, 0.5), 0 0 35px rgba(220, 20, 60, 0.3);
  }
  50% {
    box-shadow: 0 0 28px rgba(220, 20, 60, 0.7), 0 0 45px rgba(220, 20, 60, 0.5);
  }
}

@keyframes legendaryPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 152, 0, 0.7);
  }
}

/* CHARACTER-SPECIFIC THEME STYLING */

/* SAMURAI - Crimson/Red Theme (TIER 4 - EPIC) */
.deployable-character.Samurai,
.deployable-character.Samurai.selected,
.selected-slot.Samurai {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(220, 20, 60, 0.15) 30%, 
    rgba(220, 20, 60, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Samurai .deployable-character-type {
  color: #dc143c;
  text-shadow: 0 0 8px rgba(220, 20, 60, 0.6);
}

.deployable-character.Samurai .character-svg-small {
  filter: drop-shadow(0 0 8px #dc143c);
}

/* DRUID - Green Theme (TIER 4 - EPIC) */
.deployable-character.Druid,
.deployable-character.Druid.selected,
.selected-slot.Druid {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(34, 139, 34, 0.15) 30%, 
    rgba(34, 139, 34, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Druid .deployable-character-type {
  color: #32CD32;
  text-shadow: 0 0 8px rgba(34, 139, 34, 0.6);
}

.deployable-character.Druid .character-svg-small {
  filter: drop-shadow(0 0 8px #228B22);
}

/* GAMBLER - Red Casino Theme (TIER 4 - EPIC) */
.deployable-character.Gambler,
.deployable-character.Gambler.selected,
.selected-slot.Gambler {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.9) 0%,
    rgba(220, 20, 60, 0.2) 30%,
    rgba(139, 0, 0, 0.3) 70%,
    rgba(0, 0, 0, 0.9) 100%);
}

.deployable-character.Gambler .deployable-character-type {
  color: #DC143C;
  text-shadow: 0 0 8px rgba(220, 20, 60, 0.8);
}

.deployable-character.Gambler .character-svg-small {
  filter: drop-shadow(0 0 8px #DC143C);
}

/* JOKER - Green Theme (TIER 5 - MYTHIC) */
.deployable-character.Joker,
.deployable-character.Joker.selected,
.selected-slot.Joker {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(50, 205, 50, 0.15) 30%, 
    rgba(50, 205, 50, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Joker .deployable-character-type {
  color: #32CD32;
  text-shadow: 0 0 8px rgba(50, 205, 50, 0.6);
}

.deployable-character.Joker .character-svg-small {
  filter: drop-shadow(0 0 8px #32CD32);
}

/* BARBARIAN - Red Theme (TIER 5 - MYTHIC) */
.deployable-character.Barbarian,
.deployable-character.Barbarian.selected,
.selected-slot.Barbarian {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(139, 0, 0, 0.15) 30%, 
    rgba(139, 0, 0, 0.25) 70%, 
    rgba(0, 0, 0, 0.7) 100%);
}

.deployable-character.Barbarian .deployable-character-type {
  color: #ff6b6b;
  text-shadow: 0 0 8px rgba(139, 0, 0, 0.6);
}

.deployable-character.Barbarian .character-svg-small {
  filter: drop-shadow(0 0 8px #8B0000);
} 