/* Animations des particules */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Animations du level system */
@keyframes pulse-glow {
    0% { box-shadow: 0 0 20px rgba(191,0,255,0.5); }
    100% { box-shadow: 0 0 40px rgba(191,0,255,0.8); }
}

.level-badge {
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes shimmer {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.xp-fill {
    animation: shimmer 2s ease-in-out infinite alternate;
}

/* Animations des zones de jeu */
@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.player-zone::before, .dealer-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-gold), transparent);
    animation: scan 3s linear infinite;
}

/* Animations des jetons (Connect Four) */
@keyframes tokenDrop {
    0% {
        transform: translateY(-400px) scale(0.8);
        opacity: 0;
    }
    70% {
        transform: translateY(0) scale(1.1);
        opacity: 1;
    }
    85% {
        transform: translateY(-10px) scale(0.95);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.token {
    animation: tokenDrop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes winningToken {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px currentColor;
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 40px currentColor;
    }
}

.token.winning {
    animation: winningToken 0.6s ease-in-out infinite;
}

/* Animations des scores */
@keyframes scoreGlow {
    0% { text-shadow: 0 0 15px var(--neon-gold); }
    100% { text-shadow: 0 0 25px var(--neon-gold), 0 0 35px var(--neon-gold); }
}

.score-value {
    animation: scoreGlow 1s ease-in-out infinite alternate;
}

/* Animations des messages */
@keyframes messageSlide {
    0% {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.game-message {
    animation: messageSlide 0.5s ease-out;
}

@keyframes winPulse {
    0% { box-shadow: 0 0 30px rgba(0,255,136,0.3); }
    100% { box-shadow: 0 0 50px rgba(0,255,136,0.6); }
}

.message-win {
    animation: messageSlide 0.5s ease-out, winPulse 1s ease-in-out infinite alternate;
}

/* Animations des achievements */
@keyframes achievementSlide {
    0% { transform: translateX(400px); }
    100% { transform: translateX(0); }
}

.achievement {
    animation: achievementSlide 0.5s ease-out forwards;
}

/* Animations du combo système */
@keyframes comboFlash {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

.combo-display {
    animation: comboFlash 1s ease-out forwards;
}

/* Animations des ondes sonores */
@keyframes soundWave {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.sound-wave {
    animation: soundWave 1s ease-out forwards;
}

/* Animations de chargement */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.fade-in {
    animation: fadeIn 1s ease-in-out;
}

/* Animations de célébration */
@keyframes starFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.celebration-star {
    animation: starFall 2s ease-out forwards;
}

/* Animations des particules de clic */
@keyframes particleBurst {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.click-particle {
    animation: particleBurst 0.5s ease-out forwards;
}

/* Animation d'entrée du jeu */
@keyframes gameEntrance {
    0% {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.game-entrance {
    animation: gameEntrance 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Animation de pulsation pour les éléments importants */
@keyframes importantPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 207, 64, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(255, 207, 64, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 207, 64, 0.3);
    }
}

.pulse-important {
    animation: importantPulse 2s ease-in-out infinite;
}

/* Animation de rotation pour les éléments en attente */
@keyframes waiting {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ne pas appliquer l'animation au status des games */
.game-status.waiting {
    animation: none;
}

/* Animation de glitch pour les effets spéciaux */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.glitch-effect {
    animation: glitch 0.3s ease-in-out;
}

/* Animation de rebond pour les interactions */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.bounce-effect {
    animation: bounce 0.6s ease-in-out;
}

/* Animation de clignotement pour les alertes */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.blink-alert {
    animation: blink 1s ease-in-out infinite;
}

/* Animation pour le message F11 */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

.fullscreen-tip-show {
    animation: fadeInOut 3.5s ease-out forwards;
}

/* Animation des gains/pertes */
@keyframes winningsPopup {
    0% {
        transform: translate(-50%, -50%) scale(0.3) translateY(30px);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1.2) translateY(0px);
        opacity: 1;
    }
    80% {
        transform: translate(-50%, -50%) scale(1) translateY(-10px);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8) translateY(-30px);
        opacity: 0;
    }
}

/* Animation pour le timer */
@keyframes timerPulse {
    0% {
        transform: scale(1);
        color: var(--neon-blue);
    }
    50% {
        transform: scale(1.1);
        color: var(--neon-gold);
    }
    100% {
        transform: scale(1);
        color: var(--neon-blue);
    }
}

.timer-warning {
    animation: timerPulse 0.5s ease-in-out infinite;
}

/* Animation du lobby */
@keyframes lobbySlide {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.lobby-item {
    animation: lobbySlide 0.4s ease-out;
}

/* ============================================
   OPTIMISATION PERFORMANCE - Animations désactivées
   ============================================ */

/* Désactiver toutes les animations du lobby */
.level-badge,
.xp-fill,
.score-value,
.timer-warning,
.pulse-important,
.glitch-effect,
.bounce-effect,
.blink-alert {
    animation: none !important;
}

/* Désactiver backdrop-filter (très coûteux) */
.header,
.lobby-column,
.player-card,
.timer-card,
.game-result,
.wallet-modal-content,
.escrow-modal-content,
.withdraw-modal-content {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ============================================
   PAGE /GAME - Aucune animation
   ============================================ */

/* Désactiver TOUTES les animations de l'écran de jeu */
.game-screen *,
.game-screen *::before,
.game-screen *::after {
    animation: none !important;
    transition: none !important;
}

/* EXCEPTION: Animation de chute des jetons - GPU accelerated */
.token {
    will-change: transform !important;
    transform: translateZ(0);
    backface-visibility: hidden;
    animation: tokenFall 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
}

.token.no-anim {
    animation: none !important;
    will-change: auto !important;
}

.token.winning {
    animation: none !important;
    will-change: auto !important;
    transform: scale(1.1) translateZ(0);
    filter: brightness(1.2);
}

/* Timer statique */
.game-timer,
.game-timer.warning,
.timer-progress,
.timer-progress.warning {
    animation: none !important;
}

.game-timer.warning {
    color: #ff6b6b;
}

/* Cartes joueurs statiques */
.player-card,
.player-card.active,
.player-card.player-1.active,
.player-card.player-2.active {
    animation: none !important;
}

.player-card.active {
    border-width: 3px;
}

/* Pot statique */
.pot-card-top,
.pot-card-top::before,
.pot-card-top::after,
.pot-amount {
    animation: none !important;
}

/* Grille statique */
.game-grid-container,
.game-grid-container::before,
.game-grid-container::after,
.grid-cell {
    animation: none !important;
}

/* Résultat de partie statique */
.game-result,
.game-result * {
    animation: none !important;
}
