/* General Game Board Animations for All 15 Games */

/* Connect 4 Chip Drop Animation */
@keyframes dropChip {
    0% { transform: translateY(-200px); opacity: 0; }
    70% { transform: translateY(10px); }
    100% { transform: translateY(0); opacity: 1; }
}

.c4-cell.p1, .c4-cell.p2 {
    animation: dropChip 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Battleship Splash/Hit Explosion Animation */
@keyframes splashHit {
    0% { transform: scale(0.5); opacity: 0.3; }
    50% { transform: scale(1.2); filter: brightness(1.5); }
    100% { transform: scale(1); opacity: 1; }
}

.bs-cell.hit, .bs-cell.miss {
    animation: splashHit 0.25s ease-out;
}

/* Bowling Pins Strike Animation */
@keyframes pinStrike {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(45deg) scale(1.2) translateY(-20px); }
    100% { transform: rotate(90deg) scale(0.8) translateY(10px); opacity: 0.5; }
}

.bowling-pin.hit {
    animation: pinStrike 0.3s ease-out forwards;
}

/* 9-Ball Cue Strike & Pocket Animation */
@keyframes ballPocket {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3) rotate(180deg); }
    100% { transform: scale(0); opacity: 0; }
}

.pool-ball.pocketed {
    animation: ballPocket 0.3s ease-in forwards;
}

/* 3D Card Flip Animation for Memory, Blackjack & Deal or No Deal */
@keyframes cardFlip3D {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(180deg); }
}

.memory-card.flipped, .blackjack-card.revealed, .dond-case.opened {
    animation: cardFlip3D 0.25s ease-in-out;
}

/* Board Piece Movement Glow (Chess, Checkers, Ludo, Monopoly) */
@keyframes pieceMoveGlow {
    0% { box-shadow: 0 0 0px rgba(99, 102, 241, 0); }
    50% { box-shadow: 0 0 18px rgba(99, 102, 241, 0.9); }
    100% { box-shadow: 0 0 4px rgba(99, 102, 241, 0.3); }
}

.chess-square.selected, .checkers-square.selected, .ludo-cell.active, .monopoly-space.active {
    animation: pieceMoveGlow 0.4s infinite alternate;
}
