
        body {
            font-family: 'Poppins', sans-serif;
  }

        body,
        html {
            overflow-x: hidden;
        }

        .chat-container {
            height: calc(100vh - 200px);
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: #cbd5e1 #f1f5f9;
        }

        .chat-container::-webkit-scrollbar {
            width: 8px;
        }

        .chat-container::-webkit-scrollbar-track {
            background: #f1f5f9;
        }

        .chat-container::-webkit-scrollbar-thumb {
            background-color: #cbd5e1;
            border-radius: 20px;
        }

        .typing-indicator {
            display: inline-flex;
            align-items: center;
        }

        .typing-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: #9CA3AF;
            margin: 0 2px;
            animation: typingAnimation 1.4s infinite ease-in-out;
        }

        .typing-dot:nth-child(1) {
            animation-delay: 0s;
        }

        .typing-dot:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-dot:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes typingAnimation {

            0%,
            60%,
            100% {
                transform: translateY(0);
            }

            30% {
                transform: translateY(-5px);
            }
        }

        .message-input {
            resize: none;
        }

        .code-block {
            background-color: #1f2937;
            color: #f3f4f6;
            padding: 12px;
            border-radius: 6px;
            font-family: monospace;
            overflow-x: auto;
            margin: 8px 0;
            position: relative;
        }

        .code-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            color: #9ca3af;
            font-size: 0.875rem;
        }

        .search-container {
            position: relative;
            max-width: 600px;
            margin: 20px auto;
        }

        .search-input {
            width: 100%;
            padding: 12px 45px 12px 16px;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            font-size: 16px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .search-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
        }

        .search-icon {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #9ca3af;
            cursor: pointer;
        }

        .chat-history-item {
            transition: all 0.2s;
            position: relative;
        }

        .chat-history-item:hover .delete-chat {
            opacity: 1;
        }

        .delete-chat {
            opacity: 0;
            transition: opacity 0.2s;
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
        }

        .search-results,
        #idebar {
            background-color: white;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            margin-top: 8px;
            max-height: 300px;
            overflow-y: auto;
            position: absolute;
            width: 100%;
            z-index: 10;
            /* Hide scrollbar for Chrome, Safari and Opera */
            scrollbar-width: none;
            /* Firefox */
            -ms-overflow-style: none;
            /* IE and Edge */
        }

        .search-results::-webkit-scrollbar {
            display: none;
        }

        .search-result-item {
            padding: 12px 16px;
            cursor: pointer;
            border-bottom: 1px solid #f3f4f6;
        }

        .search-result-item:hover {
            background-color: #f9fafb;
        }

        .search-result-item:last-child {
            border-bottom: none;
        }

        .highlight {
            padding: 2px 4px;
            border-radius: 3px;
            font-weight: 500;
        }

        /* Custom styling for code blocks */
        pre[class*="language-"] {
            background: transparent !important;
            margin: 0 !important;
            padding: 0 !important;
        }

        code[class*="language-"] {
            font-size: 14px !important;
            text-shadow: none !important;
        }

        /* New styles for centered input */
        .input-container {
            transition: all 0.3s ease;
        }

        .overlay.active {
            display: block;
        }

        /* Mobile sidebar */
        .mobile-sidebar {
            transform: translateX(-100%);
            transition: transform 0.3s ease;
            z-index: 40;
            height: 100vh;
            position: fixed;
            top: 0;
            left: 0;
        }

        .mobile-sidebar.active {
            transform: translateX(0);
        }

        .mobile-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 30;
        }

        .mobile-overlay.active {
            display: block;
        }

        /* Responsive adjustments - UPDATED */
        @media (max-width: 768px) {
            .chat-container {
                height: calc(100vh - 180px);
                padding: 0.75rem;
            }

            .input-container.centered {
                padding: 1rem 1rem 2px 1rem;
            }

            .code-block {
                font-size: 12px;
                padding: 8px;
            }

            /* Header adjustments */
            header {
                padding: 0.75rem;
            }

            #current-chat-title {
                max-width: 180px;

            }

            /* Input area adjustments */
            .message-input {
                padding-right: 70px;
                font-size: 16px;
            }

            .input-actions {
                flex-wrap: wrap;
                gap: 4px;
            }

            .input-actions button {
                font-size: 11px;
                padding: 2rem 8px;
            }

            /* Welcome message adjustments */
            #welcome-message {
                padding: 1rem;
            }

            #welcome-message h2 {
                font-size: 27px;
            }

            #welcome-message p {
                font-size: 15px;
            }

            /* Footer text */
            .input-container .text-xs {
                font-size: 9px;
                padding-top: 0.375rem;
                padding-bottom: 0.371rem;
                padding-left: 0.75rem;
                padding-right: 0.75rem;
            }

            #footer-note {
                font-size: 9px;
            }


        }

        @media (max-width: 640px) {
            .message-input {
                padding-right: 60px;
            }

            .input-container.centered .input-actions {
                flex-direction: row;

            }

            /* Chat history items */
            .chat-history-item {
                padding: 0.5rem;
            }

            /* Search container in sidebar */
            .search-container {
                margin: 10px auto;
            }

            /* Right-side icons in input */
            .flex.items-center.gap-2.absolute.right-3.bottom-3 {
                bottom: 12px;
            }
        }

        /* NEW: Input field improvements for mobile */
        @media (max-width: 500px) {
            #message-input {
                font-size: 14px;
                /* Prevents zoom on iOS */
            }


            .input-actions button {
                margin-bottom: px;
            }
        }

        @media (max-width: 480px) {


            #send-btn svg {
                width: 19px;
                height: 19px;
            }

            .chat-container {
                height: calc(100vh - 160px);
                padding: 0.5rem;
            }

            /* Header buttons */
            #clear-chat-btn {
                padding: 0.4rem;
            }

            /* Input area */
            .relative.flex.items-center.bg-white.rounded-2xl.shadow-md.border {
                padding: 0.5rem;
                padding-bottom: 2.5rem;
            }

            .message-input {
                min-height: 40px;
            }

            /* Action buttons */
            .input-actions {
                bottom: 8px;
                left: 8px;
            }

            .input-actions button {
                font-size: 10px;
            }

            /* Right side icons */
            .flex.items-center.gap-2.absolute.right-3.bottom-3 {
                right: 8px;
                bottom: 8px;
            }

            .flex.items-center.gap-2.absolute.right-3.bottom-3 button {
                padding: 0.35rem;
            }

            .flex.items-center.gap-2.absolute.right-3.bottom-3 svg {
                width: 16px;
                height: 16px;
            }

            /* Welcome icon */
            #welcome-message .w-16 {
                width: 4rem;
                height: 4rem;
            }

            #welcome-message svg {
                width: 1.7rem;
                height: 1.7rem;
            }


        }

        @media (max-width: 411px) {


            /* Welcome icon */
            /* #welcome-message .w-16 {
                width: 2rem;
                height: 2rem;
            } */

            /* #welcome-message svg {
                width: 1.3rem;
                height: 1.3rem;
            } */

            #welcome-message h2 {
                font-size: 22px;
                margin-bottom: 5px;
            }

            #welcome-message p {
                font-size: 12px;
            }

        }


        @media (min-width: 450px) {
            .toast {
                font-size: 20px;
            }

        }



        /* Device indicator */
        .device-indicator {
            position: fixed;
            top: 20px;
            right: -200px;
            /* start off-screen */
            z-index: 9999;
            color: #fff;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: right 0.5s ease, opacity 1s ease;
            opacity: 1;
        }

        .device-indicator.mobile {
            background: rgba(59, 130, 246, 0.8);
        }

        .device-indicator.tablet {
            background: rgba(139, 92, 246, 0.8);
        }

        .device-indicator.desktop {
            background: rgba(16, 185, 129, 0.8);
        }

        /* Slide in */
        .device-indicator.show {
            right: 20px;
            /* final position */
            opacity: 1;
        }

        /* Scroll-to-bottom button placed above the input box */
        #scroll-to-bottom {
            position: fixed;
            left: 50%;
            transform: translateX(-50%);
            bottom: 96px;
            /* sits above input area */
            background: #2563eb;
            /* blue-600 */
            color: #fff;
            padding: 8px 12px;
            border-radius: 9999px;
            box-shadow: 0 6px 18px rgba(37, 99, 235, 0.18);
            display: none;
            z-index: 60;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
            transition: opacity 160ms ease, transform 160ms ease;
            align-items: center;
            gap: 8px;
        }

        #scroll-to-bottom.show {
            display: flex;
            opacity: 1;
            transform: translateX(60%) translateY(-140%);
        }

        #scroll-to-bottom.hide {
            opacity: 0;
            transform: translateX(-50%) translateY(6px);
        }

        @media (max-width: 640px) {
            #scroll-to-bottom {
                bottom: 120px;
                /* account for taller mobile input padding */
                padding: 6px 10px;
                font-size: 13px;
            }
        }

        /* Slide out */
        .device-indicator.fade-out {
            right: -200px;
            /* move off-screen */
            opacity: 0;
        }

        .action-btn {
            transition: all 0.2s ease;
        }

        .action-btn:hover {
            transform: translateY(-2px);
        }

        .copy-btn:hover {
            color: #3b82f6 !important;
        }

        .share-btn:hover {
            color: #10b981 !important;
        }

        .download-btn:hover {
            color: #f59e0b !important;
        }

        /* NEW: Fix for mobile layout */
        @media (max-width: 768px) {

            main.flex-1 {
                width: 100%;
            }

            /* Better message alignment on mobile */
            .chat-message {
                max-width: 85%;
                margin: 0.5rem 0;
            }
        }

        @media (min-width: 768) {
            #scroll-to-bottom.show {
                transform: translateX(-50%) translateY(-120%);
            }
        }

        @media (max-width: 1024px) {
            #scroll-to-bottom.show {
                transform: translateX(-50%) translateY(-140%);
            }
        }

        @media (max-width: 562) {
            #scroll-to-bottom.show {
                transform: translateX(-50%) translateY(-20%);
            }
        }

