 /* Messages */
        .message {
            display: flex;
            gap: 12px;
            margin-bottom: var(--message-gap);
            padding: 16px;
            position: relative;
            animation: fadeInUp 0.4s ease;
            border-radius: var(--border-radius);
            transition: var(--transition);
        }

        .message:hover {
            background: rgba(var(--bg-secondary-rgb), 0.5);
        }

        .message.user {
            background: rgba(var(--accent-rgb), 0.05);
            border-left: 3px solid var(--accent-color);
        }

        .message.assistant {
            background: rgba(var(--bg-secondary-rgb), 0.3);
        }

        .message-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: white;
            flex-shrink: 0;
            margin-top: 4px;
            font-size: 13px;
            box-shadow: var(--shadow-md);
        }

        .message.user .message-avatar {
            background: var(--accent-color);
        }

        .message.assistant .message-avatar {
            background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
        }

        .message-content {
            flex: 1;
            min-width: 0;
        }

        .message-text {
            line-height: 1.7;
            white-space: pre-wrap;
            word-break: break-word;
            font-size: 15px;
        }

        .message-text pre {
            background: var(--bg-tertiary);
            padding: 16px;
            border-radius: var(--border-radius-sm);
            overflow-x: auto;
            margin: 12px 0;
            font-family: var(--font-mono);
            font-size: 14px;
            border-left: 3px solid var(--accent-color);
        }

        .message-text code {
            background: var(--bg-tertiary);
            padding: 3px 6px;
            border-radius: 4px;
            font-family: var(--font-mono);
            font-size: 14px;
        }

        .message-text blockquote {
            border-left: 3px solid var(--accent-color);
            padding-left: 16px;
            margin: 12px 0;
            color: var(--text-secondary);
            font-style: italic;
        }

        .message-actions {
            display: flex;
            gap: 8px;
            margin-top: 16px;
            opacity: 0;
            transition: var(--transition);
            flex-wrap: wrap;
        }

        .message:hover .message-actions {
            opacity: 1;
        }

        .action-btn {
            padding: 6px 10px;
            background: transparent;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius-sm);
            cursor: pointer;
            font-size: 11px;
            color: var(--text-secondary);
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .action-btn:hover {
            background: var(--bg-secondary);
            color: var(--text-primary);
        }

        .action-btn.liked {
            background: var(--accent-color);
            color: white;
            border-color: var(--accent-color);
        }

        .action-btn.disliked {
            background: var(--danger-color);
            color: white;
            border-color: var(--danger-color);
        }
  
        /* Input area */
        .input-container {
            padding: 16px;
            background: var(--bg-primary);
            border-top: 1px solid var(--border-color);
            position: sticky;
            bottom: 0;
            backdrop-filter: blur(10px);
        }

        .input-wrapper {
            position: relative;
            max-width: 800px;
            margin: 0 auto;
            width: 100%;
        }
        @media (max-width : 1128px) {
            .input-wrapper {
                width: 80%;
                align-items: left;
            }
        }

        .input-box {
            width: 100%;
            padding: 14px 52px 14px 16px;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            background: var(--bg-primary);
            color: var(--text-primary);
            font-size: 14px;
            outline: none;
            transition: var(--transition);
            resize: none;
            min-height: 56px;
            max-height: 200px;
            line-height: 1.6;
            box-shadow: var(--shadow-md);
        }

        .input-box:focus {
            border-color: var(--accent-color);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        .input-box::placeholder {
            color: var(--text-secondary);
            opacity: 0.7;
        }

        .send-btn {
            position: absolute;
            right: 12px;
            bottom: 12px;
            width: 32px;
            height: 32px;
            background: var(--accent-color);
            border: none;
            border-radius: 50%;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
            box-shadow: var(--shadow-md);
        }

        .send-btn:hover {
            background: var(--accent-hover);
            transform: scale(1.1);
        }

        .send-btn:disabled {
            background: var(--text-secondary);
            cursor: not-allowed;
            transform: scale(1);
        }

        
        /* Typing indicator */
        .typing-indicator {
            display: flex;
            gap: 6px;
            padding: 16px;
            align-items: center;
        }

        .typing-dot {
            width: 8px;
            height: 8px;
            background: var(--accent-color);
            border-radius: 50%;
            animation: typing 1.4s infinite;
        }

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

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

        .typing-text {
            font-size: 14px;
            color: var(--text-secondary);
            margin-left: 8px;
        }

        /* Edit modal */
        .edit-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            pointer-events: none;
            transition: var(--transition);
            backdrop-filter: blur(5px);
        }

        .edit-modal.open {
            opacity: 1;
            pointer-events: all;
        }

        .edit-modal-content {
            background: var(--bg-primary);
            border-radius: var(--border-radius);
            width: 600px;
            max-width: 90%;
            max-height: 80vh;
            overflow: hidden;
            box-shadow: var(--shadow-lg);
            transform: translateY(20px);
            transition: var(--transition);
            display: flex;
            flex-direction: column;
            border: 1px solid var(--border-color);
        }

        .edit-modal.open .edit-modal-content {
            transform: translateY(0);
        }

        .edit-modal-header {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .edit-modal-title {
            font-size: 18px;
            font-weight: 600;
        }
        
        .edit-modal-body {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
        }

        .edit-textarea {
            width: 100%;
            min-height: 200px;
            padding: 16px;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius-sm);
            background: var(--bg-primary);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 15px;
            line-height: 1.6;
            resize: none;
            outline: none;
            transition: var(--transition);
        }

        .edit-textarea:focus {
            border-color: var(--accent-color);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        .edit-modal-footer {
            padding: 16px 20px;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }

        .modal-btn {
            padding: 8px 16px;
            border-radius: var(--border-radius-sm);
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: var(--transition);
        }

        .modal-btn.primary {
            background: var(--accent-color);
            color: white;
            border: none;
        }

        .modal-btn.primary:hover {
            background: var(--accent-hover);
        }

        .modal-btn.secondary {
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-primary);
        }

        .modal-btn.secondary:hover {
            background: var(--bg-secondary);
        }
        
        /* Copy to canvas search box */
        .copy-search-box {
            position: fixed;
            bottom: 100px;
            right: 20px;
            width: calc(100% - 40px);
            max-width: 400px;
            background: var(--bg-primary);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-lg);
            z-index: 100;
            transform: translateY(20px) scale(0.95);
            opacity: 0;
            transition: var(--transition);
            overflow: hidden;
            border: 1px solid var(--border-color);
        }

        .copy-search-box.open {
            transform: translateY(0) scale(1);
            opacity: 1;
        }

        .copy-search-header {
            padding: 16px;
            border-bottom: 1px solid var(--border-color);
            font-weight: 600;
            font-size: 15px;
        }

        .copy-search-body {
            padding: 16px;
        }

        .copy-search-input {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius-sm);
            background: var(--bg-primary);
            color: var(--text-primary);
            font-size: 14px;
            outline: none;
            margin-bottom: 12px;
            transition: var(--transition);
        }

        .copy-search-input:focus {
            border-color: var(--accent-color);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        .copy-search-footer {
            padding: 16px;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: flex-end;
            gap: 8px;
        }

/* Empty state */
        .empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            text-align: center;
            color: var(--text-secondary);
            padding: 40px 20px;
            animation: fadeIn 0.5s ease;
        }

        .empty-state h2 {
            font-size: 24px;
            margin-bottom: 16px;
            color: var(--text-primary);
            font-weight: 600;
            background: linear-gradient(90deg, var(--accent-color), #8b5cf6);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .empty-state p {
            font-size: 15px;
            max-width: 600px;
            line-height: 1.7;
            margin-bottom: 24px;
        }

        .empty-icon {
            font-size: 64px;
            margin-bottom: 24px;
            opacity: 0.8;
        }
        
        @keyframes typing {
            0%, 60%, 100% {
                transform: translateY(0);
                opacity: 0.6;
            }
            30% {
                transform: translateY(-4px);
                opacity: 1;
            }
        }

         
/* Add this to your existing media query for mobile */
@media (max-width: 768px) {
    /* Make message actions always visible on mobile */
    .message-actions {
        opacity: 1 !important; /* Override hover effect */
        margin-top: 8px;
    }
    
    /* Adjust action buttons for mobile */
    .action-btn {
        padding: 8px 12px;
        font-size: 12px;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
    }
    
    /* Remove hover effects on mobile */
    .message:hover {
        background: transparent !important;
    }
    
    /* Make chat action buttons always visible */
    .chat-actions {
        opacity: 1 !important;
    }
    
    /* Adjust chat history items for mobile */
    .chat-history-item {
        padding: 10px 8px;
    }
    
    /* Make chat action buttons more touch-friendly */
    .chat-action-btn {
        width: 28px;
        height: 28px;
    }
}
/*  */
/* Optional: Add touch feedback for buttons */
@media (hover: none) {
    .action-btn:active, 
    .chat-action-btn:active,
    .toolbar-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}
    