## 3 Results and Discussion
### CECs
These findings suggest a strong link between nutrient levels and the presence of trimethoprim in aquatic environments. The Random Forest regression model for carbamazepine resulted in a high Out-of-Bag (OOB) error of 121.876, indicating substantial prediction uncertainty (Table S3, Supplementary Materials). However, the variable importance analysis identifies pH, total phosphorus (P total), phosphate (P-PO\({}_{4}\)), and chlorophyll-a as the influential parameters  
Figure 5: Random Forest regression results for trimethoprim. (**Left**) Scatter plot comparing observed and predicted trimethoprim concentrations, where the dashed line represents the ideal 1:1 correlation. (**Right**) Variable importance analysis indicating the most influential physico-chemical parameters affecting trimethoprim concentrations. affecting carbamazepine concentrations showing that carbamazepine behavior in aquatic environments is strongly influenced by physico-chemical parameters. An analysis of the relationship between physico-chemical properties (pKa, LogP) and Random Forest model performance (OOB error, variable importance) highlights the influence of environmental parameters on the persistence and distribution of pharmaceutical compounds in water (Table S3, Supplementary Materials). Compounds with moderate pKa values (4-6), such as sulfamethoxazole (SMX, pKa = 5.6), ketoprofen (KET, pKa = 4.5), and diclofenac (DCF, pKa = 4.0), show significant correlation with pH (DCF-pH: 5.32; SMX-pH: 5.06), indicating that their solubility and ionization state are strongly pH-dependent. The correlation analysis highlights that compounds with higher pKa and log P values exhibit a positive correlation with OOB error (0.31 and 0.32, respectively), suggesting that more hydrophobic and weakly acidic compounds introduce greater prediction uncertainty (Table S3, Supplementary Materials). Carbamazepine (CBZ), pravastatin (PRV), and diclofenac (DCF) correlate positively with P-PO\({}_{4}\) and P total; Log P is negatively correlated with N-NH\({}_{4}\) (\(-\)0.68), indicating that hydrophobic compounds are less influenced by ammonium presence, likely due to stronger sorption to organic matter. pKa negatively correlates with N-NH\({}_{4}\) (\(-\)0.47) and N-total (\(-\)0.48), showing that ionizable compounds are more influenced by nitrogen species (Table S3, Supplementary Materials). The detection of pharmaceutical residues in the Danube River and the Black Sea within our study confirms the increasing concern regarding emerging contaminants (CECs) in aquatic environments. The presence of sulfamethoxazole, trimethoprim, carbamazepine, diclofenac, and bisphenol A in the analyzed samples (Table 4) aligns with findings from previous studies conducted in other European river basins. Diclofenac, a widely used nonsteroidal anti-inflammatory drug (NSAID), was detected at concentrations reaching up to 132 ng/L in the present study (Table 4). This finding is consistent with reports from other major European rivers, such as the Rhine and Elbe, where diclofenac concentrations ranged from 50 to 200 ng/L [51; 52]. Similarly, a study on the Danube River conducted as part of the Joint Danube Survey (JDS3, 2013) found diclofenac levels exceeding 100 ng/L in several sections, particularly near urban areas with high wastewater discharge [53]. Carbamazepine, an anticonvulsant known for its persistence in aquatic environments, was found in 28 out of 32 sampling sites in this study (Table 4), with concentrations averaging 18.05 ng/L. Research on the Elbe River, Czech Republic and its tributaries reported median carbamazepine concentrations ranging from 12 ng/L to 54.5 ng/L [54]. A study assessing human health risks associated with carbamazepine in surface waters of North America and Europe found that the 90 th percentile measured environmental concentrations (MECs) ranged from 150 to 220 ng/L, while the 90 th percentile predicted environmental concentrations (PECs) ranged from 333 to 658 ng/L [55].