/* Network Packet Cursor Trail - CSP Compliant */
/* Unique mouse trail for PQCrypta Proxy - Network themed */

.network-cursor-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999999;
    overflow: hidden;
}

.network-cursor-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Custom network cursor */
.network-cursor {
    position: fixed;
    display: block !important;
    width: 56px;
    height: 56px;
    pointer-events: none;
    z-index: 9999999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.network-cursor.active {
    opacity: 1;
}

/* Cursor core - Packet node */
.network-cursor-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #00ff88 0%, #00b4d8 50%, #0077b6 100%);
    border-radius: 3px;
    box-shadow:
        0 0 10px rgba(0, 255, 136, 1),
        0 0 25px rgba(0, 180, 216, 0.8),
        0 0 40px rgba(0, 255, 136, 0.5);
    animation: networkNodePulse 1.5s ease-in-out infinite;
}

@keyframes networkNodePulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        box-shadow:
            0 0 10px rgba(0, 255, 136, 1),
            0 0 25px rgba(0, 180, 216, 0.8);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3) rotate(45deg);
        box-shadow:
            0 0 15px rgba(0, 255, 136, 1),
            0 0 35px rgba(0, 180, 216, 1),
            0 0 50px rgba(0, 255, 136, 0.6);
    }
}

/* Outer hexagon ring - network node style */
.network-cursor-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(0, 180, 216, 0.8);
    border-radius: 6px;
    animation: networkRingRotate 4s linear infinite;
    box-shadow:
        0 0 8px rgba(0, 180, 216, 0.6),
        inset 0 0 8px rgba(0, 255, 136, 0.2);
}

/* Connection dots on the ring */
.network-cursor-ring::before,
.network-cursor-ring::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 255, 136, 1);
}

.network-cursor-ring::before {
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
}

.network-cursor-ring::after {
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes networkRingRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Data flow indicators */
.network-cursor-flow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%);
    border: 1px dashed rgba(0, 255, 136, 0.4);
    border-radius: 50%;
    animation: networkFlowPulse 2s ease-out infinite;
}

@keyframes networkFlowPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Hide default cursor when custom cursor is active */
body.network-cursor-active {
    cursor: none !important;
}

body.network-cursor-active * {
    cursor: none !important;
}

body.network-cursor-active a,
body.network-cursor-active button,
body.network-cursor-active input,
body.network-cursor-active textarea,
body.network-cursor-active select,
body.network-cursor-active [role="button"],
body.network-cursor-active [onclick],
body.network-cursor-active .tab-btn,
body.network-cursor-active .footer-link,
body.network-cursor-active .logo-link {
    cursor: none !important;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .network-cursor-core,
    .network-cursor-ring,
    .network-cursor-flow {
        animation: none;
    }

    body.network-cursor-active {
        cursor: auto;
    }

    body.network-cursor-active * {
        cursor: auto;
    }

    .network-cursor {
        display: none;
    }
}

/* Mobile - disable custom cursor */
@media (max-width: 768px), (pointer: coarse) {
    .network-cursor-container {
        display: none;
    }

    .network-cursor {
        display: none;
    }

    body.network-cursor-active,
    body.network-cursor-active * {
        cursor: auto;
    }
}
