/* Advanced Animation Framework for Permspoofer */

/* === KEYFRAME ANIMATIONS === */

/* Slide Animations */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Scale Animations */
@keyframes scaleIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes scaleInBounce {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    70% {
        transform: scale(0.9);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Rotation Animations */
@keyframes rotateIn {
    0% {
        transform: rotate(-200deg);
        opacity: 0;
    }
    100% {
        transform: rotate(0deg);
        opacity: 1;
    }
}

@keyframes flipInX {
    0% {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateX(-20deg);
    }
    60% {
        transform: perspective(400px) rotateX(10deg);
        opacity: 1;
    }
    80% {
        transform: perspective(400px) rotateX(-5deg);
    }
    100% {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}

/* Glow and Pulse Effects */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.8), 0 0 30px rgba(255, 107, 53, 0.6);
    }
}

@keyframes neonGlow {
    0%, 100% {
        text-shadow: 0 0 5px #ff6b35, 0 0 10px #ff6b35, 0 0 15px #ff6b35;
    }
    50% {
        text-shadow: 0 0 10px #ff6b35, 0 0 20px #ff6b35, 0 0 30px #ff6b35, 0 0 40px #ff6b35;
    }
}

@keyframes borderGlow {
    0%, 100% {
        border-color: rgba(255, 107, 53, 0.3);
        box-shadow: inset 0 0 10px rgba(255, 107, 53, 0.1);
    }
    50% {
        border-color: rgba(255, 107, 53, 0.8);
        box-shadow: inset 0 0 20px rgba(255, 107, 53, 0.3), 0 0 20px rgba(255, 107, 53, 0.2);
    }
}

/* Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCursor {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #ff6b35;
    }
}

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

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* === ANIMATION CLASSES === */

/* Basic Animations */
.animate-slide-in-left {
    animation: slideInFromLeft 0.6s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInFromRight 0.6s ease-out forwards;
}

.animate-slide-in-top {
    animation: slideInFromTop 0.6s ease-out forwards;
}

.animate-slide-in-bottom {
    animation: slideInFromBottom 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

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

.animate-scale-in-bounce {
    animation: scaleInBounce 0.8s ease-out forwards;
}

.animate-rotate-in {
    animation: rotateIn 0.6s ease-out forwards;
}

.animate-flip-in-x {
    animation: flipInX 0.8s ease-out forwards;
}

/* Continuous Animations */
.animate-glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

.animate-neon-glow {
    animation: neonGlow 2s ease-in-out infinite;
}

.animate-border-glow {
    animation: borderGlow 2s ease-in-out infinite;
}

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

/* Delayed Animations */
.animate-delay-100 {
    animation-delay: 0.1s;
}

.animate-delay-200 {
    animation-delay: 0.2s;
}

.animate-delay-300 {
    animation-delay: 0.3s;
}

.animate-delay-500 {
    animation-delay: 0.5s;
}

.animate-delay-700 {
    animation-delay: 0.7s;
}

.animate-delay-1000 {
    animation-delay: 1s;
}

/* Duration Modifiers */
.animate-fast {
    animation-duration: 0.3s;
}

.animate-slow {
    animation-duration: 1.5s;
}

.animate-slower {
    animation-duration: 2s;
}

/* === TRANSITION EFFECTS === */

.transition-all {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.15s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

.transition-transform {
    transition: transform 0.3s ease;
}

.transition-opacity {
    transition: opacity 0.3s ease;
}

.transition-colors {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* === HOVER EFFECTS === */

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-scale-lg:hover {
    transform: scale(1.1);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-shake:hover {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* === SPECIAL EFFECTS === */

.typing-effect {
    overflow: hidden;
    border-right: 2px solid #ff6b35;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blinkCursor 0.75s step-end infinite;
}

.loading-dots::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ff6b35;
    margin-left: 5px;
    animation: loadingDots 1.4s infinite ease-in-out both;
}

.loading-dots::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ff6b35;
    margin-right: 5px;
    animation: loadingDots 1.4s infinite ease-in-out both;
    animation-delay: -0.32s;
}

/* === WIZARD STEP ANIMATIONS === */

.wizard-step {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.5s ease;
}

.wizard-step.active {
    opacity: 1;
    transform: translateX(0);
}

.wizard-step.completed {
    opacity: 0.7;
    transform: translateX(-50px);
}

/* === PANEL ANIMATIONS === */

.panel-enter {
    animation: slideInFromRight 0.6s ease-out forwards;
}

.panel-exit {
    animation: slideInFromLeft 0.6s ease-out forwards;
    animation-direction: reverse;
}

/* === BUTTON ANIMATIONS === */

.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-animated:hover::before {
    left: 100%;
}

/* === RESPONSIVE ANIMATIONS === */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === UTILITY CLASSES === */

.animate-none {
    animation: none !important;
}

.animate-paused {
    animation-play-state: paused;
}

.animate-running {
    animation-play-state: running;
}

.invisible {
    opacity: 0;
    visibility: hidden;
}

.visible {
    opacity: 1;
    visibility: visible;
}

/* === STAGGER ANIMATIONS === */

.stagger-children > * {
    animation-delay: calc(var(--stagger-delay, 0.1s) * var(--index, 0));
}

/* === ENTRANCE ANIMATIONS === */

.entrance-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.entrance-animation.in-view {
    opacity: 1;
    transform: translateY(0);
}