()
| 63 | document.getElementById('darkmode-label').textContent = theme === 'dark' ? '🌙' : '☀️'; |
| 64 | } |
| 65 | function getSystemTheme() { |
| 66 | return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; |
| 67 | } |
| 68 | // On load, use localStorage or system default to determine theme |
| 69 | (function() { |
| 70 | let theme = localStorage.getItem('theme'); |