/* Joker 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;
  width: 100%;
}

.preview-board-label {
  color: #a6f9ff;
  font-size: 0.8em;
  font-weight: 500;
  text-align: center;
  opacity: 0.9;
}

.ability-arrow {
  color: #32CD32;
  font-size: 1.5em;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(50, 205, 50, 0.6);
  animation: bounceArrow 2s ease-in-out infinite;
}

@keyframes bounceArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* PREVIEW BOARD */
.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(50, 205, 50, 0.4);
  box-shadow: 
    0 0 15px rgba(50, 205, 50, 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(50, 205, 50, 0.2),
    0 0 2px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

/* Character token styling */
.preview-token.joker {
  background: radial-gradient(circle at 30% 30%, #90EE90 10%, #32CD32 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 #32CD32,
    0 0 16px #32CD3288;
  border: 1.5px solid #228B22;
  font-weight: 900;
  text-shadow: 0 0 8px #32CD32, 0 0 4px #000;
  position: absolute;
  z-index: 10;
}

/* SVG decoration for joker in preview */
.preview-token.joker::before {
  content: '';
  position: absolute;
  width: 36px;
  height: 36px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-image: url('../../svg/joker-decoration.svg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: -1;
}

/* Enemy tokens */
.preview-enemy {
  background: radial-gradient(circle at 30% 30%, #ff6b6b 10%, #dc2626 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 #991b1b;
  box-shadow: 
    0 0 8px rgba(220, 38, 38, 0.6),
    0 0 12px rgba(220, 38, 38, 0.3);
  font-weight: 700;
  text-shadow: 0 0 8px #dc2626, 0 0 4px #fff;
  position: absolute;
  z-index: 10;
}

/* CHESS MOVEMENT PATTERNS */

/* Knight movement (L-shaped) */
.preview-cell.possible-move.joker-knight {
  box-shadow:
    0 0 15px rgba(50, 205, 50, 0.9),
    0 0 25px rgba(50, 205, 50, 0.6),
    inset 0 0 8px rgba(50, 205, 50, 0.3);
  border: 2px dashed #32CD32;
  background: linear-gradient(145deg, rgba(50, 205, 50, 0.2) 50%, rgba(144, 238, 144, 0.1) 100%);
  transform: scale(1.1);
  animation: knightPulse 1.5s infinite ease-in-out;
  position: relative;
}

.preview-cell.possible-move.joker-knight::before {
  content: '♞';
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 10px;
  color: #32CD32;
  text-shadow: 0 0 4px rgba(50, 205, 50, 0.8);
  z-index: 1;
}

/* Rook movement (straight lines) */
.preview-cell.possible-move.joker-rook {
  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, rgba(70, 130, 180, 0.2) 50%, rgba(135, 206, 235, 0.1) 100%);
  transform: scale(1.1);
  animation: rookPulse 1.5s infinite ease-in-out;
  position: relative;
}

.preview-cell.possible-move.joker-rook::before {
  content: '♜';
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 10px;
  color: #4682B4;
  text-shadow: 0 0 4px rgba(70, 130, 180, 0.8);
  z-index: 1;
}

/* Bishop movement (diagonal lines) */
.preview-cell.possible-move.joker-bishop {
  box-shadow:
    0 0 15px rgba(138, 43, 226, 0.9),
    0 0 25px rgba(138, 43, 226, 0.6),
    inset 0 0 8px rgba(138, 43, 226, 0.3);
  border: 2px dashed #8A2BE2;
  background: linear-gradient(145deg, rgba(138, 43, 226, 0.2) 50%, rgba(221, 160, 221, 0.1) 100%);
  transform: scale(1.1);
  animation: bishopPulse 1.5s infinite ease-in-out;
  position: relative;
}

.preview-cell.possible-move.joker-bishop::before {
  content: '♗';
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 10px;
  color: #8A2BE2;
  text-shadow: 0 0 4px rgba(138, 43, 226, 0.8);
  z-index: 1;
}

/* Pattern cycle indicator */
.pattern-cycle-indicator {
  margin-top: 10px;
  padding: 8px;
  background: rgba(50, 205, 50, 0.1);
  border: 1px solid rgba(50, 205, 50, 0.3);
  border-radius: 6px;
  text-align: center;
  font-size: 0.8em;
  color: #32CD32;
}

/* ANIMATIONS */
@keyframes knightPulse {
  0%, 100% {
    box-shadow:
      0 0 15px rgba(50, 205, 50, 0.9),
      0 0 25px rgba(50, 205, 50, 0.6),
      inset 0 0 8px rgba(50, 205, 50, 0.3);
  }
  50% {
    box-shadow:
      0 0 20px rgba(50, 205, 50, 1),
      0 0 35px rgba(50, 205, 50, 0.8),
      inset 0 0 12px rgba(50, 205, 50, 0.5);
    transform: scale(1.15);
  }
}

@keyframes rookPulse {
  0%, 100% {
    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);
  }
  50% {
    box-shadow:
      0 0 20px rgba(70, 130, 180, 1),
      0 0 35px rgba(70, 130, 180, 0.8),
      inset 0 0 12px rgba(70, 130, 180, 0.5);
    transform: scale(1.15);
  }
}

@keyframes bishopPulse {
  0%, 100% {
    box-shadow:
      0 0 15px rgba(138, 43, 226, 0.9),
      0 0 25px rgba(138, 43, 226, 0.6),
      inset 0 0 8px rgba(138, 43, 226, 0.3);
  }
  50% {
    box-shadow:
      0 0 20px rgba(138, 43, 226, 1),
      0 0 35px rgba(138, 43, 226, 0.8),
      inset 0 0 12px rgba(138, 43, 226, 0.5);
    transform: scale(1.15);
  }
}

/* RESPONSIVE DESIGN */
@media (max-width: 480px) {
  .preview-cell {
    width: 28px;
    height: 28px;
    font-size: 0.7em;
  }
  
  .preview-token.joker {
    width: 22px;
    height: 22px;
    font-size: 0.7em;
  }
  
  .preview-enemy {
    width: 20px;
    height: 20px;
    font-size: 0.65em;
  }
  
  .preview-board {
    padding: 6px;
    gap: 1.5px;
  }
}

@media (max-width: 360px) {
  .preview-cell {
    width: 24px;
    height: 24px;
    font-size: 0.65em;
  }
  
  .preview-token.joker {
    width: 20px;
    height: 20px;
    font-size: 0.6em;
  }
  
  .preview-enemy {
    width: 18px;
    height: 18px;
    font-size: 0.55em;
  }
  
  .preview-board {
    padding: 5px;
    gap: 1px;
  }
  
  .ability-preview-container {
    padding: 12px;
  }
} 