/* ===================================
   Animations & Keyframes
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

@keyframes scrollAnimation {
    0% {
        height: 0;
        opacity: 0;
    }

    50% {
        height: 40px;
        opacity: 1;
    }

    100% {
        height: 40px;
        opacity: 0;
    }
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes float {

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

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(57, 255, 20, 0.6);
    }
}

/* Tech Green Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

/* Neon Pulse Glow */
@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.6;
        filter: blur(20px);
    }

    50% {
        opacity: 0.8;
        filter: blur(30px);
    }
}

/* Scan Line Effect */
@keyframes scan-line {
    0% {
        transform: translateY(-100%);
    }

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

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

/* ===================================
   Animation Classes
   =================================== */

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

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

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

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

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

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

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

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

/* ===================================
   Scroll Reveal Animations
   =================================== */

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* ===================================
   Stagger Animations
   =================================== */

.stagger-item {
    opacity: 0;
    transform: translateY(30px);
}

.stagger-item.active {
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-item:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-item:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-item:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-item:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-item:nth-child(6) {
    animation-delay: 0.6s;
}

/* ===================================
   Hover Effects
   =================================== */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
}

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

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

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

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

/* ===================================
   Loading Animations
   =================================== */

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

.loading-dots {
    display: flex;
    gap: 0.5rem;
}

.loading-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) {
    animation-delay: 0s;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* ===================================
   Text Animations
   =================================== */

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-glow {
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--accent-primary);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent;
    }

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

/* ===================================
   Particle Background Animation
   =================================== */

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 2s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 3s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 4s;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 5s;
}

.particle:nth-child(7) {
    left: 70%;
    animation-delay: 0.5s;
}

.particle:nth-child(8) {
    left: 80%;
    animation-delay: 1.5s;
}

.particle:nth-child(9) {
    left: 90%;
    animation-delay: 2.5s;
}

/* ===================================
   Transition Utilities
   =================================== */

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

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

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

/* ===================================
   Page Transition
   =================================== */

.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.page-transition.active {
    opacity: 1;
    pointer-events: all;
}