export default defineNuxtPlugin(() => { // Client-side only theme initialization to prevent flash of wrong theme if (process.client) { const saved = localStorage.getItem('theme') const isDark = saved === 'dark' || (!saved && window.matchMedia('(prefers-color-scheme: dark)').matches) // Apply class immediately for Tailwind document.documentElement.classList.toggle('dark', isDark) } })