/* Lightning Cursor Effect CSS */
/* AppWT LLC Lightning Brand Cursor System */

/* Lightning Canvas */
#lightning-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
}

/* Particle System */
.particle {
    position: fixed;
    pointer-events: none;
    opacity: 0;
    z-index: 2;
}

.particle.orange {
    width: 4px;
    height: 4px;
    background: #FFA500;
    border-radius: 50%;
    box-shadow: 0 0 10px #FFA500, 0 0 20px #FFA500;
}

.particle.blue {
    width: 4px;
    height: 4px;
    background: #00BFFF;
    border-radius: 50%;
    box-shadow: 0 0 10px #00BFFF, 0 0 20px #00BFFF;
}

@keyframes particleFade {
    0% { opacity: 0; transform: translate(0, 0) scale(0); }
    50% { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(1); }
    100% { opacity: 0; transform: translate(calc(var(--dx) * 2), calc(var(--dy) * 2)) scale(0); }
}

/* Hide default cursor on desktop only */
@media (hover: hover) and (pointer: fine) {
    body * {
        cursor: none !important;
    }
}

/* Custom cursor orb */
.cursor-orb {
    position: fixed;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.cursor-core {
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0, 255, 255, 0.8) 0%, rgba(0, 255, 255, 0.4) 50%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8), inset 0 0 10px rgba(255, 255, 255, 0.5);
}

.cursor-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid;
    animation: rotateRing 2s linear infinite;
}

.cursor-ring.orange {
    width: 100%;
    height: 100%;
    border-color: #FFA500;
    box-shadow: 0 0 10px #FFA500, inset 0 0 10px #FFA500;
}

.cursor-ring.blue {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-color: #00BFFF;
    box-shadow: 0 0 10px #00BFFF, inset 0 0 10px #00BFFF;
    animation-direction: reverse;
    animation-duration: 1.5s;
}

@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Cursor trail effect */
.cursor-trail {
    position: fixed;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.6) 0%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: fadeTrail 1s ease-out forwards;
}

/* Hide lightning when hovering links */
a:hover ~ #lightning-canvas {
    opacity: 0;
    transition: all 0.3s ease;
}

/* Calm cursor orb when hovering links */
body:has(a:hover) .cursor-orb .cursor-ring {
    animation-duration: 4s !important;
    opacity: 0.6;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

body:has(a:hover) .cursor-orb .cursor-core {
    background: radial-gradient(circle, rgba(212, 175, 55, 0.6) 0%, rgba(212, 175, 55, 0.3) 50%, transparent 100%);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.6), inset 0 0 8px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

/* Fallback for browsers that don't support :has() */
@supports not selector(:has(*)) {
    a:hover {
        filter: brightness(1.2);
        transition: all 0.3s ease;
    }
}

@keyframes fadeTrail {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.2);
    }
}

/* Mobile: Show default cursor, hide custom effects */
@media (max-width: 768px) {
    /* Hide lightning canvas on mobile */
    #lightning-canvas {
        opacity: 0 !important;
    }
    
    /* Hide custom cursor orb on mobile */
    .cursor-orb {
        display: none !important;
    }
    
    /* Show default cursor on mobile */
    body * {
        cursor: auto !important;
    }
}