/* ========================================
   MAGIC SPELL CURSOR - WORKING VERSION
   ======================================== */

/* Hide default cursor */
* {
    cursor: none !important;
}

/* Custom Cursor Container */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 99999999 !important;  /* 👈 Increased z-index */
    transform: translate(-50%, -50%);
    transition: none;
}

.cursor-wand {
    display: block;
    font-size: 24px;
    line-height: 1;
    color: #ffd700;
    text-shadow: 
        0 0 10px #ffd700,
        0 0 20px #d4af37,
        0 0 30px #d4af37;
    animation: wandFloat 2s ease-in-out infinite;
}

/* Wand floating animation */
@keyframes wandFloat {
    0%, 100% { transform: translateY(0px) rotate(-20deg); }
    50% { transform: translateY(-3px) rotate(-25deg); }
}

/* Cursor glow on hover */
.custom-cursor.hovering .cursor-wand {
    font-size: 28px;
    color: #ffd700;
    text-shadow: 
        0 0 20px #ffd700,
        0 0 40px #d4af37,
        0 0 60px #d4af37;
    animation: wandPulse 0.5s ease-in-out infinite;
}

@keyframes wandPulse {
    0%, 100% { transform: scale(1) rotate(-20deg); }
    50% { transform: scale(1.2) rotate(-15deg); }
}

/* Clicking effect */
.custom-cursor.clicking .cursor-wand {
    transform: scale(1.5) rotate(45deg);
    text-shadow: 
        0 0 30px #ffd700,
        0 0 60px #ffd700,
        0 0 90px #d4af37;
}

/* Sparkle particles */
/* Particles */
.cursor-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #d4af37;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999998 !important;  /* 👈 Increased z-index */
    box-shadow: 0 0 10px #d4af37, 0 0 20px #ffd700;
    animation: particleFade 1s ease-out forwards;
}

@keyframes particleFade {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

/* Click burst particles */
.cursor-particle.burst {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ffd700, #d4af37);
    animation: burstFade 0.8s ease-out forwards;
}

@keyframes burstFade {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0) rotate(360deg);
    }
}

/* Mobile - Show default cursor */
@media (max-width: 768px), (pointer: coarse) {
    * {
        cursor: auto !important;
    }
    
    .custom-cursor {
        display: none !important;
    }
}