@keyframes ai-fade-in {
        from { opacity: 0; transform: translateY(6px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .animate-fade-in {
        animation: ai-fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    /* Bouncing Typing Wave Animation */
    .ai-typing-dot {
        width: 6px;
        height: 6px;
        background-color: #6366f1;
        border-radius: 50%;
        display: inline-block;
        animation: ai-bounce-dot 1.4s infinite ease-in-out both;
    }
    .ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
    .ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }
    .ai-typing-dot:nth-child(3) { animation-delay: 0s; }

    @keyframes ai-bounce-dot {
        0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
        40% { transform: scale(1); opacity: 1; }
    }

    /* Sound Wave Animation */
    .ai-soundwave-bar {
        width: 2.5px;
        height: 10px;
        background-color: currentColor;
        border-radius: 2px;
        display: inline-block;
        animation: ai-soundwave 1s ease-in-out infinite;
    }
    .ai-soundwave-bar:nth-child(1) { animation-delay: 0.1s; height: 6px; }
    .ai-soundwave-bar:nth-child(2) { animation-delay: 0.3s; height: 12px; }
    .ai-soundwave-bar:nth-child(3) { animation-delay: 0.2s; height: 8px; }

    @keyframes ai-soundwave {
        0%, 100% { transform: scaleY(0.4); }
        50% { transform: scaleY(1.3); }
    }

    /* Markdown Styling in Bot Messages */
    .ai-bot-content {
        word-break: break-word;
    }
    .ai-bot-content strong {
        font-weight: 700;
        color: #1e1b4b;
    }
    .dark .ai-bot-content strong {
        color: #e0e7ff;
    }
    .ai-bot-content em {
        font-style: italic;
    }
    .ai-bot-content code.inline-code {
        background-color: #f1f5f9;
        color: #4f46e5;
        padding: 2px 6px;
        border-radius: 6px;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 0.85em;
        border: 1px solid #e2e8f0;
    }
    .dark .ai-bot-content code.inline-code {
        background-color: #1e293b;
        color: #818cf8;
        border-color: #334155;
    }
    .ai-bot-content pre.code-block {
        background-color: #0f172a;
        color: #f8fafc;
        border-radius: 10px;
        padding: 10px 12px;
        margin: 8px 0;
        font-family: ui-monospace, monospace;
        font-size: 0.8em;
        overflow-x: auto;
        border: 1px solid #1e293b;
        position: relative;
    }
    .ai-bot-content pre.code-block code {
        display: block;
        line-height: 1.4;
    }
    .ai-bot-content a {
        color: #4f46e5;
        text-decoration: underline;
        font-weight: 500;
        transition: color 0.15s;
    }
    .ai-bot-content a:hover {
        color: #3730a3;
    }
    .dark .ai-bot-content a {
        color: #818cf8;
    }
    .ai-bot-content ul {
        list-style-type: disc;
        padding-left: 1.25rem;
        margin: 4px 0;
    }
    .ai-bot-content ol {
        list-style-type: decimal;
        padding-left: 1.25rem;
        margin: 4px 0;
    }
    .ai-bot-content li {
        margin-bottom: 2px;
    }

    /* Custom Scrollbar for messages */
    #ai-widget-messages::-webkit-scrollbar {
        width: 5px;
    }
    #ai-widget-messages::-webkit-scrollbar-track {
        background: transparent;
    }
    #ai-widget-messages::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.3);
        border-radius: 9999px;
    }
    #ai-widget-messages::-webkit-scrollbar-thumb:hover {
        background: rgba(148, 163, 184, 0.5);
    }
