/* ============================================
   MAK TEAM HQ - Animations
   ============================================ */

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Staggered Animation */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

.stagger-6 {
    animation-delay: 0.6s;
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleIn 0.4s ease forwards;
}

/* Slide In Right (RTL) */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease forwards;
}

/* Slide In Left (RTL) */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease forwards;
}

/* Glow Pulse */
@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px var(--accent-blue-glow);
    }

    50% {
        box-shadow: 0 0 40px var(--accent-blue-glow), 0 0 60px var(--accent-orange-glow);
    }
}

.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Text Glow */
@keyframes textGlow {

    0%,
    100% {
        text-shadow: 0 0 10px var(--accent-blue-glow);
    }

    50% {
        text-shadow: 0 0 30px var(--accent-blue-glow), 0 0 50px var(--accent-orange-glow);
    }
}

.text-glow {
    animation: textGlow 2s ease-in-out infinite;
}

/* Rotate */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 2s linear infinite;
}

/* Bounce */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 1s ease infinite;
}

/* Shake */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease;
}

/* Progress Bar Animation */
@keyframes progressFill {
    from {
        width: 0;
    }
}

.animate-progress {
    animation: progressFill 1s ease forwards;
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-up {
    animation: countUp 0.5s ease forwards;
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    transform: scale(0);
}

.ripple:active::after {
    animation: ripple 0.6s ease;
}

/* Typing Effect */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {

    0%,
    100% {
        border-color: transparent;
    }

    50% {
        border-color: var(--accent-blue);
    }
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-left: 3px solid var(--accent-blue);
    animation:
        typing 3s steps(30) forwards,
        blink 1s step-end infinite;
}

/* Floating Elements */
@keyframes floatUp {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(20px);
    }
}

.float-up {
    animation: floatUp 4s ease-in-out infinite;
}

.float-down {
    animation: floatDown 4s ease-in-out infinite;
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-animated {
    background: linear-gradient(270deg, var(--accent-blue), var(--accent-orange), var(--accent-blue));
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* Matrix Rain Effect (Background) */
@keyframes matrixRain {
    0% {
        transform: translateY(-100%);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Cyber Lines */
@keyframes cyberLine {
    0% {
        transform: scaleX(0);
    }

    50% {
        transform: scaleX(1);
    }

    100% {
        transform: scaleX(0);
    }
}

.cyber-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    animation: cyberLine 2s ease-in-out infinite;
    transform-origin: left;
}

/* Scan Line */
@keyframes scanLine {
    0% {
        top: -10%;
    }

    100% {
        top: 110%;
    }
}

.scan-effect {
    position: relative;
    overflow: hidden;
}

.scan-effect::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(180deg, transparent, rgba(0, 168, 255, 0.5), transparent);
    animation: scanLine 3s linear infinite;
}

/* Card Hover Glow */
.card-hover-glow {
    transition: all 0.3s ease;
}

.card-hover-glow:hover {
    box-shadow:
        0 0 20px var(--accent-blue-glow),
        inset 0 0 20px rgba(0, 168, 255, 0.05);
}

/* Button Shine Effect */
@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
}

.btn-shine:hover::after {
    animation: shine 0.6s ease;
}

/* Loading Spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Skeleton Loading */
@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 0px, var(--bg-card-hover) 40px, var(--bg-card) 80px);
    background-size: 200px 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

/* Number Count Animation Helper */
.animate-number {
    display: inline-block;
    transition: all 0.3s ease;
}

/* Initial Hidden State for Animation */
[data-animate] {
    opacity: 0;
}

[data-animate].animated {
    opacity: 1;
}