@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}
@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===== LOGO DRAWING ANIMATION ===== */
@keyframes draw-ellipse {
    0% { stroke-dashoffset: 1000; }
    100% { stroke-dashoffset: 0; }
}
@keyframes draw-letter {
    0% { stroke-dashoffset: 500; opacity: 0; }
    5% { opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes fill-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes pencil-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Outer ellipse drawing - white like original */
.logo-ellipse {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-ellipse 0.3s ease-out forwards;
}

/* Letter Z */
.logo-letter-z {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    opacity: 0;
    animation: draw-letter 0.6s ease-out forwards;
    animation-delay: 0s;
}

/* Letter i */
.logo-letter-i {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    opacity: 0;
    animation: draw-letter 0.4s ease-out forwards;
    animation-delay: 0s;
}
.logo-letter-i rect {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: draw-letter 0.4s ease-out forwards;
    animation-delay: 0s;
}

/* Letter n */
.logo-letter-n {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    opacity: 0;
    animation: draw-letter 0.5s ease-out forwards;
    animation-delay: 0s;
}

/* Letter h */
.logo-letter-h {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    opacity: 0;
    animation: draw-letter 0.5s ease-out forwards;
    animation-delay: 0s;
}

/* Letter o */
.logo-letter-o {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    opacity: 0;
    animation: draw-letter 0.5s ease-out forwards;
    animation-delay: 0s;
}

/* Final glow after drawing completes */
.logo-svg-container {
    filter: drop-shadow(0 0 0 transparent);
    animation: glow-in 0.3s ease-out forwards;
}
@keyframes glow-in {
    0% { filter: drop-shadow(0 0 0 transparent); }
    100% { filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.3)) drop-shadow(0 0 50px rgba(var(--agir-color-primary-rgb), 0.2)); }
}

/* Pencil/cursor indicator */
.drawing-cursor {
    animation: pencil-cursor 0.3s ease-in-out infinite;
}
/* ===== END LOGO DRAWING ANIMATION ===== */

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 4s ease-in-out infinite; }
.animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
.animate-slide-in { animation: slideIn 0.4s ease-out forwards; }

/* Background grid pattern */
.bg-grid-pattern {
    background-image:
        linear-gradient(rgba(var(--agir-color-primary-rgb), 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--agir-color-primary-rgb), 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, var(--agir-color-primary-500) 0%, var(--agir-color-primary-400) 50%, var(--agir-color-primary-300) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass effect */
.glass {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(55, 65, 81, 0.5);
}

/* Input focus glow */
.input-glow:focus {
    box-shadow: 0 0 0 2px rgba(var(--agir-color-primary-rgb), 0.2), 0 0 30px rgba(var(--agir-color-primary-rgb), 0.1);
}

/* Button shimmer */
.btn-shimmer {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.1) 50%,
        transparent 100%);
    background-size: 200% 100%;
}
.btn-shimmer:hover {
    animation: shimmer 1.5s infinite;
}

/* Logo glow effect */
.logo-glow {
    filter: drop-shadow(0 0 30px rgba(34, 197, 94, 0.3))
            drop-shadow(0 0 60px rgba(34, 197, 94, 0.2));
}

[x-cloak] { display: none !important; }

.auth-delay-1s { animation-delay: 1s; }
.auth-delay-2s { animation-delay: 2s; }
.auth-logo-fill-z, .auth-logo-fill-i, .auth-logo-fill-n,
.auth-logo-fill-h, .auth-logo-fill-o { animation: fill-in 0.3s ease-out forwards; }
.auth-logo-title, .auth-logo-subtitle { opacity: 1; }
.auth-card-delay { animation-delay: 0.2s; }
.auth-footer-delay { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .logo-ellipse, [class*="logo-letter"], .logo-letter-i rect, [class*="auth-logo-fill"] {
        opacity: 1 !important; stroke-dashoffset: 0 !important;
    }
}
