Dark mode lowers the overall brightness and glare from the screen, which helps reduce eye strain especially in low-light environments.
In Tailwind, the 'dark:' prefix applies styles only when dark mode is active. So 'bg-blue-500 dark:bg-blue-700' means light mode uses blue-500 and dark mode uses blue-700.
White text on a black background reduces blue light and glare, making it easier to read in dark settings and reducing eye fatigue.
Setting 'darkMode' to 'media' tells Tailwind to apply dark styles based on the user's OS preference using the prefers-color-scheme media query.
Good accessibility means ensuring text is easy to read with enough contrast and giving users control to choose their preferred mode.
