/* Wizard Preview CSS - Mobile-first design */

.ability-preview-container {
  margin: 20px 0;
  padding: 15px;
  background: linear-gradient(135deg, #1a1f3a 0%, #0d1225 100%);
  border-radius: 12px;
  border: 2px solid rgba(0, 226, 255, 0.3);
  box-shadow: 
    0 0 20px rgba(0, 226, 255, 0.2),
    inset 0 0 15px rgba(0, 0, 0, 0.4);
}

.ability-preview-title {
  text-align: center;
  color: #00e2ff;
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 226, 255, 0.5);
}

.ability-preview-boards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.preview-board-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.preview-board-label {
  color: #73f5ff;
  font-size: 0.8em;
  font-weight: 500;
  text-align: center;
}

.preview-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 2px;
  background: linear-gradient(135deg, #151a32 30%, #1b2d56 100%);
  padding: 8px;
  border-radius: 8px;
  border: 2px solid rgba(0, 226, 255, 0.4);
  box-shadow: 
    0 0 15px rgba(0, 226, 255, 0.3),
    0 0 10px rgba(0, 0, 0, 0.6);
}

.preview-cell {
  width: 32px;
  height: 32px;
  background: linear-gradient(145deg, #1e2744 70%, #253555 100%);
  border: 1px solid rgba(58, 68, 134, 0.4);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0.8em;
  font-weight: 700;
  font-family: 'Audiowide', 'Orbitron', sans-serif;
  color: #fff;
  box-shadow: 
    0 0 3px rgba(0, 226, 255, 0.2),
    0 0 2px rgba(0, 0, 0, 0.4);
}

/* Wizard token styling in preview */
.preview-cell.has-wizard {
  position: relative;
}

.preview-token.wizard {
  background: radial-gradient(circle at 30% 30%, #73f5ff 10%, #00e2ff 60%);
  color: #000000;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  box-shadow: 
    0 0 8px #00e2ff,
    0 0 16px #00e2ff88;
  border: 1.5px solid #00b3cc;
  font-weight: 900;
  text-shadow: 0 0 8px #00e2ff, 0 0 4px #fff;
  position: absolute;
  z-index: 10;
}

/* SVG decoration for wizard in preview */
.preview-token.wizard::before {
  content: '';
  position: absolute;
  width: 36px;
  height: 36px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-image: url('../../svg/wizard-decoration.svg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: -1;
}

/* Ally tokens in preview */
.preview-ally {
  background: radial-gradient(circle at 30% 30%, #87CEEB 10%, #4682B4 60%);
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7em;
  border: 1.5px solid #2F4F4F;
  box-shadow: 
    0 0 8px rgba(70, 130, 180, 0.6),
    0 0 12px rgba(70, 130, 180, 0.3);
  font-weight: 700;
  text-shadow: 0 0 8px #4682B4, 0 0 4px #fff;
  position: absolute;
  z-index: 10;
}

/* Selected ally highlighting */
.preview-ally.selected-ally {
  border-color: #FFD700;
  box-shadow: 
    0 0 12px rgba(255, 215, 0, 0.8),
    0 0 20px rgba(255, 215, 0, 0.4);
  animation: selectedAllyPulse 1.2s ease-in-out infinite;
}

@keyframes selectedAllyPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 
      0 0 12px rgba(255, 215, 0, 0.8),
      0 0 20px rgba(255, 215, 0, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 
      0 0 16px rgba(255, 215, 0, 1),
      0 0 28px rgba(255, 215, 0, 0.6);
  }
}

/* IDENTICAL IN-GAME POSSIBLE MOVE HIGHLIGHTING FOR WIZARD TELEPORT */
.preview-cell.possible-move.wizard-teleport {
  box-shadow:
    0 0 15px rgba(0, 226, 255, 0.9),
    0 0 25px rgba(0, 226, 255, 0.6),
    inset 0 0 8px rgba(0, 226, 255, 0.3);
  border: 2px dashed #00e2ff;
  background: linear-gradient(145deg, #1e3a48 50%, #253555 100%);
  transform: scale(1.1);
  animation: pulsePossibleMove 1.5s infinite ease-in-out;
  position: relative;
}

/* Enhanced wizard teleport indicator */
.preview-cell.possible-move.wizard-teleport::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 1px solid rgba(0, 226, 255, 0.4);
  border-radius: 8px;
  animation: expandIndicator 1.5s infinite ease-in-out;
}

/* Ally selection highlighting - different from teleport destinations */
.preview-cell.possible-move.wizard-ally {
  box-shadow:
    0 0 15px rgba(70, 130, 180, 0.9),
    0 0 25px rgba(70, 130, 180, 0.6),
    inset 0 0 8px rgba(70, 130, 180, 0.3);
  border: 2px dashed #4682B4;
  background: linear-gradient(145deg, #1e3a48 50%, #253555 100%);
  transform: scale(1.1);
  animation: pulsePossibleMove 1.5s infinite ease-in-out;
  position: relative;
}

.preview-cell.possible-move.wizard-ally::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 1px solid rgba(70, 130, 180, 0.4);
  border-radius: 8px;
  animation: expandIndicator 1.5s infinite ease-in-out;
}

@keyframes expandIndicator {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

@keyframes pulsePossibleMove {
  0%, 100% { 
    box-shadow:
      0 0 15px rgba(0, 226, 255, 0.8),
      0 0 25px rgba(0, 226, 255, 0.5);
    transform: scale(1.08);
  }
  50% { 
    box-shadow:
      0 0 20px rgba(0, 226, 255, 0.9),
      0 0 35px rgba(0, 226, 255, 0.6);
    transform: scale(1.1);
  }
}

/* Highlight changed values */
.preview-token.value-changed {
  animation: valueGlow 1s ease-in-out infinite;
}

@keyframes valueGlow {
  0%, 100% {
    box-shadow: 
      0 0 8px #00e2ff,
      0 0 16px #00e2ff88;
  }
  50% {
    box-shadow: 
      0 0 12px #00e2ff,
      0 0 24px #73f5ff,
      0 0 32px #FFD700;
    transform: scale(1.1);
  }
}

/* Arrow indicator */
.ability-arrow {
  color: #00e2ff;
  font-size: 1.5em;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 226, 255, 0.8);
  animation: arrowPulse 1.5s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%, 100% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(3px); }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .preview-cell {
    width: 28px;
    height: 28px;
    font-size: 0.7em;
  }
  
  .preview-token {
    width: 22px;
    height: 22px;
    font-size: 0.65em;
  }
  
  .preview-ally {
    width: 20px;
    height: 20px;
    font-size: 0.6em;
  }
  
  .preview-board {
    padding: 6px;
    gap: 1.5px;
  }
  
  .preview-cell.possible-move.wizard-teleport,
  .preview-cell.possible-move.wizard-ally {
    transform: scale(1.06);
  }
  
  .preview-cell.possible-move.wizard-teleport::after,
  .preview-cell.possible-move.wizard-ally::after {
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
  }
}

@media (max-width: 360px) {
  .preview-cell {
    width: 24px;
    height: 24px;
    font-size: 0.65em;
  }
  
  .preview-token {
    width: 20px;
    height: 20px;
    font-size: 0.6em;
  }
  
  .preview-ally {
    width: 18px;
    height: 18px;
    font-size: 0.55em;
  }
  
  .preview-board {
    padding: 5px;
    gap: 1px;
  }
  
  .ability-preview-container {
    padding: 12px;
  }
  
  .preview-cell.possible-move.wizard-teleport,
  .preview-cell.possible-move.wizard-ally {
    transform: scale(1.04);
  }
  
  .preview-cell.possible-move.wizard-teleport::after,
  .preview-cell.possible-move.wizard-ally::after {
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
  }
}

/* Landscape orientation optimization */
@media (orientation: landscape) and (max-height: 600px) {
  .ability-preview-boards {
    flex-direction: row;
    gap: 20px;
  }
  
  .ability-arrow {
    transform: rotate(-90deg);
    margin: 0 10px;
  }
  
  @keyframes arrowPulse {
    0%, 100% { opacity: 0.6; transform: rotate(-90deg) translateX(0); }
    50% { opacity: 1; transform: rotate(-90deg) translateX(3px); }
  }
} 