/* ==========================================
   VIRD.CLICK - ANIMATIONS
   ========================================== */

/* Page Transitions */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes slideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

@keyframes slideRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideLeft {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes scaleOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.8); opacity: 0; }
}

/* Micro Interactions */
@keyframes heartBurst {
    0% { transform: scale(0); opacity: 1; }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-200px) rotate(720deg); opacity: 0; }
}

@keyframes coinEarn {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
    100% { transform: scale(1) rotate(360deg); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

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

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

@keyframes giftExplosion {
    0% { transform: scale(0); opacity: 0; }
    30% { transform: scale(1.5); opacity: 1; }
    50% { transform: scale(1); }
    70% { transform: scale(1.2); }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes starTrail {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-300px) scale(0);
        opacity: 0;
    }
}

/* Double Tap Heart */
.double-tap-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    color: var(--error-dark);
    pointer-events: none;
    z-index: 100;
    animation: heartBurst 0.6s ease-out forwards;
}

/* Animated Backgrounds */
.animated-bg-gradient {
    background: linear-gradient(-45deg, #f8a4d0, #a8d8ea, #d5aaff, #a8e6cf);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

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

/* Skeleton Loading Animations */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        var(--bg-hover) 50%,
        var(--bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: skeletonLoad 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes skeletonLoad {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

/* Notification Bell Animation */
.bell-ring {
    animation: bellRing 0.5s ease;
}

@keyframes bellRing {
    0% { transform: rotate(0); }
    15% { transform: rotate(15deg); }
    30% { transform: rotate(-15deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-10deg); }
    75% { transform: rotate(5deg); }
    90% { transform: rotate(-5deg); }
    100% { transform: rotate(0); }
}

/* Level Up Animation */
.level-up-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    z-index: var(--z-toast);
    animation: fadeIn 0.3s ease;
}
.level-up-content {
    text-align: center;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.level-up-content .level-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}
.level-up-content .level-text {
    color: white;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Coin Counter Animation */
.coin-animate {
    display: inline-block;
    animation: coinEarn 0.5s ease;
}

/* Verified Badge Pulse */
.verified-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Follow Button Animation */
.follow-anim {
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Particles for gift effects */
.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 1.5s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

/* Smooth page transitions */
.page-enter {
    animation: slideRight 0.3s ease;
}
.page-exit {
    animation: slideLeft 0.3s ease reverse;
}

/* XP bar smooth fill */
.xp-fill-animate {
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Achievement unlock animation */
.achievement-unlock {
    animation: achievementPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes achievementPop {
    0% { transform: scale(0) rotate(-10deg); }
    60% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Scroll hint animation */
.scroll-hint {
    animation: scrollHint 2s ease-in-out infinite;
}

@keyframes scrollHint {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(10px); opacity: 1; }
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
}
.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-tertiary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}