/* =============================================
   PHISHDESTROY CYBER LAB - Animations
   ============================================= */

/* Scan Line Effect */
@keyframes scan-line {
    0% {
        top: -100%;
    }
    100% {
        top: 100%;
    }
}

.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 255, 255, 0.8), 
        transparent);
    top: -100%;
    animation: scan-line 8s linear infinite;
    pointer-events: none;
}

/* Data Stream */
@keyframes data-stream {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

.data-stream {
    position: fixed;
    font-family: 'Share Tech Mono', monospace;
    color: var(--primary);
    font-size: 12px;
    opacity: 0.1;
    animation: data-stream 10s linear infinite;
}

/* Hexagon Grid */
.hex-grid {
    position: fixed;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
}

.hexagon {
    position: absolute;
    width: 60px;
    height: 60px;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    background: var(--primary);
    animation: hex-pulse 4s ease-in-out infinite;
}

@keyframes hex-pulse {
    0%, 100% {
        opacity: 0.03;
        transform: scale(1);
    }
    50% {
        opacity: 0.08;
        transform: scale(1.1);
    }
}

/* Circuit Path Animation */
.circuit-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: circuit-draw 3s ease-out forwards;
}

@keyframes circuit-draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Cyber Text Effect */
.cyber-text {
    position: relative;
    display: inline-block;
}

.cyber-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--danger);
    z-index: -1;
    filter: blur(3px);
    animation: cyber-text-shadow 2s ease-in-out infinite;
}

@keyframes cyber-text-shadow {
    0%, 100% {
        transform: translate(2px, 2px);
    }
    50% {
        transform: translate(-2px, -2px);
    }
}

/* Neon Glow */
.neon-glow {
    animation: neon-flicker 2s linear infinite;
}

@keyframes neon-flicker {
    0%, 100% {
        text-shadow: 
            0 0 10px var(--primary),
            0 0 20px var(--primary),
            0 0 30px var(--primary),
            0 0 40px var(--primary);
    }
    50% {
        text-shadow: 
            0 0 5px var(--primary),
            0 0 10px var(--primary),
            0 0 15px var(--primary),
            0 0 20px var(--primary);
    }
}

/* Hologram Effect */
.hologram {
    position: relative;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 255, 255, 0.03) 50%,
        transparent 100%
    );
    animation: hologram-scan 2s linear infinite;
}

.hologram::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
}

@keyframes hologram-scan {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 10px;
    }
}

/* Radar Sweep */
.radar {
    position: relative;
    width: 200px;
    height: 200px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    overflow: hidden;
}

.radar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 255, 0.5) 50%,
        transparent 100%
    );
    transform-origin: left center;
    animation: radar-sweep 3s linear infinite;
}

@keyframes radar-sweep {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Binary Rain */
.binary-rain {
    position: fixed;
    font-family: 'Share Tech Mono', monospace;
    color: var(--primary);
    opacity: 0.1;
    font-size: 14px;
    pointer-events: none;
}

.binary-column {
    position: absolute;
    top: -100vh;
    animation: binary-fall linear infinite;
}

@keyframes binary-fall {
    to {
        transform: translateY(200vh);
    }
}

/* Energy Field */
.energy-field {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: energy-pulse 2s ease-in-out infinite;
}

@keyframes energy-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Typing Cursor */
.typing-cursor::after {
    content: '|';
    animation: cursor-blink 1s infinite;
    color: var(--primary);
}

@keyframes cursor-blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Shield Animation */
.shield-effect {
    position: relative;
    overflow: hidden;
}

.shield-effect::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        var(--primary),
        var(--secondary),
        var(--primary)
    );
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    animation: shield-activate 2s ease-in-out infinite;
}

@keyframes shield-activate {
    0%, 100% {
        opacity: 0;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.5;
        transform: scale(1);
    }
}

/* Warning Pulse */
.warning-pulse {
    animation: warning-pulse 1s ease-in-out infinite;
}

@keyframes warning-pulse {
    0%, 100% {
        color: var(--warning);
        transform: scale(1);
    }
    50% {
        color: var(--danger);
        transform: scale(1.05);
    }
}

/* Success Check */
.success-check {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: check-draw 0.5s ease-out forwards;
}

@keyframes check-draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Rotate 3D */
.rotate-3d {
    animation: rotate-3d 20s linear infinite;
}

@keyframes rotate-3d {
    0% {
        transform: perspective(1000px) rotateY(0deg);
    }
    100% {
        transform: perspective(1000px) rotateY(360deg);
    }
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* Zoom Animations */
@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes zoomOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0);
        opacity: 0;
    }
}

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

.shake {
    animation: shake 0.5s;
}

/* Glow Lines */
.glow-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary),
        transparent
    );
    animation: glow-line-move 3s linear infinite;
}

@keyframes glow-line-move {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: ripple-effect 1s ease-out;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Spin Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 2s linear infinite;
}

/* Pulse Shadow */
@keyframes pulse-shadow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 255, 255, 0.8);
    }
}

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