/* Star Animation */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
    }

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

.star {
    position: absolute;
    background-color: var(--star-color);
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
    will-change: transform;
}

/* Title Animations */
.title-animation {
    animation: fadeInDown 1s ease-out;
}

.subtitle-animation {
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Hover Effects */
.card-hover-effect {
    transition: all 0.3s ease;
}

    .card-hover-effect:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

/* Button Pulse Effect */
.pulse-effect {
    position: relative;
    overflow: hidden;
}

    .pulse-effect::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 5px;
        height: 5px;
        background: rgba(255, 255, 255, 0.5);
        opacity: 0;
        border-radius: 100%;
        transform: scale(1, 1) translate(-50%);
        transform-origin: 50% 50%;
    }

    .pulse-effect:focus:not(:active)::after {
        animation: pulse 1s ease-out;
    }

@keyframes pulse {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }

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

/* Section Entry Animation */
.section-entry {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

    .section-entry.in-view {
        opacity: 1;
        transform: translateY(0);
    }

/* Underline Animation */
.link-underline {
    position: relative;
}

    .link-underline::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--accent-color);
        transition: width 0.3s ease;
    }

    .link-underline:hover::after {
        width: 100%;
    }

/* Rotating Gear Icon */
.gear-rotate {
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Floating Animation */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

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

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

/* Background Gradient Animation */
.animated-gradient {
    background: linear-gradient(-45deg, #2c3e50, #34495e, #7f8c8d, #bdc3c7);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

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

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

    100% {
        background-position: 0% 50%;
    }
    /* Enhanced star animation */
    @keyframes enhancedTwinkle {
        0%, 100%

{
    opacity: 0.8;
    transform: scale(0.9);
}

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

}

.star {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
    transition: opacity 0.2s;
    animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.8;
        transform: scale(0.9);
    }

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

/* Sparkle effect */
/* Enhanced Sparkle Animation */
.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--star-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    animation: sparkleFade 1.2s ease-out forwards;
    box-shadow: 
        0 0 10px 2px rgba(241, 196, 15, 0.7),
        0 0 5px 1px rgba(255, 255, 255, 0.9);
    filter: brightness(1.2);
}

@keyframes sparkleFade {
    0% {
        transform: scale(0.5) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 0.9;
    }
    50% {
        transform: scale(1.1) rotate(10deg);
        opacity: 1;
    }
    80% {
        opacity: 0.7;
    }
    100% {
        transform: scale(1.3) rotate(20deg);
        opacity: 0.3;
    }
}

/* Optional trailing effect (paste this too if you want the trail) */
.sparkle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    animation: sparkleTrail 1s ease-out forwards;
}

@keyframes sparkleTrail {
    to {
        transform: translateY(20px) scale(0.7);
        opacity: 0;
    }
    /* More specific targeting */
    .home-page .hero .title-animation {
        font-family: 'Fuzzy Bubbles', cursive;
        font-weight: 700;
        /* Add any other custom styling */
        letter-spacing: 1px;
        margin-bottom: 0.5rem;
    }