/* ================================================
   Extra Effects CSS - Cursor & Particles
   ================================================ */

/* Custom Cursor */
body {
    cursor: none;
}

body * {
    cursor: none !important;
}

/* Cursor dot */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background: rgba(0, 123, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s;
    mix-blend-mode: difference;
}

.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    border: 2px solid rgba(0, 123, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
    animation: cursorPulse 2s ease-in-out infinite;
}

@keyframes cursorPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.7;
    }
}

/* Cursor hover states */
body.cursor-hover .cursor-dot {
    width: 20px;
    height: 20px;
    background: rgba(255, 0, 128, 0.8);
}

body.cursor-hover .cursor-outline {
    width: 50px;
    height: 50px;
    border-color: rgba(255, 0, 128, 0.8);
}

body.cursor-click .cursor-dot {
    width: 5px;
    height: 5px;
}

body.cursor-click .cursor-outline {
    width: 60px;
    height: 60px;
}

/* Canvas layers */
#particle-canvas,
#cursor-canvas,
#ripple-canvas {
    image-rendering: crisp-edges;
}

/* Particle explosion on elements */
@keyframes particleBurst {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Sparkle effect */
@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle 1s ease-out forwards;
}

/* Glow effect on hover for interactive elements */
.icon,
.skill-tag,
.tech-tag,
.cert-card,
.project-card,
button,
.btn-primary,
.btn-toggle {
    position: relative;
}

.icon::after,
.skill-tag::after,
.tech-tag::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(circle at center, rgba(0, 123, 255, 0.4), transparent 70%);
    pointer-events: none;
    transition: opacity 0.3s;
}

.icon:hover::after,
.skill-tag:hover::after,
.tech-tag:hover::after {
    opacity: 1;
    animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Magnetic effect for buttons */
.btn-primary,
.btn-toggle,
.title-bar-controls button {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Disable effects for mobile or reduced motion */
@media (max-width: 768px) {

    body,
    body * {
        cursor: auto !important;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    body,
    body * {
        cursor: auto !important;
    }

    .cursor-dot,
    .cursor-outline,
    #particle-canvas,
    #cursor-canvas,
    #ripple-canvas {
        display: none !important;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Confetti effect (can be triggered on special events) */
@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    pointer-events: none;
    z-index: 9999;
    animation: confettiFall 3s linear forwards;
}

/* Screen shake effect (for special interactions) */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Floating animation for special elements */
@keyframes floatSlow {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.float-element {
    animation: floatSlow 4s ease-in-out infinite;
}

/* Neon glow text effect */
.neon-text {
    text-shadow:
        0 0 5px rgba(0, 123, 255, 0.8),
        0 0 10px rgba(0, 123, 255, 0.6),
        0 0 20px rgba(0, 123, 255, 0.4),
        0 0 40px rgba(0, 123, 255, 0.2);
    animation: neonFlicker 2s ease-in-out infinite;
}

@keyframes neonFlicker {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* Holographic effect */
.holographic {
    position: relative;
    background: linear-gradient(45deg,
            #ff0080,
            #ff8c00,
            #40e0d0,
            #00ffff,
            #ff0080);
    background-size: 400% 400%;
    animation: holographicShift 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes holographicShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}