/* Hacker-style animations and effects for NEURO UPLINK 5.0 */
/* Modern, cyberpunk, captivating animations */

/* ===== HACKER/TECH BACKGROUND EFFECTS ===== */

/* Binary rain (classic hacker effect) */
@keyframes binary-rain {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(1000%);
        opacity: 0;
    }
}

.binary-rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.binary-digit {
    position: absolute;
    color: rgba(0, 240, 255, 0.7);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.9);
    animation: binary-rain linear infinite;
}

/* Matrix digital rain (green version) */
@keyframes matrix-rain {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translateY(1000%);
        opacity: 0;
    }
}

.matrix-rain {
    color: #00FF41; /* Matrix green */
    text-shadow: 0 0 10px #00FF41;
}

/* Circuit board grid animation */
.circuit-bg {
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 25% 25%, rgba(123, 44, 191, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 158, 0, 0.1) 0%, transparent 50%);
    background-size: 60px 60px, 60px 60px, 300px 300px, 300px 300px;
    animation: circuit-pulse 20s ease-in-out infinite;
}

@keyframes circuit-pulse {
    0%, 100% {
        background-position: 0 0, 0 0, 25% 25%, 75% 75%;
        opacity: 0.7;
    }
    50% {
        background-position: 30px 30px, 30px 30px, 30% 30%, 80% 80%;
        opacity: 1;
    }
}

/* ===== ROBOT/DRONE ANIMATIONS ===== */

/* Flying drone animation */
@keyframes drone-float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -15px) rotate(5deg);
    }
    50% {
        transform: translate(0, -25px) rotate(0deg);
    }
    75% {
        transform: translate(-20px, -15px) rotate(-5deg);
    }
}

.drone {
    position: relative;
    animation: drone-float 8s ease-in-out infinite;
}

.drone::before, .drone::after {
    content: '';
    position: absolute;
    background: rgba(0, 240, 255, 0.3);
    border-radius: 50%;
}

.drone::before {
    width: 100%;
    height: 100%;
    animation: drone-glow 2s ease-in-out infinite;
}

.drone::after {
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    animation: drone-glow 3s ease-in-out infinite 0.5s;
}

@keyframes drone-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 240, 255, 0.6);
        transform: scale(1.1);
    }
}

/* Robot eye scanning animation */
@keyframes eye-scan {
    0% {
        transform: translateX(-100%) scaleX(0.3);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) scaleX(0.3);
        opacity: 0;
    }
}

.robot-eye {
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    background: #111;
}

.robot-eye::after {
    content: '';
    position: absolute;
    top: 25%;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 240, 255, 0.8), 
        rgba(123, 44, 191, 0.8), 
        rgba(255, 158, 0, 0.8),
        transparent);
    animation: eye-scan 3s linear infinite;
}

/* ===== HACKER TERMINAL EFFECTS ===== */

/* Typing terminal cursor */
@keyframes terminal-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background-color: #00FF41;
    vertical-align: middle;
    margin-left: 2px;
    animation: terminal-blink 1s infinite;
    box-shadow: 0 0 10px #00FF41;
}

/* Command line typing animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.terminal-typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #00FF41;
    animation: typing 3.5s steps(40, end), terminal-blink 1s step-end infinite;
    font-family: 'Courier New', monospace;
}

/* Data stream animation (falling characters) */
@keyframes data-stream {
    0% {
        transform: translateY(-100%) rotateX(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(1000%) rotateX(360deg);
        opacity: 0;
    }
}

.data-stream-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.data-char {
    position: absolute;
    color: rgba(0, 240, 255, 0.8);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 18px;
    animation: data-stream linear infinite;
    text-shadow: 0 0 10px currentColor;
}

/* ===== MODERN TECH UI ELEMENTS ===== */

/* Holographic projection effect */
.hologram {
    position: relative;
    background: transparent;
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2),
                inset 0 0 30px rgba(0, 240, 255, 0.1);
}

.hologram::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #00F0FF, #7B2CBF, #FF9E00, 
        #00F0FF, #7B2CBF, #FF9E00);
    background-size: 400% 400%;
    z-index: -1;
    border-radius: inherit;
    animation: hologram-glow 3s ease infinite;
    opacity: 0.5;
    filter: blur(10px);
}

@keyframes hologram-glow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Neural network connections */
.neural-network {
    position: relative;
}

.neural-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #00F0FF;
    border-radius: 50%;
    box-shadow: 0 0 15px #00F0FF;
    animation: node-pulse 2s ease-in-out infinite;
}

.neural-connection {
    position: absolute;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 240, 255, 0.6), 
        transparent);
    height: 2px;
    transform-origin: left center;
    animation: connection-flow 3s linear infinite;
}

@keyframes node-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 15px #00F0FF;
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 25px #00F0FF;
    }
}

@keyframes connection-flow {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ===== CYBERPUNK BUTTONS AND CONTROLS ===== */

/* Cyber button with scanning effect */
.cyber-button {
    position: relative;
    background: rgba(10, 10, 20, 0.8);
    border: 2px solid #00F0FF;
    color: #00F0FF;
    padding: 12px 24px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.cyber-button:hover::before {
    left: 100%;
}

.cyber-button:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
    transform: translateY(-2px);
}

/* Tech slider with glowing track */
.tech-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
}

.tech-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: #00F0FF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 20px #00F0FF;
    transition: all 0.3s ease;
}

.tech-slider::-webkit-slider-thumb:hover {
    background: #7B2CBF;
    box-shadow: 0 0 30px #7B2CBF;
    transform: scale(1.2);
}

/* ===== PARTICLE AND ENERGY EFFECTS ===== */

/* Energy orb animation */
@keyframes energy-orb {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 30px rgba(0, 240, 255, 0.5),
                    inset 0 0 30px rgba(0, 240, 255, 0.3);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        box-shadow: 0 0 50px rgba(0, 240, 255, 0.8),
                    inset 0 0 50px rgba(0, 240, 255, 0.5);
    }
}

.energy-orb {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(0, 240, 255, 0.8) 0%,
        rgba(123, 44, 191, 0.6) 50%,
        transparent 70%);
    animation: energy-orb 4s ease-in-out infinite;
}

/* Particle explosion */
@keyframes particle-explosion {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(3) rotate(360deg);
        opacity: 0;
    }
}

.particle-explosion {
    position: relative;
    width: 1px;
    height: 1px;
}

.particle-explosion span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00F0FF;
    border-radius: 50%;
    animation: particle-explosion 1s ease-out forwards;
}

/* ===== SCAN LINES (CRT monitor effect) ===== */
@keyframes scanlines {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 20px;
    }
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 240, 255, 0.03) 50%
    );
    background-size: 100% 4px;
    animation: scanlines 8s linear infinite;
    opacity: 0.3;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .binary-digit, .data-char {
        font-size: 10px;
    }
    
    .energy-orb {
        width: 60px;
        height: 60px;
    }
}

/* ===== UTILITY CLASSES ===== */
.hacker-text {
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px currentColor;
    letter-spacing: 1px;
}

.glow-text {
    text-shadow: 0 0 10px currentColor,
                 0 0 20px currentColor,
                 0 0 30px currentColor;
}

.cyber-border {
    border: 1px solid;
    border-image: linear-gradient(45deg, #00F0FF, #7B2CBF, #FF9E00) 1;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .binary-digit, .data-char, .drone, .robot-eye::after,
    .terminal-cursor, .terminal-typing, .hologram::before,
    .neural-node, .neural-connection, .energy-orb,
    .scanlines, .particle-explosion span {
        animation: none !important;
    }
}