/* ==========================================
   FARMSPHERICA NEXUS - ANIMATION MECHANICS
   ========================================== */

/* 1. GLOWING BUTTON & CARD HOVER EFFECTS */
button, .action-btn, .modal-btn, .new-chat-btn, .feature-card, .pricing-card, .grid-item, .card {
    transition: all 0.3s cubic-bezier(0.1, 1, 0.1, 1) !important;
}

button:hover, .action-btn:hover, .modal-btn:hover, .new-chat-btn:hover, .feature-card:hover, .pricing-card:hover, .grid-item:hover, .card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px var(--accent-green, #00ff88);
    border-color: var(--accent-green, #00ff88);
    z-index: 2;
}

/* 2. HUD ELEMENT ENTRANCE FADE-INS */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.1, 1, 0.1, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* 3. TYPING STYLES & CURSOR BLINK PROTOCOLS (Terminal) */
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typing-cursor {
    display: inline-block;
    width: 8px;
    height: 18px;
    background-color: var(--accent-blue, #00d2ff);
    animation: cursorBlink 0.8s steps(1) infinite;
    vertical-align: middle;
    margin-left: 4px;
}

/* 4. SYSTEM REBOOT FLASH TIMELINE (Terminal) */
@keyframes crtBoot {
    0% {
        opacity: 0;
        filter: brightness(3) contrast(2) sepia(1) hue-rotate(90deg);
        transform: scaleY(0.01) scaleX(0);
    }
    15% {
        opacity: 1;
        filter: brightness(2);
        transform: scaleY(0.01) scaleX(1);
    }
    30% {
        filter: brightness(1) contrast(1.5);
        transform: scaleY(1) scaleX(1);
    }
    60% {
        opacity: 0.9;
    }
    80% {
        opacity: 1;
        filter: brightness(1.2);
    }
    100% {
        opacity: 1;
        filter: brightness(1);
        transform: scale(1);
    }
}

.crt-boot {
    animation: crtBoot 0.4s cubic-bezier(0.1, 1, 0.1, 1) forwards;
}

/* 5. EASTER EGG MATRIX OVERRIDE */
@keyframes glitchShake {
    0% { transform: translate(2px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(0px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(2px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(2px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.glitch-shake {
    animation: glitchShake 0.3s cubic-bezier(.36,.07,.19,.97) both infinite;
}

.invert-colors {
    filter: invert(100%) hue-rotate(180deg) contrast(1.5);
    background-color: #fff;
}

.matrix-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 0, 0, 0.2);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    box-shadow: inset 0 0 100px rgba(255, 0, 0, 0.8);
}

.matrix-overlay h1 {
    font-size: 3rem;
    color: red;
    text-shadow: 0 0 20px red;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    animation: cursorBlink 0.2s infinite;
}
