/* PQCrypta Proxy Control Plane - 3D Interactive Cursor CSS */
/* CSP Compliant - No inline styles */

/* ── Canvas / container ── */
.plane-cursor-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999990;
    overflow: hidden;
}

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

/* ── Cursor wrapper ── */
.plane-cursor {
    position: fixed;
    width: 52px;
    height: 52px;
    pointer-events: none;
    z-index: 9999999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

/* ── Core: glowing diamond / proxy node ── */
.plane-cursor-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: radial-gradient(circle, #93c5fd 0%, #3b82f6 50%, #1d4ed8 100%);
    box-shadow:
        0 0 10px rgba(59, 130, 246, 1),
        0 0 24px rgba(59, 130, 246, 0.8),
        0 0 42px rgba(6, 182, 212, 0.4);
    animation: planeCoreRotate 3s linear infinite, planeCorePulse 1.6s ease-in-out infinite;
}

@keyframes planeCoreRotate {
    from { transform: translate(-50%, -50%) rotate(45deg); }
    to   { transform: translate(-50%, -50%) rotate(405deg); }
}

@keyframes planeCorePulse {
    0%, 100% {
        box-shadow:
            0 0 10px rgba(59, 130, 246, 1),
            0 0 24px rgba(59, 130, 246, 0.8);
    }
    50% {
        box-shadow:
            0 0 16px rgba(59, 130, 246, 1),
            0 0 36px rgba(59, 130, 246, 1),
            0 0 58px rgba(6, 182, 212, 0.6);
    }
}

/* ── Ring: rotating square frame (network packet outline) ── */
.plane-cursor-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%);
    border: 1.5px solid rgba(59, 130, 246, 0.75);
    border-top-color: transparent;
    border-bottom-color: transparent;
    border-radius: 5px;
    animation: planeRingRotate 2.4s linear infinite;
    box-shadow:
        0 0 6px rgba(59, 130, 246, 0.4),
        inset 0 0 6px rgba(6, 182, 212, 0.08);
}

.plane-cursor-ring::before,
.plane-cursor-ring::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: #06b6d4;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(6, 182, 212, 1);
}

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

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

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

/* ── Arc: outer pulsing orbit ── */
.plane-cursor-arc {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    transform: translate(-50%, -50%);
    border: 1px dashed rgba(139, 92, 246, 0.4);
    border-radius: 50%;
    animation: planeArcPulse 2s ease-out infinite;
}

@keyframes planeArcPulse {
    0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.65; }
    100% { transform: translate(-50%, -50%) scale(2.1); opacity: 0; }
}

/* ── Centre dot: sharp aiming point ── */
.plane-cursor-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    transform: translate(-50%, -50%);
    background: #e0f2fe;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(224, 242, 254, 0.9);
}

/* ── Hide default cursor when active ── */
body.plane-cursor-body {
    cursor: none !important;
}

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

body.plane-cursor-body a,
body.plane-cursor-body button,
body.plane-cursor-body input,
body.plane-cursor-body textarea,
body.plane-cursor-body select,
body.plane-cursor-body [role="button"],
body.plane-cursor-body .tab-btn,
body.plane-cursor-body .cp-nav-card,
body.plane-cursor-body .section-title-bar {
    cursor: none !important;
}

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

    body.plane-cursor-body,
    body.plane-cursor-body * {
        cursor: auto !important;
    }
}
