/* ============================================================
   cursor.css — Cursor Robot Animado + Aura Neón
   Archivo independiente, no modifica index.html
   ============================================================ */

/* Ocultar el cursor por defecto en todo el sitio (solo en PC) */
@media (min-width: 769px) {
    html:not(.dashboard-active) *, 
    html:not(.dashboard-active) *::before, 
    html:not(.dashboard-active) *::after {
        cursor: none !important;
    }
}

/* Ocultar elementos del cursor en moviles */
@media (max-width: 768px) {
    #cursor-robot, #cursor-aura {
        display: none !important;
    }
}

/* ── Aura: el círculo que persigue al cursor ── */
#cursor-aura {
    position: fixed;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(27, 255, 255, 0.18) 0%, rgba(46, 49, 146, 0.08) 70%, transparent 100%);
    border: 1.5px solid rgba(27, 255, 255, 0.45);
    pointer-events: none;
    z-index: 999998;
    transform: translate(-50%, -50%);
    transition:
        width 0.35s cubic-bezier(0.23, 1, 0.32, 1),
        height 0.35s cubic-bezier(0.23, 1, 0.32, 1),
        background 0.35s ease,
        border-color 0.35s ease,
        opacity 0.3s ease;
    will-change: transform;
    opacity: 0;
}

/* Estado hover sobre botones/links */
#cursor-aura.hovering {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(27, 255, 255, 0.30) 0%, rgba(46, 49, 146, 0.18) 60%, transparent 100%);
    border-color: rgba(27, 255, 255, 0.85);
    box-shadow: 0 0 22px rgba(27, 255, 255, 0.4), 0 0 50px rgba(46, 49, 146, 0.2);
}

/* ── Robot: el cursor principal ── */
#cursor-robot {
    position: fixed;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    pointer-events: none;
    z-index: 999999;
    transform: translate(-6px, -6px);
    will-change: transform;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.08s linear;
    filter: drop-shadow(0 0 6px rgba(27, 255, 255, 0.7));
}

/* SVG robot inline */
#cursor-robot svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Animación de "respiración" del robot cuando está quieto */
@keyframes robot-idle {
    0%, 100% { transform: translate(-6px, -6px) translateY(0px); }
    50%       { transform: translate(-6px, -6px) translateY(-2px); }
}

#cursor-robot.idle {
    animation: robot-idle 2s ease-in-out infinite;
}

/* Efecto de "click" — escala rápida */
@keyframes robot-click {
    0%   { filter: drop-shadow(0 0 6px rgba(27, 255, 255, 0.7)); transform: translate(-6px, -6px) scale(1); }
    40%  { filter: drop-shadow(0 0 18px rgba(27, 255, 255, 1));  transform: translate(-6px, -6px) scale(0.75); }
    100% { filter: drop-shadow(0 0 6px rgba(27, 255, 255, 0.7)); transform: translate(-6px, -6px) scale(1); }
}

#cursor-robot.clicking {
    animation: robot-click 0.3s ease forwards;
}

/* ── Glow que deja el robot sobre botones interactivos ── */
.cursor-button-glow {
    position: relative;
    overflow: hidden;
}

.cursor-button-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(27, 255, 255, 0.22) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cursor-button-glow:hover::after {
    opacity: 1;
}
