/* public/css/game-animations.css */

:root {
    --new-game-glow: rgba(255, 255, 255, 0.95);
    --game-icon-shadow: rgba(0, 0, 0, 0.1);
    --game-icon-hover-shadow: rgba(0, 0, 0, 0.15);
    --new-game-glow-intensity: 15px;
}

body.dark-theme {
    --new-game-glow: rgba(255, 255, 255, 0.4);
    --game-icon-shadow: rgba(0, 0, 0, 0.5);
    --game-icon-hover-shadow: rgba(255, 255, 255, 0.2);
    --new-game-glow-intensity: 35px;
}

/* 
   ==========================================================================
   Game Icon Hover Animations & Keyframes
   ==========================================================================
*/

/* Master Icon Hover Effects */
.game-app-icon i,
.game-app-icon div,
.game-app-icon .remi-board-icon,
.game-app-icon .ai-badge,
.game-app-icon .multiplayer-badge {
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-badge {
    font-size: 0.9rem;
    position: absolute;
    bottom: 8px;
    right: 8px;
    opacity: 0.7;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.multiplayer-badge {
    font-size: 0.9rem;
    position: absolute;
    bottom: 8px;
    right: 8px;
    opacity: 0.7;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    font-weight: 800;
    z-index: 2;
    line-height: 1;
}

/* 1. Roata Norocului */
.game-app-item:hover .app-wheel i { animation: wheel-spin 1.5s cubic-bezier(0.15, 0, 0.15, 1) infinite !important; }
/* 2. Zaruri 3D */
.game-app-item:hover .app-dice i { animation: dice-roll 0.6s ease-in-out infinite !important; }
/* 3. Cap sau Pajură */
.game-app-item:hover .app-coin i { animation: coin-flip 1s ease-in-out infinite !important; }
/* 4. Test Reflexe */
.game-app-item:hover .app-reaction i { animation: pulse-rapid 0.4s ease-in-out infinite alternate !important; }
/* 5. X și 0 */
.game-app-item:hover .app-tictactoe i { animation: tictac-bounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite !important; }
/* 6. Rubik's Cube */
.game-app-item:hover .app-rubik i { animation: rubik-3d 2s linear infinite !important; }
/* 7. Table */
.game-app-item:hover .app-table i { animation: table-wobble 0.8s ease-in-out infinite !important; }

/* --- Specific Premium Animations --- */

/* 8. Monopol - Building Build-Up & Glow */
.game-app-item:hover .app-monopoly { animation: container-lift 1.2s ease-in-out infinite alternate !important; }
.game-app-item:hover .app-monopoly i { animation: monopol-build 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite !important; }

/* 9. Biliard - Amazing Ball Roll & Hit */
.game-app-item:hover .app-biliard { animation: container-shake 0.8s ease-in-out infinite !important; }
.game-app-item:hover .app-biliard i { animation: biliard-ball-hit 1s ease-in-out infinite !important; }

/* 10. Șeptica - Dealing Heartbeat */
.game-app-item:hover .app-septica { animation: container-pulse-red 0.8s ease-in-out infinite !important; }
.game-app-item:hover .app-septica i { animation: septica-deal 0.8s ease-in-out infinite !important; }

/* Inchide Cutia - Dice Shake */
.game-app-item:hover .app-inchide-cutia { animation: container-shake 0.8s ease-in-out infinite !important; }
.game-app-item:hover .app-inchide-cutia i { animation: dice-roll 0.6s ease-in-out infinite !important; }

/* Sudoku - Grid Pulse */
.game-app-item:hover .app-sudocu { animation: container-expand-glow 1.2s ease-in-out infinite alternate !important; }
.game-app-item:hover .app-sudocu i { animation: sudocu-grid 1s ease-in-out infinite !important; }

/* Soliter - Card Cascade */
.game-app-item:hover .app-soliter { animation: container-lift 0.8s ease-in-out infinite alternate !important; }
.game-app-item:hover .app-soliter i { animation: soliter-cascade 1.2s ease-in-out infinite !important; }

/* 11. Dezamorsarea - Explosive Warning */
.game-app-item:hover .app-dezamorsarea { animation: container-vibrate 0.1s linear infinite !important; }
.game-app-item:hover .app-dezamorsarea i { animation: bomb-ticking-pro 0.6s ease-in-out infinite !important; }

/* 12. Rebus AI - Float & Thinking Glow */
.game-app-item:hover .app-rebus { animation: container-float-glow 2s ease-in-out infinite !important; }
.game-app-item:hover .app-rebus i:not(.ai-badge) { animation: rebus-float-pro 2s ease-in-out infinite !important; }
.game-app-item:hover .app-rebus .ai-badge { animation: ai-thinking-vibe 0.4s ease-in-out infinite !important; opacity: 1; }

/* 13. Integramă AI - Expansion Glow */
.game-app-item:hover .app-integrama { animation: container-expand-glow 1.2s ease-in-out infinite alternate !important; }
.game-app-item:hover .app-integrama i:not(.ai-badge) { animation: integrama-pop-pro 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite alternate !important; }
.game-app-item:hover .app-integrama .ai-badge { animation: ai-thinking-vibe 0.4s ease-in-out infinite !important; opacity: 1; }

/* 14. Puzzle Imagini - Icon Collision Effect */
.game-app-item:hover .app-puzzle { animation: container-tilt-3d 1.5s ease-in-out infinite alternate !important; }
.game-app-item:hover .app-puzzle i.fa-puzzle-piece { animation: puzzle-collision-main 1s ease-in-out infinite alternate !important; }
.game-app-item:hover .app-puzzle i.fa-image { animation: puzzle-collision-sub 1s ease-in-out infinite alternate !important; }

/* 15. Remi - Board Pop & Glow */
.game-app-item:hover .app-remi { animation: container-lift 0.8s ease-in-out infinite alternate !important; }
.game-app-item:hover .app-remi .remi-board-icon { animation: card-fan-pro 0.8s ease-in-out infinite !important; }

/* 16. Sah - Strategic Slide */
.game-app-item:hover .app-sah { animation: container-slide-side 1.2s ease-in-out infinite alternate !important; }
.game-app-item:hover .app-sah i { animation: sah-move 1.2s ease-in-out infinite alternate !important; }

/* 17. Una - Wild Shuffle */
.game-app-item:hover .app-una { animation: container-rotate-wobble 1.5s ease-in-out infinite !important; }
.game-app-item:hover .app-una i { animation: una-shuffle 1.5s ease-in-out infinite !important; }

/* ... */

/* --- Advanced Keyframes --- */

@keyframes monopol-build {
    0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 0 transparent); }
    50% { transform: translateY(-10px) scale(1.3); filter: drop-shadow(0 5px 15px rgba(241, 196, 15, 0.6)); color: #f1c40f; }
}

@keyframes biliard-ball-hit {
    0% { transform: translateX(-20px) scale(1); }
    40% { transform: translateX(5px) scale(1.1); }
    60% { transform: translateX(0) scale(1.2) rotate(180deg); opacity: 0.9; }
    100% { transform: translateX(15px) scale(1) rotate(360deg); opacity: 1; }
}

@keyframes septica-deal {
    0% { transform: scale(1) rotate(0); }
    25% { transform: scale(1.4) rotate(-15deg); }
    75% { transform: scale(1.1) rotate(15deg); }
    100% { transform: scale(1.4) rotate(0); }
}

@keyframes bomb-ticking-pro {
    0%, 100% { transform: scale(1) rotate(0); filter: brightness(1) drop-shadow(0 0 0 red); }
    50% { transform: scale(1.25) rotate(5deg); filter: brightness(1.5) drop-shadow(0 0 15px red); color: #e74c3c; }
}

@keyframes sah-move {
    0% { transform: translate(0, 0) rotate(0); }
    25% { transform: translate(10px, -10px) rotate(10deg); }
    50% { transform: translate(10px, 0) rotate(0); }
    75% { transform: translate(0, -10px) rotate(-10deg); }
}

@keyframes una-shuffle {
    0% { transform: scale(1) rotate(0); }
    25% { transform: scale(1.2) rotate(-20deg) translateX(-5px); }
    50% { transform: scale(1.3) rotate(20deg) translateX(5px); }
    75% { transform: scale(1.2) rotate(-10deg) translateY(-5px); }
    100% { transform: scale(1) rotate(0); }
}

@keyframes puzzle-collision-main {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(5px, 5px); } /* Move slightly towards the sub icon */
}

@keyframes puzzle-collision-sub {
    0% { transform: translate(0, 0) scale(1); opacity: 0.8; }
    100% { transform: translate(-18px, -18px) scale(1.1); opacity: 1; } /* Snap to connect with the main piece */
}

@keyframes rebus-float-pro {
    0%, 100% { transform: translateY(0) rotate(-5deg) scale(1); }
    50% { transform: translateY(-18px) rotate(5deg) scale(1.25); filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2)); }
}

