        :root {
            --bg-dark: #212121;
            --sidebar-light: #2d2d2d; 
            --user-msg: #2f2f2f;
            --text-white: #ececec;
            --accent: #3d3d3d;
        }
        html, body {
            height: 100%;
            margin: 0;
            background-color: var(--bg-dark);
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg-dark);
            color: var(--text-white);
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            height: 100vh;
            height: 100dvh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            margin: 0;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        .fas {
            color: white !important;
        }

        .navbar-custom {
            background-color: var(--bg-dark); 
            border-bottom: 1px solid #333; 
            flex-shrink: 0;
        }

        .navbar-brand {
            color: white !important;
            font-weight: 600;
            font-size: 1.1rem;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .navbar-nav {
            gap: 15px; 
        }

        .navbar-toggler {
            border: none;
            padding: 0;
            color: #bbb;
        }
        .navbar-toggler:focus { box-shadow: none; outline: none; }

        .nav-link {
            color: #bbb !important;
            font-size: 0.85rem;
            padding: 8px 12px !important;
            transition: 0.2s;
        }
        .nav-link:hover { color: white !important; }

        .btn-new-chat {
            background: #4a4a4a;
            color: white;
            border: 1px solid #666;
            padding: 6px 16px;
            border-radius: 8px;
            font-size: 0.75rem;
            font-weight: 600;
            transition: 0.3s;
            white-space: nowrap;
            display: flex;
            align-items: center;
            text-decoration: none;
        }

        .btn-new-chat:hover {
            background: #5a5a5a;
            color: white;
        }

        @media (max-width: 991px) {
            .navbar-collapse {
                background: var(--sidebar-light);
                position: absolute;
                top: 60px;
                left: 0;
                width: 100%;
                z-index: 1000;
                padding: 20px;
                border-bottom: 1px solid #444;
            }
        }
        #chat-container {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            padding-bottom: 170px;
            -webkit-overflow-scrolling: touch;
        }

        #chat-body {
            max-width: 800px;
            margin: 0 auto;
            width: 100%;
            padding: 20px;
        }

        .welcome-section { text-align: center; margin-top: 15vh; }
        .message { display: flex; padding: 20px; margin: 10px 0; border-radius: 10px; }
        .message.user { background-color: var(--user-msg); border-radius: 15px; }
        
        .message img { 
            width: 38px; 
            height: 38px; 
            border-radius: 50%; 
            margin-right: 15px; 
            object-fit: cover;
            background: #444;
            word-break: break-word;
        }

        .input-area {
            position: fixed;
            bottom: 0; left: 0; right: 0;
            background: linear-gradient(transparent, var(--bg-dark) 20%);
            padding: 20px;
            padding: 15px 15px calc(15px + env(safe-area-inset-bottom));

        }

        .input-wrapper { max-width: 800px; margin: 0 auto; position: relative; }

        #user-input {
            width: 100%;
            background: #2f2f2f;
            border: 1px solid #444;
            color: white;
            padding: 12px 45px 12px 15px;
            border-radius: 12px;
            outline: none;
            font-size: 16px;
            -webkit-appearance: none;
        }

        .send-icon {
            position: absolute;
            right: 10px; 
            top: 50%;
            transform: translateY(-50%);
            cursor: pointer;
            background-color: #444;
            color: white !important;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: background 0.2s;
        }
        .send-icon:hover {
            background-color: #555;
        }
        .btn-primary {
            background-color: #4e4e4e !important;
            border: none !important;
            margin-top: 0px;
            font-size: 0.8rem;
        }