/* ========================================
   CURSOR MÁGICO - MAVICO
   ======================================== */

/* Ocultar cursor por defecto */
* {
    cursor: none !important;
}

/* Cursor Principal */
.magic-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-acento);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
}

/* Cursor Interno */
.magic-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--color-acento);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
}

/* Cursor Hover - Elementos Clickeables */
.magic-cursor.hover {
    width: 40px;
    height: 40px;
    background: rgba(244, 180, 0, 0.2);
    border-color: var(--color-primario);
}

.magic-cursor.hover .magic-cursor-dot {
    transform: translate(-50%, -50%) scale(1.5);
    background: var(--color-primario);
}

/* Cursor Active - Click */
.magic-cursor.active {
    width: 15px;
    height: 15px;
    background: var(--color-acento);
}

/* Trail Effect */
.cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background: rgba(197, 154, 47, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    animation: trail-fade 0.5s ease forwards;
}

@keyframes trail-fade {
    to {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
}

/* Sparkles Effect */
.cursor-sparkle {
    position: fixed;
    width: 8px;
    height: 8px;
    pointer-events: none;
    z-index: 99998;
    animation: sparkle-animation 0.6s ease forwards;
}

.cursor-sparkle::before,
.cursor-sparkle::after {
    content: '';
    position: absolute;
    background: var(--color-acento);
}

.cursor-sparkle::before {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.cursor-sparkle::after {
    width: 2px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

@keyframes sparkle-animation {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5) rotate(180deg);
        opacity: 0;
    }
}

/* Ripple Effect on Click */
.cursor-ripple {
    position: fixed;
    border: 2px solid var(--color-acento);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99997;
    animation: ripple-expand 0.6s ease forwards;
}

@keyframes ripple-expand {
    to {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

/* Wave Effect */
.cursor-wave {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 2px solid rgba(197, 154, 47, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99996;
    animation: wave-expand 1s ease forwards;
}

@keyframes wave-expand {
    to {
        width: 150px;
        height: 150px;
        opacity: 0;
    }
}

/* Desactivar en mobile */
@media (max-width: 900px), (hover: none) {
    * {
        cursor: auto !important;
    }
    
    .magic-cursor,
    .magic-cursor-dot,
    .cursor-trail,
    .cursor-sparkle,
    .cursor-ripple,
    .cursor-wave {
        display: none !important;
    }
}

/* Dark Mode Adjustments */
[data-theme="dark"] .magic-cursor {
    border-color: var(--color-acento);
    mix-blend-mode: difference;
}

[data-theme="dark"] .magic-cursor-dot {
    background: var(--color-acento);
}
