  :root {
            --primary-bg: #0a0a0a;
            --sidebar-bg: #111111;
            --chat-bg: #151515;
            --message-user: #2a2a2a;
            --message-bot: #222222;
            --text-primary: #f0f0f0;
            --text-secondary: #b0b0b0;
            --accent: #3a3a3a;
            --border: rgba(255, 255, 255, 0.05);
            --highlight: rgba(255, 255, 255, 0.03);
            --suggestion-bg: rgba(255, 255, 255, 0.07);
            --input-bg: rgba(255, 255, 255, 0.03);
        }

        .theme-light {
            --primary-bg: #f5f5f5;
            --sidebar-bg: #ffffff;
            --chat-bg: #f9f9f9;
            --message-user: #e3e3e3;
            --message-bot: #ffffff;
            --text-primary: #333333;
            --text-secondary: #666666;
            --accent: #e0e0e0;
            --border: rgba(0, 0, 0, 0.1);
            --highlight: rgba(0, 0, 0, 0.03);
            --suggestion-bg: rgba(0, 0, 0, 0.05);
            --input-bg: rgba(0, 0, 0, 0.03);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        body {
            background-color: var(--primary-bg);
            color: var(--text-primary);
            height: 100vh;
            display: flex;
            overflow: hidden;
        }

        .sidebar {
            width: 280px;
            background-color: var(--sidebar-bg);
            border-right: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            height: 100vh;
            position: relative;
        }

        .sidebar::after {
            content: '';
            position: absolute;
            top: 0;
            right: -2px;
            width: 2px;
            height: 100%;
            background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(255, 255, 255, 0.05));
            pointer-events: none;
        }

        .logo {
            padding: 24px;
            font-size: 18px;
            font-weight: 600;
            letter-spacing: 0.5px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .typing-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background-color: var(--text-primary);
    animation: blink 1s infinite;
    vertical-align: middle;
    margin-left: 2px;
    opacity: 0.7;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.theme-light .typing-cursor {
    background-color: var(--text-primary);
    opacity: 0.9;
}

        .logo-icon {
            width: 24px;
            height: 24px;
            background: linear-gradient(135deg, #555555, #333333);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .model-selector {
            padding: 20px;
            border-bottom: 1px solid var(--border);
        }

        select {
            width: 100%;
            padding: 10px 12px;
            background-color: var(--chat-bg);
            color: var(--text-primary);
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 14px;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 10px center;
            background-size: 16px;
        }

        select:focus {
            outline: none;
            border-color: rgba(255, 255, 255, 0.1);
            box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.03);
        }

        .status {
            padding: 16px 20px;
            font-size: 13px;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: #4CAF50;
        }

        .status.connecting .status-dot {
            background-color: #07cdff;
            animation: pulse 1.5s infinite;
        }

        .status.error .status-dot {
            background-color: #F44336;
        }

        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
            position: relative;
        }

        .chat-header {
            padding: 16px 24px;
            border-bottom: 1px solid var(--border);
            font-weight: 500;
            font-size: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .chat-messages {
            flex: 1;
            padding: 24px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 20px;
            background: linear-gradient(180deg, rgba(10, 10, 10, 0.8) 0%, rgba(10, 10, 10, 0) 20%);
        }

        .welcome-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: calc(100vh - 200px);
            text-align: center;
            padding: 40px;
            margin-top: -30px;
            margin-left: -90px;
        }

        .welcome-message {
            max-width: 500px;
            animation: fadeIn 1s ease-out;
        }

        .welcome-message h3 {
            font-weight: 500;
            font-size: 24px;
            margin-bottom: 16px;
            color: var(--text-primary);
            opacity: 0.9;
        }

        .welcome-message p {
            font-size: 15px;
            color: var(--text-secondary);
            line-height: 1.6;
            margin-bottom: 32px;
        }

        .suggestions-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            width: 100%;
            max-width: 600px;
            margin-top: 24px;
        }

        .suggestion-card {
            padding: 10px;
            background-color: var(--suggestion-bg);
            border-radius: 12px;
            border: 1px solid var(--border);
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: left;
        }

        .suggestion-card:hover {
            background-color: rgba(255, 255, 255, 0.1);
            transform: translateY(-2px);
            border-color: rgba(255, 255, 255, 0.1);
        }

        .suggestion-card h4 {
            font-size: 15px;
            font-weight: 500;
            margin-bottom: 6px;
            color: var(--text-primary);
        }

        .suggestion-card p {
            font-size: 13px;
            color: var(--text-secondary);
            opacity: 0.7;
        }

        .input-container {
            padding: 16px 24px;
            position: relative;
            background-color: var(--chat-bg);
            border-top: 1px solid var(--border);
        }

        .input-container::before {
            content: '';
            position: absolute;
            top: -10px;
            left: 0;
            right: 0;
            height: 20px;
            background: linear-gradient(to bottom, transparent, rgba(10, 10, 10, 0.8));
            pointer-events: none;
            z-index: 1;
        }

        .input-area {
            display: flex;
            align-items: flex-end;
            background-color: var(--input-bg);
            border-radius: 12px;
            border: 1px solid var(--border);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .input-area:focus-within {
            border-color: rgba(255, 255, 255, 0.15);
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
        }

        .input-area::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
        }

        #user-input {
            flex: 1;
            padding: 16px;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 15px;
            outline: none;
            resize: none;
            min-height: 56px;
            max-height: 200px;
            line-height: 1.5;
            overflow-y: auto;
        }

        #user-input::placeholder {
            color: var(--text-secondary);
            opacity: 0.5;
        }

        .input-options {
            display: flex;
            align-items: center;
            padding-right: 8px;
        }

        #think-toggle {
            background: transparent;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 18px;
            padding: 8px;
            border-radius: 50%;
            transition: all 0.3s ease;
        }

        #think-toggle:hover {
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.1);
        }

        #think-toggle.active {
            color: #60a5fa;
            background: rgba(96, 165, 250, 0.1);
        }

        #send-button {
            padding: 0 12px;
            height: 56px;
            background: transparent;
            color: var(--text-secondary);
            border: none;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #send-button:hover {
            color: var(--text-primary);
        }

        #send-button svg {
            width: 20px;
            height: 20px;
            transition: transform 0.2s ease;
        }

        #send-button:hover svg {
            transform: translateX(2px);
        }

        .message {
            max-width: 75%;
            padding: 16px 20px;
            border-radius: 12px;
            line-height: 1.6;
            font-size: 15px;
            position: relative;
            animation: fadeIn 0.3s ease-out;
        }

        .messageconfig {
            max-width: 75%;
            padding: 16px 20px;
            border-radius: 12px;
            line-height: 1.6;
            font-size: 15px;
            position: relative;
        }

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

        .user-message {
            align-self: flex-end;
            background-color: var(--message-user);
            border: 1px solid rgba(255, 255, 255, 0.05);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            margin-left: 15%;
          
        }

        .user-config {
            align-self: flex-end;
            background-color: var(--message-user);
            border: 1px solid rgba(255, 255, 255, 0.05);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            margin-left: 15%;
        }

        .bot-message {
            align-self: flex-start;
           
            border: 1px solid rgba(255, 255, 255, 0.16);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            margin-right: 15%;
            flex-wrap: wrap;
        }

        .typing-indicator {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            background-color: var(--message-bot);
            border-radius: 18px;
            border: 1px solid var(--border);
        }

        .typing-dot {
            width: 8px;
            height: 8px;
            background-color: var(--text-secondary);
            border-radius: 50%;
            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(-4px);
            }
        }

        ::-webkit-scrollbar {
            width: 6px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 3px;
        }

        .gradient-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 80px;
            background: linear-gradient(to bottom, var(--primary-bg), transparent);
            pointer-events: none;
            z-index: 1;
        }

        @media (max-width: 768px) {
            .sidebar {
                width: 240px;
            }
            .suggestions-grid {
                grid-template-columns: 1fr;
            }
            .message {
                max-width: 85%;
            }
        }

        .hidden {
            display: none;
        }

        .message.bot-message strong {
            font-weight: bold;
            color: #4a5568;
        }

        .message.bot-message em {
            font-style: italic;
        }

        .message.bot-message code {
            background-color: var(--accent);
            padding: 2px 4px;
            border-radius: 3px;
            font-family: monospace;
            font-size: 0.9em;
        }

        .message.bot-message pre {
            background-color: var(--accent);
            padding: 10px;
            border-radius: 5px;
            overflow-x: auto;
            margin: 10px 0;
            font-family: monospace;
            font-size: 0.9em;
            line-height: 1.4;
        }

        .message.bot-message pre code {
            background-color: transparent;
            padding: 0;
        }

        .message.bot-message a {
            color: #3182ce;
            text-decoration: underline;
        }

        .message.bot-message ul {
            margin-left: 20px;
            list-style-type: disc;
            margin-bottom: 10px;
        }

        .message.bot-message li {
            margin-bottom: 5px;
        }

        .message.bot-message h1,
        .message.bot-message h2,
        .message.bot-message h3 {
            margin: 15px 0 10px 0;
            font-weight: bold;
        }

        .message.bot-message h1 {
            font-size: 1.5em;
            border-bottom: 1px solid var(--border);
            padding-bottom: 5px;
        }

        .message.bot-message h2 {
            font-size: 1.3em;
        }

        .message.bot-message h3 {
            font-size: 1.1em;
        }

        #canvas-sidebar {
            position: fixed;
            right: 0;
            top: 0;
            width: 350px;
            height: 100vh;
            background-color: var(--sidebar-bg);
            border-left: 1px solid var(--border);
            z-index: 100;
            padding: 20px;
            overflow-y: auto;
            transform: translateX(100%);
            transition: transform 0.3s ease;
        }

        #canvas-sidebar:not(.hidden) {
            transform: translateX(0);
        }

        .canvas-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--border);
        }

        .canvas-header h3 {
            font-size: 18px;
            font-weight: 500;
        }

        #close-canvas {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 24px;
            cursor: pointer;
            padding: 0 10px;
        }

        .canvas-content {
            font-size: 14px;
            line-height: 1.6;
        }

        #canvas-toggle {
            position: fixed;
            right: 20px;
            margin-left: 4em;
            bottom: 90px;
            background-color: var(--message-bot);
            border: 1px solid var(--border);
            color: var(--text-primary);
            padding: 10px 15px;
            border-radius: 9px;
            cursor: pointer;
            z-index: 99;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
        }

        #canvas-toggle:hover {
            background-color: var(--message-user);
        }

        .bot-avatar {
            display: inline-flex;
            position: relative;
            width: 40px;
            height: 40px;
            margin-right: 10px;
            vertical-align: middle;
        }
        
        .bot-avatar-image {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--border);
        }

        .typing-cursor {
            display: inline-block;
            width: 8px;
            height: 16px;
            background-color: var(--text-primary);
            animation: blink 1s infinite;
            vertical-align: middle;
            margin-left: 2px;
        }

        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0; }
        }

        .theme-selector {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border);
        }

        .theme-buttons {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }

        .theme-button {
            flex: 1;
            padding: 8px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background-color: var(--input-bg);
            color: var(--text-primary);
            cursor: pointer;
            text-align: center;
            transition: all 0.2s ease;
        }

        .theme-button:hover {
            background-color: var(--accent);
        }

        .theme-button.active {
            border-color: var(--text-primary);
            font-weight: 500;
        }

        .plugins-container {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border);
        }

        .plugins-list {
            margin-top: 10px;
        }

        .plugin-item {
            display: flex;
            align-items: center;
            padding: 8px 0;
        }

        .plugin-toggle {
            position: relative;
            display: inline-block;
            width: 36px;
            height: 20px;
            margin-right: 10px;
        }

        .plugin-toggle input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .plugin-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: var(--accent);
            transition: .4s;
            border-radius: 20px;
        }

        .plugin-slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 2px;
            bottom: 2px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }

        input:checked + .plugin-slider {
            background-color: #60a5fa;
        }

        input:checked + .plugin-slider:before {
            transform: translateX(16px);
        }

        .plugin-name {
            font-size: 14px;
        }

        .search-results {
            margin-top: 10px;
            padding: 10px;
            background-color: var(--accent);
            border-radius: 8px;
            border: 1px solid var(--border);
            font-size: 14px;
        }

        .search-result-item {
            margin-bottom: 8px;
            padding-bottom: 8px;
            border-bottom: 1px dashed var(--border);
        }

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

        .tech-badge {
            display: inline-block;
            padding: 2px 6px;
            background-color: rgba(96, 165, 250, 0.2);
            border-radius: 4px;
            font-size: 0.8em;
            margin-right: 5px;
        }

        .tech-date {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            font-size: 0.85em;
            opacity: 0.8;
        }