/* CyBEARSec Animation Styles */

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 255, 65, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 255, 65, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 255, 65, 0);
    }
}

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

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        text-shadow:
            0 0 5px rgba(0, 255, 65, 0.5),
            0 0 10px rgba(0, 255, 65, 0.5),
            0 0 15px rgba(0, 255, 65, 0.5);
    }
    50% {
        text-shadow:
            0 0 10px rgba(0, 255, 65, 0.8),
            0 0 20px rgba(0, 255, 65, 0.8),
            0 0 30px rgba(0, 255, 65, 0.8);
    }
}

/* Scan Line Animation - Disabled per user request
@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100vh);
    }
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: 9999;
}
*/

/* Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCaret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary-color);
    }
}

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

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

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

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

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Fade Classes */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.fade-in-delay-1 {
    animation: fadeIn 0.5s ease 0.1s forwards;
    opacity: 0;
}

.fade-in-delay-2 {
    animation: fadeIn 0.5s ease 0.2s forwards;
    opacity: 0;
}

.fade-in-delay-3 {
    animation: fadeIn 0.5s ease 0.3s forwards;
    opacity: 0;
}

/* Hover Effects */
.hover-glow:hover {
    animation: glow 1s ease-in-out infinite;
}

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

.hover-pulse:hover {
    animation: pulse 1s infinite;
}

/* Loading Animation */
.loader {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-sizing: border-box;
    animation: rotate 1s linear infinite;
}

.loader::after {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-bottom-color: var(--primary-color);
}

/* Particle Effect */
@keyframes particle-float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

.particle {
    position: fixed;
    pointer-events: none;
    opacity: 0;
    animation: particle-float 10s linear infinite;
}

/* Glitch Text Effect */
@keyframes glitchText {
    0% {
        text-shadow:
            0.05em 0 0 rgba(255, 0, 0, 0.75),
            -0.05em -0.025em 0 rgba(0, 255, 0, 0.75),
            0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    }
    14% {
        text-shadow:
            0.05em 0 0 rgba(255, 0, 0, 0.75),
            -0.05em -0.025em 0 rgba(0, 255, 0, 0.75),
            0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    }
    15% {
        text-shadow:
            -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
            0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
            -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    49% {
        text-shadow:
            -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
            0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
            -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    50% {
        text-shadow:
            0.025em 0.05em 0 rgba(255, 0, 0, 0.75),
            0.05em 0 0 rgba(0, 255, 0, 0.75),
            0 -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    99% {
        text-shadow:
            0.025em 0.05em 0 rgba(255, 0, 0, 0.75),
            0.05em 0 0 rgba(0, 255, 0, 0.75),
            0 -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    100% {
        text-shadow:
            -0.025em 0 0 rgba(255, 0, 0, 0.75),
            -0.025em -0.025em 0 rgba(0, 255, 0, 0.75),
            -0.025em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
}

/* Circuit Animation */
@keyframes circuit {
    0% {
        stroke-dashoffset: 1000;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.circuit-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: circuit 3s linear forwards;
}

/* Radar Sweep */
@keyframes radar-sweep {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.radar {
    position: relative;
    width: 200px;
    height: 200px;
}

.radar::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color));
    transform-origin: left center;
    animation: radar-sweep 4s linear infinite;
}

/* Data Stream Effect */
@keyframes dataStream {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

.data-stream {
    position: absolute;
    width: 2px;
    height: 20px;
    background: var(--primary-color);
    animation: dataStream 2s linear infinite;
}

/* Neon Flicker */
@keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow:
            0 0 4px #fff,
            0 0 10px #fff,
            0 0 18px #fff,
            0 0 38px var(--primary-color),
            0 0 73px var(--primary-color),
            0 0 80px var(--primary-color),
            0 0 94px var(--primary-color),
            0 0 140px var(--primary-color);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

.neon-text {
    animation: neon-flicker 1.5s infinite alternate;
}

/* Hacking Animation Styles */
.hacking-animation {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hacker-container {
    position: absolute;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

.hacker-icon {
    position: relative;
    font-size: 60px;
    color: var(--primary-color);
    animation: float 3s ease-in-out infinite;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: pulse-expand 2s ease-out infinite;
}

@keyframes pulse-expand {
    0% {
        width: 60px;
        height: 60px;
        opacity: 1;
    }
    100% {
        width: 150px;
        height: 150px;
        opacity: 0;
    }
}

.target-buildings {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.building {
    position: relative;
    font-size: 40px;
    color: var(--secondary-color);
    animation: building-glow 3s ease-in-out infinite;
}

.building i {
    position: relative;
    z-index: 2;
}

.scan-effect {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    opacity: 0;
    animation: scan-pulse 3s ease-in-out infinite;
}

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

.breach-indicator {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--primary-color);
    font-family: monospace;
    white-space: nowrap;
    opacity: 0;
    animation: breach-flash 3s ease-in-out infinite;
}

@keyframes breach-flash {
    0%, 40%, 100% {
        opacity: 0;
    }
    50%, 90% {
        opacity: 1;
    }
}

.building-1 .breach-indicator {
    animation-delay: 0s;
}

.building-2 .breach-indicator {
    animation-delay: 1s;
}

.building-3 .breach-indicator {
    animation-delay: 2s;
}

/* Laser Beam Animations */
.laser-beams {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    width: 300px;
    height: 200px;
}

.laser {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg,
        var(--primary-color) 0%,
        transparent 50%,
        var(--primary-color) 100%);
    transform-origin: left center;
    opacity: 0;
    animation: laser-shoot 3s ease-in-out infinite;
}

.laser::before {
    content: '';
    position: absolute;
    left: 0;
    top: -2px;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
}

.laser-1 {
    top: 50%;
    width: 250px;
    transform: rotate(-20deg);
    animation-delay: 0s;
}

.laser-2 {
    top: 50%;
    width: 250px;
    transform: rotate(0deg);
    animation-delay: 1s;
}

.laser-3 {
    top: 50%;
    width: 250px;
    transform: rotate(20deg);
    animation-delay: 2s;
}

@keyframes laser-shoot {
    0% {
        opacity: 0;
        width: 0;
    }
    20% {
        opacity: 1;
        width: 250px;
    }
    40% {
        opacity: 0.5;
        width: 250px;
    }
    60% {
        opacity: 1;
        width: 250px;
    }
    80% {
        opacity: 0;
        width: 0;
    }
    100% {
        opacity: 0;
        width: 0;
    }
}

/* Data Stream Effect */
.data-stream {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.data-packet {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    animation: data-flow 4s linear infinite;
}

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

.data-packet:nth-child(2) {
    left: 10%;
    animation-delay: 1.3s;
}

.data-packet:nth-child(3) {
    left: 10%;
    animation-delay: 2.6s;
}

@keyframes data-flow {
    0% {
        left: 10%;
        top: 50%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
        left: 85%;
        top: 30%;
    }
    100% {
        left: 90%;
        top: 25%;
        opacity: 0;
    }
}

@keyframes building-glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px var(--secondary-color));
    }
    50% {
        filter: drop-shadow(0 0 20px var(--primary-color));
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hacking-animation {
        height: 300px;
    }

    .hacker-icon {
        font-size: 40px;
    }

    .building {
        font-size: 30px;
    }

    .target-buildings {
        gap: 40px;
    }

    .laser {
        width: 150px !important;
    }
}