@layer utilities {
    .scrollbar::-webkit-scrollbar {
        width: 8px;
    }
    
    .scrollbar::-webkit-scrollbar-track {
        background: rgba(241, 245, 249, 0.3);
        border-radius: 4px;
    }
    
    .scrollbar::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }
    
    .scrollbar::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
    
    .dark .scrollbar::-webkit-scrollbar-track {
        background: rgba(30, 41, 59, 0.3);
    }
    
    .dark .scrollbar::-webkit-scrollbar-thumb {
        background: #475569;
    }
    
    .dark .scrollbar::-webkit-scrollbar-thumb:hover {
        background: #64748b;
    }
    
    .chat-image {
        max-width: 100%;
        border-radius: 0.75rem;
        margin: 0.5rem 0;
        display: block;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .fade-in {
        animation: fadeIn 0.3s ease-out;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .bounce {
        animation: bounce 1.5s infinite;
    }
    
    @keyframes bounce {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-5px); }
    }
    
    /* WhatsApp-like colors */
    .user-message {
        background-color: #81dffa; /* Light green for user messages */
        color: #000;
        border-radius: 7.5px 0 7.5px 7.5px;
    }
    
    .bot-message {
        background-color: #ffffff; /* White for bot messages */
        color: #000;
        border-radius: 0 7.5px 7.5px 7.5px;
    }
    
    .dark .user-message {
        background-color: #00415c; /* Dark green for user messages in dark mode */
        color: #e7edec;
    }
    
    .dark .bot-message {
        background-color: #202c33; /* Dark gray for bot messages in dark mode */
        color: #e7edec;
    }
    
    .message-shadow {
        box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
    }
    
    /* Background colors */
    .chat-bg-light {
        background-color: #e5ddd5;
        background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%239C92AC' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    }
    
    .dark .chat-bg-light {
        background-color: #0c1317;
        background-image: none;
    }
    /* Add to your existing styles */
    audio {
        width: 100%;
        max-width: 300px;
        height: 40px;
        margin-top: 8px;
        border-radius: 15px;
        background: rgba(255, 255, 255, 0.1);
    }

    /* Recording state */
    .recording {
        animation: pulse 1.5s infinite;
    }

    @keyframes pulse {
        0% { opacity: 1; }
        50% { opacity: 0.5; }
        100% { opacity: 1; }
    }
}