冥思苦想

míng sī kǔ xiǎng

to consider from all angles (idiom); to think hard

to rack one's brains

míng

dark

to think

bitter

xiǎng

to think (about)