/* Druid 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(34, 139, 34, 0.3);
  box-shadow: 
    0 0 20px rgba(34, 139, 34, 0.2),
    inset 0 0 15px rgba(0, 0, 0, 0.4);
}

.ability-preview-title {
  text-align: center;
  color: #32CD32;
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(50, 205, 50, 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: #90EE90;
  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, #0f1a0f 30%, #1a2e1a 100%);
  padding: 8px;
  border-radius: 8px;
  border: 2px solid rgba(34, 139, 34, 0.4);
  box-shadow: 
    0 0 15px rgba(34, 139, 34, 0.3),
    0 0 10px rgba(0, 0, 0, 0.6);
}

.preview-cell {
  width: 32px;
  height: 32px;
  background: linear-gradient(145deg, #1e2e1e 70%, #255525 100%);
  border: 1px solid rgba(58, 134, 58, 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(34, 139, 34, 0.2),
    0 0 2px rgba(0, 0, 0, 0.4);
}

/* Druid token styling in preview */
.preview-cell.has-druid {
  position: relative;
}

.preview-token.druid {
  background: radial-gradient(circle at 30% 30%, #32CD32 10%, #228B22 60%);
  color: #FFFFFF;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  box-shadow: 
    0 0 8px #228B22,
    0 0 16px #228B2288;
  border: 1.5px solid #0F4F0F;
  font-weight: 900;
  text-shadow: 0 0 8px #228B22, 0 0 4px #fff;
  position: absolute;
  z-index: 15;
}

/* Nature summoning indicator */
.preview-token.druid.summoning {
  box-shadow: 
    0 0 12px #32CD32,
    0 0 24px #32CD3288,
    0 0 36px #90EE9044;
  animation: summoningPulse 2s ease-in-out infinite;
}

@keyframes summoningPulse {
  0%, 100% {
    box-shadow: 
      0 0 12px #32CD32,
      0 0 24px #32CD3288,
      0 0 36px #90EE9044;
    transform: scale(1);
  }
  50% {
    box-shadow: 
      0 0 16px #32CD32,
      0 0 32px #32CD32,
      0 0 48px #90EE9066;
    transform: scale(1.05);
  }
}

/* SVG decoration for druid in preview */
.preview-token.druid::before {
  content: '';
  position: absolute;
  width: 36px;
  height: 36px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-image: url('../../svg/druid-decoration.svg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: -1;
}

/* Wolf tokens in preview */
.preview-wolf {
  background: radial-gradient(circle at 30% 30%, #8B8B8B 10%, #696969 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 #2F2F2F;
  box-shadow: 
    0 0 8px rgba(105, 105, 105, 0.6),
    0 0 12px rgba(105, 105, 105, 0.3);
  font-weight: 700;
  text-shadow: 0 0 8px #696969, 0 0 4px #fff;
  position: absolute;
  z-index: 10;
}

/* Wolf summoning positions */
.preview-cell.summon-position {
  background: linear-gradient(145deg, #2e4e2e 70%, #3a5a3a 100%);
  border: 2px dashed #32CD32;
  box-shadow:
    0 0 15px rgba(50, 205, 50, 0.7),
    0 0 25px rgba(50, 205, 50, 0.4),
    inset 0 0 8px rgba(50, 205, 50, 0.3);
  animation: summonPositionPulse 1.5s ease-in-out infinite;
}

@keyframes summonPositionPulse {
  0%, 100% {
    box-shadow:
      0 0 15px rgba(50, 205, 50, 0.7),
      0 0 25px rgba(50, 205, 50, 0.4),
      inset 0 0 8px rgba(50, 205, 50, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 20px rgba(50, 205, 50, 0.9),
      0 0 35px rgba(50, 205, 50, 0.6),
      inset 0 0 12px rgba(50, 205, 50, 0.5);
    transform: scale(1.05);
  }
}

/* Wolf preview indicator */
.wolf-preview-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2em;
  color: #90EE90;
  text-shadow: 0 0 8px #228B22, 0 0 4px #fff;
  z-index: 12;
  animation: wolfPreviewFloat 2s ease-in-out infinite;
}

@keyframes wolfPreviewFloat {
  0%, 100% { 
    opacity: 0.7; 
    transform: translate(-50%, -50%) scale(1);
  }
  50% { 
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* Wolf value preview */
.wolf-value-preview {
  position: absolute;
  top: -8px;
  right: -8px;
  background: rgba(34, 139, 34, 0.9);
  color: #fff;
  border-radius: 8px;
  padding: 2px 4px;
  font-size: 0.6em;
  font-weight: 900;
  text-shadow: 0 0 4px #000;
  border: 1px solid #32CD32;
  z-index: 15;
  animation: wolfValueFloat 2s ease-in-out infinite;
}

@keyframes wolfValueFloat {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-2px); opacity: 1; }
}

/* Enemy tokens in preview */
.preview-enemy {
  background: radial-gradient(circle at 30% 30%, #ff86a3 10%, #DC143C 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 #3a1c29;
  box-shadow: 
    0 0 8px rgba(255, 62, 107, 0.6),
    0 0 12px rgba(255, 62, 107, 0.3);
  font-weight: 700;
  text-shadow: 0 0 8px #ff3e6b, 0 0 4px #fff;
  position: absolute;
  z-index: 10;
}

/* Nature power effect */
.nature-power-effect {
  position: absolute;
  top: 20%;
  left: 20%;
  transform: translate(-50%, -50%);
  font-size: 1.2em;
  color: #32CD32;
  text-shadow: 0 0 8px #228B22, 0 0 4px #fff;
  z-index: 8;
  animation: naturePowerPulse 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes naturePowerPulse {
  0%, 100% { 
    opacity: 0.6; 
    transform: translate(-50%, -50%) scale(1);
  }
  50% { 
    opacity: 0.9; 
    transform: translate(-50%, -50%) 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 #228B22,
      0 0 16px #228B2288;
  }
  50% {
    box-shadow: 
      0 0 12px #228B22,
      0 0 24px #32CD32,
      0 0 32px #FFD700;
    transform: scale(1.1);
  }
}

/* Arrow indicator */
.ability-arrow {
  color: #32CD32;
  font-size: 1.5em;
  text-align: center;
  text-shadow: 0 0 10px rgba(50, 205, 50, 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-wolf, .preview-enemy {
    width: 20px;
    height: 20px;
    font-size: 0.6em;
  }
  
  .wolf-value-preview {
    font-size: 0.55em;
    padding: 1px 2px;
    top: -6px;
  }
  
  .wolf-preview-indicator, .nature-power-effect {
    font-size: 1.2em;
  }
  
  .preview-board {
    padding: 6px;
    gap: 1.5px;
  }
}

@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-wolf, .preview-enemy {
    width: 18px;
    height: 18px;
    font-size: 0.55em;
  }
  
  .wolf-value-preview {
    font-size: 0.5em;
    padding: 1px 2px;
    top: -5px;
  }
  
  .wolf-preview-indicator, .nature-power-effect {
    font-size: 1em;
  }
  
  .preview-board {
    padding: 5px;
    gap: 1px;
  }
  
  .ability-preview-container {
    padding: 12px;
  }
}

/* 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); }
  }
} 