/* Custom Fonts and Base Styles */
body {
    font-family: 'Nunito', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #111827; 
}
::-webkit-scrollbar-thumb {
    background: #6b21a8; 
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9333ea; 
}

/* Animations */
@keyframes pulse-slow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}
.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

@keyframes floatUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.joke-card {
    animation: floatUp 0.5s ease-out forwards;
    opacity: 0;
}

/* Staggered animation delays for grid items */
.joke-card:nth-child(1) { animation-delay: 0.1s; }
.joke-card:nth-child(2) { animation-delay: 0.2s; }
.joke-card:nth-child(3) { animation-delay: 0.3s; }
.joke-card:nth-child(4) { animation-delay: 0.4s; }
.joke-card:nth-child(5) { animation-delay: 0.5s; }
.joke-card:nth-child(6) { animation-delay: 0.6s; }
.joke-card:nth-child(7) { animation-delay: 0.7s; }
.joke-card:nth-child(8) { animation-delay: 0.8s; }
.joke-card:nth-child(9) { animation-delay: 0.9s; }
.joke-card:nth-child(10) { animation-delay: 1.0s; }

/* Like Button Animation */
@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5) rotate(-10deg); color: #ef4444; }
    100% { transform: scale(1); color: #ef4444; }
}
.like-anim {
    animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Background Emojis */
.emoji-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-emoji {
    position: absolute;
    font-size: 2rem;
    opacity: 0.1;
    animation: floatEmoji linear infinite;
}

@keyframes floatEmoji {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* Shake animation for extreme laughs */
@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}
.shake-screen {
    animation: shake 0.5s;
    animation-iteration-count: 1;
}

/* Tomato Splat Animation */
@keyframes splat {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(3) rotate(15deg); opacity: 1; }
    100% { transform: scale(4) rotate(30deg); opacity: 0; }
}
.tomato-splat {
    position: absolute;
    font-size: 3rem;
    pointer-events: none;
    animation: splat 0.6s ease-out forwards;
    z-index: 10;
}

/* Toast Animation */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.toast-enter {
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}