/* Cursor Trail Effect */
.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    background: url('assets/star.gif') no-repeat center center;
    background-size: contain;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

/* Sparkle Effect */
.sparkle {
    position: absolute;
    pointer-events: none;
    background: url('assets/sparkle.gif') no-repeat center center;
    background-size: contain;
    width: 20px;
    height: 20px;
    animation: float 2s ease-out forwards;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px) scale(0);
        opacity: 0;
    }
}

/* Blinking Text */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* Rainbow Text Effect */
@keyframes rainbow {
    0% { color: #ff0000; }
    16.666% { color: #ff00ff; }
    33.333% { color: #0000ff; }
    50% { color: #00ffff; }
    66.666% { color: #00ff00; }
    83.333% { color: #ffff00; }
    100% { color: #ff0000; }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Pulse Animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Rotate Animation */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Pop In Animation */
@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Slide In Animations */
@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Loading Animation */
@keyframes loading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hover Effects */
.hover-bounce:hover {
    animation: bounce 0.5s ease infinite;
}

.hover-shake:hover {
    animation: shake 0.5s ease infinite;
}

.hover-pulse:hover {
    animation: pulse 0.5s ease infinite;
}

/* Applied Animations */
.reaction {
    animation: popIn 0.3s ease-out;
}

.pet-controls button:active {
    animation: pulse 0.2s ease;
}

.comment {
    animation: slideInLeft 0.3s ease-out;
}

#visitor-counter {
    animation: rainbow 5s infinite;
}

.loading-text {
    animation: blink 1s infinite;
}

/* Game Animations */
@keyframes treat-fall {
    from { transform: translateY(-100%); }
    to { transform: translateY(100vh); }
}

@keyframes cat-move {
    from { transform: translateX(0); }
    to { transform: translateX(10px); }
}

/* Sparkle Container */
.sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* Status Bar Animations */
@keyframes fillBar {
    from { width: 0%; }
    to { width: 100%; }
}

.progress-fill {
    animation: fillBar 0.5s ease-out;
}

/* Button Press Effect */
button:active {
    transform: scale(0.95);
}

/* Emoji Reactions Animation */
@keyframes emojiFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-30px) scale(1.5);
        opacity: 0;
    }
}

.emoji-reaction {
    position: absolute;
    pointer-events: none;
    animation: emojiFloat 1s ease-out forwards;
}

/* Like Button Animation */
@keyframes likeEffect {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.like-animation {
    animation: likeEffect 0.3s ease;
}

/* Custom Scrollbar Animation */
@keyframes scrollGlow {
    0% { box-shadow: 0 0 5px var(--primary); }
    50% { box-shadow: 0 0 10px var(--primary); }
    100% { box-shadow: 0 0 5px var(--primary); }
}

::-webkit-scrollbar-thumb {
    animation: scrollGlow 2s infinite;
}

/* Loading Screen Transition */
.fade-out {
    animation: fadeOut 1s ease forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}