@keyframes integrama-pop-pro {
    from { transform: scale(1) translateY(0); filter: drop-shadow(0 0 0 transparent); }
    to { transform: scale(1.4) translateY(-15px); filter: drop-shadow(0 15px 25px rgba(39, 174, 96, 0.4)); }
}

@keyframes card-fan-pro {
    0%, 100% { transform: scale(1) translateY(0) rotate(0); }
    50% { transform: scale(1.3) translateY(12px) rotate(-5deg); filter: drop-shadow(0 15px 25px rgba(211, 84, 0, 0.4)); }
}

@keyframes wheel-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes dice-roll { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-15deg) scale(1.15); } 75% { transform: rotate(15deg) scale(1.15); } }
@keyframes coin-flip { 0% { transform: rotateY(0); } 100% { transform: rotateY(360deg); } }
@keyframes pulse-rapid { from { transform: scale(1); } to { transform: scale(1.25); } }
@keyframes tictac-bounce { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.35) rotate(90deg); } }
@keyframes rubik-3d { from { transform: rotateX(0) rotateY(0); } to { transform: rotateX(360deg) rotateY(360deg); } }
@keyframes table-wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(8deg); } 75% { transform: rotate(-8deg); } }

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

@keyframes new-game-shimmer {
    0%, 100% {
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05), 0 0 5px var(--new-game-glow);
        filter: brightness(1);
    }
    50% {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08), 0 0 var(--new-game-glow-intensity) var(--new-game-glow);
        filter: brightness(1.15);
    }
}

