/* Animations */

/* Fade In Up */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp 0.6s ease forwards; }

/* Stagger children */
.stagger > * {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }
.stagger > *:nth-child(9) { animation-delay: 0.45s; }

/* Float */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

/* Pulse */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.pulse { animation: pulse 2s ease-in-out infinite; }

/* Spin */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin { animation: spin 1s linear infinite; }

/* Gradient shift */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

/* Scale on hover */
.hover-scale { transition: transform 0.3s ease; }
.hover-scale:hover { transform: scale(1.05); }

/* Glow on hover */
.hover-glow { transition: box-shadow 0.3s ease; }
.hover-glow:hover { box-shadow: 0 0 30px var(--accent-glow); }

/* Shake */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake { animation: shake 0.5s ease; }

/* Bounce */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.bounce { animation: bounce 0.6s ease; }

/* Slide in from left */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-left { animation: slideInLeft 0.5s ease forwards; }

/* Slide in from right */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right { animation: slideInRight 0.5s ease forwards; }

/* Ripple effect for buttons */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Loading skeleton */
@keyframes skeleton {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* Typing cursor */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.typing-cursor::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--accent);
}

/* Counter animation */
.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* Icon bounce on hover */
.icon-bounce:hover i {
    animation: bounce 0.4s ease;
}

/* Neon glow text */
.neon-text {
    text-shadow: 
        0 0 5px var(--accent),
        0 0 10px var(--accent),
        0 0 20px var(--accent),
        0 0 40px var(--accent);
}

/* Glassmorphism effect */
.glass {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Particles (CSS only) */
.particles {
    position: relative;
    overflow: hidden;
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 6s ease-in-out infinite;
}

.particles::before { top: 20%; left: 10%; animation-delay: 0s; }
.particles::after { top: 60%; right: 15%; animation-delay: 2s; }

/* Success checkmark */
@keyframes checkmark {
    0% { stroke-dashoffset: 50; }
    100% { stroke-dashoffset: 0; }
}

.checkmark-animate {
    stroke-dasharray: 50;
    animation: checkmark 0.5s ease forwards;
}

/* Card shine effect */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255,255,255,0.03) 50%,
        transparent 100%
    );
    transform: rotate(30deg);
    transition: transform 0.6s;
}

.card-shine:hover::after {
    transform: rotate(30deg) translateX(100%);
}
