/* ========== HACKING EFFECTS ========== */

/* Terminal Cursor Blink */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-cursor::after {
    content: '_';
    animation: blink 1s infinite;
    color: #00ff00;
}

/* Glitch Effect */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.glitch-text {
    position: relative;
    animation: glitch 0.3s infinite;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 #00ffff, 2px 2px #ff00ff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    20% { clip: rect(54px, 9999px, 66px, 0); }
    40% { clip: rect(28px, 9999px, 98px, 0); }
    60% { clip: rect(67px, 9999px, 34px, 0); }
    80% { clip: rect(12px, 9999px, 87px, 0); }
    100% { clip: rect(45px, 9999px, 23px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    20% { clip: rect(14px, 9999px, 33px, 0); }
    40% { clip: rect(78px, 9999px, 4px, 0); }
    60% { clip: rect(9px, 9999px, 95px, 0); }
    80% { clip: rect(43px, 9999px, 27px, 0); }
    100% { clip: rect(2px, 9999px, 60px, 0); }
}

/* Data Stream Effect */
.data-stream {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.data-stream-line {
    position: absolute;
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #00ff00, transparent);
    opacity: 0.3;
    animation: stream-fall linear infinite;
}

@keyframes stream-fall {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Hacking Particles */
.hacking-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 6px #00ff00;
    animation: particle-float 10s infinite;
}

@keyframes particle-float {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(100px, -100px) scale(1);
        opacity: 0;
    }
}

/* Neon Glow Effects */
.neon-glow {
    text-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 15px currentColor,
        0 0 20px currentColor;
    animation: neon-pulse 2s ease-in-out infinite alternate;
}

@keyframes neon-pulse {
    from {
        text-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 15px currentColor,
            0 0 20px currentColor;
    }
    to {
        text-shadow: 
            0 0 2px currentColor,
            0 0 5px currentColor,
            0 0 8px currentColor,
            0 0 12px currentColor,
            0 0 18px currentColor,
            0 0 25px currentColor;
    }
}

/* Terminal Typing Effect */
.typing-effect::after {
    content: '|';
    animation: blink 1s infinite;
    color: #00ff00;
}

/* Hacking Scan Lines */
.hacking-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    animation: scanline-move 8s linear infinite;
}

@keyframes scanline-move {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Code Rain Effect */
.code-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.code-column {
    position: absolute;
    top: -100%;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    white-space: nowrap;
    animation: code-fall linear infinite;
}

@keyframes code-fall {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Hacking Button Effects */
.hack-button {
    position: relative;
    overflow: hidden;
}

.hack-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.hack-button:hover::before {
    width: 300px;
    height: 300px;
}

.hack-button:hover {
    box-shadow: 
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 30px currentColor;
}

/* Terminal Window Glow */
.terminal-glow {
    box-shadow: 
        0 0 5px #00ff00,
        0 0 10px #00ff00,
        inset 0 0 5px rgba(0, 255, 0, 0.2);
    animation: terminal-pulse 2s ease-in-out infinite;
}

@keyframes terminal-pulse {
    0%, 100% {
        box-shadow: 
            0 0 5px #00ff00,
            0 0 10px #00ff00,
            inset 0 0 5px rgba(0, 255, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 0 10px #00ff00,
            0 0 20px #00ff00,
            0 0 30px #00ff00,
            inset 0 0 10px rgba(0, 255, 0, 0.3);
    }
}

/* Hacking Border Animation */
.hacking-border {
    position: relative;
    border: 2px solid #00ff00;
}

.hacking-border::before,
.hacking-border::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #00ff00;
}

.hacking-border::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    animation: corner-glow 2s ease-in-out infinite;
}

.hacking-border::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    animation: corner-glow 2s ease-in-out infinite;
}

@keyframes corner-glow {
    0%, 100% {
        box-shadow: 0 0 5px #00ff00;
    }
    50% {
        box-shadow: 0 0 15px #00ff00, 0 0 25px #00ff00;
    }
}

/* Matrix Digital Rain */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    line-height: 1.5;
    animation: matrix-fall linear infinite;
}

@keyframes matrix-fall {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}