@keyframes ai-thinking-vibe {
    0%, 100% { transform: scale(1) translate(0, 0) rotate(0); }
    10%, 30%, 50%, 70%, 90% { transform: scale(1.1) translate(-1px, -1px) rotate(-5deg); filter: brightness(1.3) drop-shadow(0 0 5px var(--new-game-glow)); }
    20%, 40%, 60%, 80% { transform: scale(1.1) translate(1px, 1px) rotate(5deg); filter: brightness(1.3) drop-shadow(0 0 5px var(--new-game-glow)); }
}

@keyframes container-lift {
    from { transform: translateY(0); box-shadow: 0 5px 15px var(--game-icon-shadow); }
    to { transform: translateY(-10px); box-shadow: 0 15px 30px var(--game-icon-hover-shadow); }
}

@keyframes container-shake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-3deg) scale(1.05); }
    75% { transform: rotate(3deg) scale(1.05); }
}

@keyframes container-pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
    50% { box-shadow: 0 0 20px 10px rgba(231, 76, 60, 0.4); transform: scale(1.05); }
}

@keyframes container-vibrate {
    0% { transform: translate(0); }
    25% { transform: translate(2px, 2px); }
    50% { transform: translate(-2px, -2px); }
    75% { transform: translate(2px, -2px); }
    100% { transform: translate(-2px, 2px); }
}

@keyframes container-float-glow {
    0%, 100% { transform: translateY(0); box-shadow: 0 5px 15px rgba(142, 68, 173, 0.2); }
    50% { transform: translateY(-12px); box-shadow: 0 15px 35px rgba(142, 68, 173, 0.6); }
}

@keyframes container-expand-glow {
    from { transform: scale(1); filter: brightness(1); }
    to { transform: scale(1.1); filter: brightness(1.2); box-shadow: 0 0 25px rgba(39, 174, 96, 0.5); }
}

@keyframes container-tilt-3d {
    from { transform: perspective(1000px) rotateX(0); }
    to { transform: perspective(1000px) rotateX(15deg) translateY(-5px); }
}

@keyframes container-slide-side {
    from { transform: translateX(0); }
    to { transform: translateX(8px); }
}

@keyframes container-rotate-wobble {
    0%, 100% { transform: rotate(0) scale(1); }
    25% { transform: rotate(-10deg) scale(1.1); }
    75% { transform: rotate(10deg) scale(1.1); }
}
/* Specialized Group Animations */
.game-app-item:hover .app-genshin-archive,
.game-app-item:hover .app-genshin-teams,
.game-app-item:hover .app-genshin-rank,
.game-app-item:hover .app-genshin-builder {
    animation: genshin-glow 1.5s ease-in-out infinite !important;
}

@keyframes genshin-glow {
    0%, 100% { box-shadow: 0 10px 20px rgba(0,0,0,0.15); }
    50% { box-shadow: 0 10px 30px rgba(161, 196, 253, 0.6); }
}

.game-app-item:hover .app-wildrift-archive,
.game-app-item:hover .app-wildrift-teams,
.game-app-item:hover .app-wildrift-rank,
.game-app-item:hover .app-wildrift-builder {
    animation: wildrift-glow 1.5s ease-in-out infinite !important;
}

@keyframes wildrift-glow {
    0%, 100% { box-shadow: 0 10px 20px rgba(0,0,0,0.15); }
    50% { box-shadow: 0 10px 30px rgba(200, 170, 110, 0.6); } /* Gold glow */
}

@keyframes sudocu-grid {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.25) rotate(5deg); }
}

@keyframes soliter-cascade {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-5deg); }
    75% { transform: translateY(-8px) rotate(5deg); }
}
