Income Taxes - Effective Income Tax Reconciliation (Details) - USD ($) $ in Thousands |
3 Months Ended | 12 Months Ended | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Dec. 31, 2019 |
Sep. 30, 2019 |
Jun. 30, 2019 |
Mar. 31, 2019 |
Dec. 31, 2018 |
Sep. 30, 2018 |
Jun. 30, 2018 |
Mar. 31, 2018 |
Dec. 31, 2019 |
Dec. 31, 2018 |
Dec. 31, 2017 |
|
| Income Tax Disclosure [Abstract] | |||||||||||
| Income (loss) before provision for (benefit from) income taxes | $ 676,950 | $ 70,666 | $ 327,138 | $ 320,165 | $ 32,497 | $ 136,511 | $ 216,591 | $ 214,642 | $ 1,394,919 | $ 600,241 | $ (15,689) |
| Expected provision for (benefit from) income taxes | 292,933 | 126,051 | (5,491) | ||||||||
| State taxes, net of federal benefit | 8,478 | 8,680 | 4,742 | ||||||||
| Foreign income tax rate differential | 6,178 | 23,427 | 77,801 | ||||||||
| Tax credits | (59,459) | (52,629) | (58,204) | ||||||||
| Benefit from income taxes attributable to valuation allowances | (2,672) | (1,563,169) | (575,801) | ||||||||
| Permanent items | 4,822 | 1,421 | 15,324 | ||||||||
| Tax rate change | 0 | 0 | 575,192 | ||||||||
| Stock compensation (benefit) shortfalls and cancellations | (56,324) | (49,044) | (21,453) | ||||||||
| Officer’s compensation | 10,666 | 8,310 | 6,501 | ||||||||
| Deconsolidation of VIE | 0 | (9,390) | (126,183) | ||||||||
| Uncertain tax positions | 14,070 | 15,431 | 0 | ||||||||
| Other | (583) | 4,050 | 248 | ||||||||
| Provision for (benefit from) income taxes | $ 93,716 | $ 13,148 | $ 59,711 | $ 51,534 | $ (1,492,599) | $ 8,055 | $ 10,341 | $ (12,659) | $ 218,109 | $ (1,486,862) | $ (107,324) |