/* Mystical Star Cursor Trail Effect */
.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.9;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    filter: drop-shadow(0 0 6px rgba(147, 51, 234, 0.8));
}

/* Star shape using clip-path */
.cursor-trail::before {
    content: '★';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: #9333ea;
    text-shadow: 
        0 0 10px rgba(147, 51, 234, 0.8),
        0 0 20px rgba(147, 51, 234, 0.6),
        0 0 30px rgba(147, 51, 234, 0.4);
}

.cursor-trail.fading {
    opacity: 0;
    transform: scale(0.3) rotate(180deg);
}

/* Star particle variations */
.cursor-trail.particle-1::before {
    color: #a855f7;
    text-shadow: 
        0 0 10px rgba(168, 85, 247, 0.9),
        0 0 20px rgba(168, 85, 247, 0.6),
        0 0 30px rgba(168, 85, 247, 0.4);
}

.cursor-trail.particle-2::before {
    color: #c084fc;
    text-shadow: 
        0 0 10px rgba(192, 132, 252, 0.9),
        0 0 20px rgba(192, 132, 252, 0.6),
        0 0 30px rgba(192, 132, 252, 0.4);
}

.cursor-trail.particle-3::before {
    color: #ffd700;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.9),
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.4);
}

/* Star sizes */
.cursor-trail.small {
    width: 14px;
    height: 14px;
}

.cursor-trail.small::before {
    font-size: 12px;
}

.cursor-trail.medium {
    width: 20px;
    height: 20px;
}

.cursor-trail.medium::before {
    font-size: 16px;
}

.cursor-trail.large {
    width: 26px;
    height: 26px;
}

.cursor-trail.large::before {
    font-size: 22px;
}

/* Disable trail on mobile devices */
@media (max-width: 768px) {
    .cursor-trail {
        display: none;
    }
}

/* Enhanced sparkle effect when hovering over interactive elements */
body:hover .cursor-trail.hover-effect {
    animation: starSparkle 0.4s ease-in-out infinite alternate;
}

@keyframes starSparkle {
    from {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 6px rgba(147, 51, 234, 0.8));
    }
    to {
        transform: scale(1.4) rotate(20deg);
        filter: drop-shadow(0 0 12px rgba(255, 215, 0, 1)) drop-shadow(0 0 20px rgba(147, 51, 234, 0.8));
    }
}

/* Twinkle animation for some stars */
.cursor-trail.twinkle {
    animation: twinkle 0.3s ease-in-out;
}

@keyframes twinkle {
    0% { transform: scale(1) rotate(0deg); opacity: 0.9; }
    50% { transform: scale(1.5) rotate(15deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
}
