/* Custom Animations and Utilities */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

.animate-pulse-slow {
    animation: pulse-slow 8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Premium Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.is-revealed {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Delay modifiers */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Background Patterns */
.bg-grid-white {
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
}

.bg-grid-slate {
    background-image: radial-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

.bg-lines-white {
    background: linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 0),
                linear-gradient(rgba(255,255,255,.03) 1px, transparent 0);
    background-size: 40px 40px;
}

.bg-lines-slate {
    background: linear-gradient(90deg, rgba(15,23,42,.02) 1px, transparent 0),
                linear-gradient(rgba(15,23,42,.02) 1px, transparent 0);
    background-size: 40px 40px;
}

/* Premium Button Effects */
.btn-shine {
    position: relative;
    overflow: hidden;
}

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

/* Emoji Picker Styles (Facebook-inspired) */
.reaction-picker {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.95);
    margin-bottom: 0.75rem;
    background-color: white;
    border-radius: 9999px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.2), 0 8px 15px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
    padding: 0.5rem;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.25rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    pointer-events: none;
    width: max-content;
    min-width: max-content;
}

.group\/reaction-container:hover .reaction-picker {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
    transition-delay: 150ms;
}

.reaction-btn {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    font-size: 2rem;
    background: transparent;
    border: none;
    position: relative;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.reaction-btn:hover {
    transform: scale(1.45) translateY(-8px);
    z-index: 10;
}

@media (max-width: 640px) {
    .reaction-picker {
        padding: 0.375rem;
        gap: 0.125rem;
        margin-bottom: 0.5rem;
    }
    .reaction-btn {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.5rem;
    }
}

.reaction-emoji span, .reaction-btn span {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Scrollbar Hide Utility */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.btn-shine:hover::after {
    animation: shine 1.5s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

/* Background Blobs Animation */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}


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

/* Line clamp for browsers that don't support it well */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
