/*
 * Gaming Animations CSS
 * Location: /public_html/assets/css/animations.css
 * 
 * All gaming-style animations and effects for FiveM roleplay themes
 * Glowing effects, pulses, scans, and tactical animations
 */

/* Badge Animations */
@keyframes badge-glow {
    0% { 
        box-shadow: 0 0 20px var(--glow-color);
        transform: scale(1);
    }
    100% { 
        box-shadow: 0 0 30px var(--glow-intense);
        transform: scale(1.02);
    }
}

@keyframes badge-pulse {
    0%, 100% { 
        box-shadow: 0 0 50px var(--glow-color);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 80px var(--glow-intense);
        transform: scale(1.05);
    }
}

@keyframes sidebar-badge-pulse {
    0%, 100% { 
        box-shadow: 0 0 20px var(--glow-color);
    }
    50% { 
        box-shadow: 0 0 30px var(--glow-intense);
    }
}

/* Status Indicator Animations */
@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulse-green {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 10px var(--success-color);
    }
    50% { 
        opacity: 0.5;
        box-shadow: 0 0 15px var(--success-color);
    }
}

@keyframes pulse-orange {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 10px var(--warning-color);
    }
    50% { 
        opacity: 0.5;
        box-shadow: 0 0 15px var(--warning-color);
    }
}

@keyframes pulse-red {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 10px var(--danger-color);
    }
    50% { 
        opacity: 0.5;
        box-shadow: 0 0 15px var(--danger-color);
    }
}

/* Urgent Animations */
@keyframes urgent-pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
        background-color: var(--danger-color);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.05);
        background-color: #fca5a5;
    }
}

@keyframes urgent-flash {
    0%, 100% { background-color: var(--danger-color); }
    50% { background-color: #fca5a5; }
}

/* Button Hover Effects */
@keyframes button-scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes button-glow {
    0% { box-shadow: 0 0 5px var(--primary-color); }
    100% { box-shadow: 0 0 20px var(--glow-color), 0 0 30px var(--glow-color); }
}

/* Card Hover Animations */
@keyframes card-scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes card-glow {
    0% { 
        border-color: var(--primary-color-light);
        box-shadow: none;
    }
    100% { 
        border-color: var(--primary-color);
        box-shadow: 0 0 25px var(--shadow-color);
    }
}

/* Loading Animations */
@keyframes loading-dots {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    80%, 100% { opacity: 0; }
}

@keyframes loading-bar {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes loading-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Text Animations */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes text-glow {
    0% { text-shadow: 0 0 5px var(--primary-color); }
    100% { text-shadow: 0 0 20px var(--glow-color), 0 0 30px var(--glow-color); }
}

/* Gaming-Specific Animations */
@keyframes tactical-scan {
    0% { 
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% { 
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes radar-sweep {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes data-stream {
    0% { transform: translateY(-100%); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

/* Department-Specific Badge Rotations */
@keyframes sheriff-star-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes police-flash {
    0%, 100% { background: var(--primary-color); }
    25% { background: #ef4444; }
    50% { background: #3b82f6; }
    75% { background: #ef4444; }
}

@keyframes federal-scan {
    0%, 100% { 
        transform: rotate(0deg); 
        opacity: 0.5; 
    }
    50% { 
        transform: rotate(180deg); 
        opacity: 1; 
    }
}

@keyframes nature-pulse {
    0%, 100% { 
        box-shadow: 0 0 20px var(--success-color);
        filter: hue-rotate(0deg);
    }
    50% { 
        box-shadow: 0 0 40px var(--success-color);
        filter: hue-rotate(30deg);
    }
}

/* Entrance Animations */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-down {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-left {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fade-in-right {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scale-in {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Gaming UI Effects */
@keyframes hologram-flicker {
    0%, 100% { opacity: 1; }
    2% { opacity: 0.8; }
    4% { opacity: 1; }
    6% { opacity: 0.9; }
    8% { opacity: 1; }
}

@keyframes terminal-boot {
    0% { 
        opacity: 0;
        transform: scale(0.9);
    }
    50% {
        opacity: 0.8;
    }
    100% { 
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes matrix-rain {
    0% { transform: translateY(-100vh); }
    100% { transform: translateY(100vh); }
}

/* Interactive Hover States */
@keyframes hover-lift {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

@keyframes hover-glow {
    0% { 
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    100% { 
        box-shadow: 0 8px 25px var(--shadow-color);
    }
}

@keyframes border-glow {
    0% { border-color: var(--primary-color-light); }
    100% { border-color: var(--primary-color); }
}

/* Gaming Particles */
@keyframes particle-float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.6; 
    }
    50% { 
        transform: translateY(-20px) rotate(180deg); 
        opacity: 1; 
    }
}

@keyframes spark-fly {
    0% { 
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% { 
        transform: scale(1) rotate(360deg);
        opacity: 0;
    }
}

/* Stats Counter Animation */
@keyframes count-up {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes stat-highlight {
    0% { background-color: transparent; }
    50% { background-color: var(--primary-color-alpha); }
    100% { background-color: transparent; }
}

/* Gaming Progress Bars */
@keyframes progress-fill {
    0% { width: 0%; }
    100% { width: var(--progress-width, 100%); }
}

@keyframes progress-glow {
    0% { box-shadow: inset 0 0 10px var(--primary-color); }
    50% { box-shadow: inset 0 0 20px var(--glow-color); }
    100% { box-shadow: inset 0 0 10px var(--primary-color); }
}

/* Gaming Modal Entrance */
@keyframes modal-zoom-in {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes backdrop-fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Gaming Navigation */
@keyframes nav-slide-down {
    0% { 
        opacity: 0;
        transform: translateY(-100%);
    }
    100% { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sidebar-slide-in {
    0% { 
        opacity: 0;
        transform: translateX(-100%);
    }
    100% { 
        opacity: 1;
        transform: translateX(0);
    }
}

/* Activity Animations */
@keyframes activity-ping {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes notification-slide {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Gaming Theme Classes */
.animate-glow {
    animation: badge-glow 2s ease-in-out infinite alternate;
}

.animate-pulse {
    animation: badge-pulse 3s ease-in-out infinite;
}

.animate-scan {
    animation: tactical-scan 2s linear infinite;
}

.animate-urgent {
    animation: urgent-pulse 1.5s infinite;
}

.animate-fade-in {
    animation: fade-in-up 0.6s ease-out;
}

.animate-scale-in {
    animation: scale-in 0.5s ease-out;
}

.animate-float {
    animation: particle-float 3s ease-in-out infinite;
}

.animate-spin {
    animation: loading-spin 1s linear infinite;
}

.animate-typing {
    animation: typing 2s steps(30, end);
}

.animate-hologram {
    animation: hologram-flicker 5s infinite;
}

/* Hover Animation Classes */
.hover-lift:hover {
    animation: hover-lift 0.3s ease-out forwards;
}

.hover-glow:hover {
    animation: hover-glow 0.3s ease-out forwards;
}

.hover-scan:hover::before {
    animation: tactical-scan 0.6s ease-out;
}

/* Gaming Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gaming-transition {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Gaming Utility Animation Classes */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }
.delay-700 { animation-delay: 0.7s; }
.delay-1000 { animation-delay: 1s; }

.duration-fast { animation-duration: 0.3s; }
.duration-normal { animation-duration: 0.5s; }
.duration-slow { animation-duration: 1s; }
.duration-slower { animation-duration: 2s; }

.ease-gaming { animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.ease-bounce { animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); }