/* Global custom cursor (triangle) */
body:not(.kids-page),
body:not(.kids-page) a,
body:not(.kids-page) button,
body:not(.kids-page) input,
body:not(.kids-page) select,
body:not(.kids-page) textarea,
body:not(.kids-page) label,
body:not(.kids-page) [role="button"],
body:not(.kids-page) [data-interactive],
.kids-page,
.kids-page a,
.kids-page button,
.kids-page input,
.kids-page select,
.kids-page textarea,
.kids-page label,
.kids-page [role="button"],
.kids-page [data-interactive] {
    cursor: none !important;
}

#cursor {
    position: fixed;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid var(--color-accent);
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%) rotate(0deg);
    transition: transform 0.1s ease;
    will-change: transform;
}

#cursor.hover {
    transform: translate(-50%, -50%) rotate(180deg) scale(1.5);
    border-bottom-color: var(--color-primary);
}

#cursor.active {
    transform: translate(-50%, -50%) rotate(180deg) scale(1.35);
    border-bottom-color: var(--color-primary);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
}

#cursor-trail {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
}

.cursor-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid var(--color-accent);
    opacity: 0.6;
    pointer-events: none;
    animation: triangleFade 0.8s ease-out forwards;
}

@keyframes triangleFade {
    0% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) rotate(360deg);
    }
}

/* Kids page overrides: playful bubble */
.kids-page #cursor {
    width: 28px;
    height: 28px;
    border: 3px solid #16172f;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fffbe8 0%, #ffd166 45%, #ff9f6b 100%);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.1s ease, filter 0.2s ease;
}

.kids-page #cursor::after {
    content: '';
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0.85;
}

.kids-page #cursor.hover {
    transform: translate(-50%, -50%) scale(1.2);
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.18));
    border-bottom-color: #16172f;
}

.kids-page #cursor.active {
    transform: translate(-50%, -50%) scale(1.05);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
    border-bottom-color: #16172f;
}

.kids-page .cursor-triangle {
    display: none;
}

.kids-page .cursor-spark {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff 0%, #79c3ff 50%, #7a5af8 100%);
    opacity: 0.7;
    pointer-events: none;
    animation: sparkFade 0.9s ease-out forwards;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

@keyframes sparkFade {
    0% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.2);
    }
}

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

