/* KodLog Animated Logo */

.logo-animated {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo-animated svg {
    animation: logoFloat 3s ease-in-out infinite;
}

.logo-animated:hover svg {
    animation: logoSpin 0.8s ease-in-out;
}

.logo-animated svg rect {
    animation: gradientShift 4s ease-in-out infinite;
}

.logo-animated svg path {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: checkmarkDraw 1.5s ease-out forwards, checkmarkPulse 2s ease-in-out 1.5s infinite;
}

.logo-animated span {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 3s ease-in-out infinite;
}

/* Logo Float Animation */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Logo Spin on Hover */
@keyframes logoSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Gradient Shift Animation */
@keyframes gradientShift {
    0%, 100% {
        fill: url(#gradient1);
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Checkmark Draw Animation */
@keyframes checkmarkDraw {
    0% {
        stroke-dashoffset: 50;
        opacity: 0;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* Checkmark Pulse Animation */
@keyframes checkmarkPulse {
    0%, 100% {
        stroke-width: 3;
        opacity: 1;
    }
    50% {
        stroke-width: 4;
        opacity: 0.7;
    }
}

/* Text Gradient Animation */
@keyframes textGradient {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* Glow Effect on Hover */
.logo-animated:hover svg {
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5));
}

/* Loading Animation Variant */
.logo-loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo-loading svg {
    animation: logoRotate 2s linear infinite;
}

.logo-loading svg rect {
    animation: pulseGlow 1.5s ease-in-out infinite;
}

@keyframes logoRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Bounce Animation for Page Load */
.logo-bounce {
    animation: logoBounce 1s ease-out;
}

@keyframes logoBounce {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    70% {
        transform: scale(0.9) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Glitch Effect (Optional) */
.logo-glitch:hover span {
    animation: glitchText 0.3s ease-in-out;
}

@keyframes glitchText {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .logo-animated span {
        font-size: 20px;
    }
    
    .logo-animated svg {
        width: 32px;
        height: 32px;
    }
}

/* Success State Animation */
.logo-success svg path {
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

/* Shimmer Effect */
.logo-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}
