Fix logic for daytime/nighttime CSS