/* Custom Cursor Styles */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999999;
    transform: translate(-50%, -50%);
    display: none;
    /* Hidden by default */
}

/* Hide default cursor when custom is active */
body.cursor-fancy,
body.cursor-glow,
body.cursor-dot,
body.cursor-trailing,
body.cursor-inverted {
    cursor: none;
}

body.cursor-fancy .custom-cursor,
body.cursor-glow .custom-cursor,
body.cursor-dot .custom-cursor,
body.cursor-trailing .custom-cursor,
body.cursor-inverted .custom-cursor {
    display: block;
}

/* Fancy Cursor (Circle with Dot) */
body.cursor-fancy .custom-cursor {
    width: 30px;
    height: 30px;
    border: 2px solid var(--cursor-color, var(--color-primary, #6366f1));
    border-radius: 50%;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body.cursor-fancy .custom-cursor::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: var(--cursor-color, var(--color-primary, #6366f1));
    border-radius: 50%;
}

body.cursor-fancy .custom-cursor.hover {
    width: 50px;
    height: 50px;
    background-color: color-mix(in srgb, var(--cursor-color, #6366f1) 10%, transparent);
    border-color: transparent;
}

/* Glow Cursor */
body.cursor-glow .custom-cursor {
    width: 20px;
    height: 20px;
    background: var(--cursor-color, var(--color-accent, #ec4899));
    border-radius: 50%;
    box-shadow: 0 0 20px var(--cursor-color, var(--color-accent, #ec4899)), 0 0 40px var(--cursor-color, var(--color-accent, #ec4899));
    opacity: 0.8;
    transition: transform 0.1s;
    mix-blend-mode: screen;
}

body.cursor-glow .custom-cursor.hover {
    transform: translate(-50%, -50%) scale(2.5);
    background: white;
    mix-blend-mode: difference;
}

/* Minimal Dot Cursor */
body.cursor-dot .custom-cursor {
    width: 10px;
    height: 10px;
    background: var(--cursor-color, white);
    border-radius: 50%;
    mix-blend-mode: difference;
    transition: transform 0.2s;
}

body.cursor-dot .custom-cursor.hover {
    transform: translate(-50%, -50%) scale(4);
}

/* Trailing Cursor (Soft Ghost) */
body.cursor-trailing .custom-cursor {
    width: 20px;
    height: 20px;
    background: color-mix(in srgb, var(--cursor-color, var(--color-primary, #6366f1)) 50%, transparent);
    border-radius: 50%;
    transition: transform 0.15s cubic-bezier(0.075, 0.82, 0.165, 1);
    /* Smooth lag */
    pointer-events: none;
    backdrop-filter: blur(2px);
}

body.cursor-trailing .custom-cursor.hover {
    width: 40px;
    height: 40px;
    background: color-mix(in srgb, var(--cursor-color, var(--color-primary, #6366f1)) 20%, transparent);
    border: 1px solid var(--cursor-color, var(--color-primary, #6366f1));
}

/* Inverted Cursor (Full Inversion Block) */
body.cursor-inverted .custom-cursor {
    width: 40px;
    height: 40px;
    background: var(--cursor-color, white);
    border-radius: 50%;
    mix-blend-mode: exclusion;
    pointer-events: none;
    transition: transform 0.1s;
}

body.cursor-inverted .custom-cursor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: black;
    border-radius: 50%;
}

body.cursor-inverted .custom-cursor.hover {
    transform: translate(-50%, -50%) scale(1.5);
    border-radius: 12px;
    /* Become square-ish */
}