/* DmApp Fluid Animations */

/* ===== MESSAGE ANIMATIONS ===== */

.message-bubble {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom left;
}

.message-bubble.sent {
    transform-origin: bottom right;
}

.message-bubble:hover {
    transform: scale(1.02);
}

@keyframes messageSendEffect {
    0% {
        transform: translate(0, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(100px, -50%) scale(0);
        opacity: 0;
    }
}

/* ===== MEDIA LIGHTBOX ===== */

.media-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.media-lightbox img,
.media-lightbox video {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ===== VIDEO PLAY OVERLAY ===== */

.video-play-overlay {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

/* ===== BUTTON RIPPLE ===== */

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== SMOOTH HOVER EFFECTS ===== */

.smooth-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.2);
}

/* ===== IMAGE ZOOM ON HOVER ===== */

.zoomable-image {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.zoomable-image:hover {
    transform: scale(1.03);
}

/* ===== ENTRANCE ANIMATIONS ===== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes flipIn {
    from {
        opacity: 0;
        transform: rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: rotateY(0deg);
    }
}

/* ===== FLUID CARD ANIMATIONS ===== */

.fluid-card {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fluid-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 255, 0, 0.2);
}

.fluid-card:active {
    transform: translateY(-2px) scale(0.98);
}

/* ===== MODAL ENTER/EXIT ===== */

.modal-enter {
    animation: modalEnter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-exit {
    animation: modalExit 0.3s ease-out forwards;
}

@keyframes modalExit {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform, opacity;
}

/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .message-bubble,
    .fluid-card,
    .zoomable-image {
        transition: none !important;
        animation: none !important;
    }
}
