/* ========================================
   CUSTOM CURSOR
   ======================================== */

/* Hide default cursor */
body {
    cursor: none;
}

body * {
    cursor: none !important;
}

/* Custom Cursor Container */
#custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

/* Cursor Core */
.cursor-core {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.1s ease;
}

/* Cursor Glow */
.cursor-glow {
    position: absolute;
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.15s ease;
}

/* Hover Effect on Interactive Elements */
a:hover ~ #custom-cursor .cursor-core,
button:hover ~ #custom-cursor .cursor-core {
    transform: translate(-50%, -50%) scale(1.5);
    background: #64c8ff;
}

a:hover ~ #custom-cursor .cursor-glow,
button:hover ~ #custom-cursor .cursor-glow {
    transform: translate(-50%, -50%) scale(1.5);
    border-color: #64c8ff;
}

/* Cursor Trail Container */
#cursor-trail-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Trail Particles */
.cursor-trail {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(100, 200, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: trailFade 0.8s ease-out forwards;
}

@keyframes trailFade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* Click Ripple Effect */
.cursor-ripple {
    position: absolute;
    border: 2px solid rgba(100, 200, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: rippleExpand 0.6s ease-out forwards;
}

@keyframes rippleExpand {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
    }
    100% {
        width: 50px;
        height: 50px;
        opacity: 0;
    }
}

/* Disable custom cursor on mobile */
@media (max-width: 768px), (hover: none) {
    body, body * {
        cursor: auto !important;
    }
    
    #custom-cursor,
    #cursor-trail-container {
        display: none !important;
    }
}