Detect presence of solid object
You could implement a capacitive sensor on the top of the box.  Plastic has a relative permittivity which is about 2.0 or greater and glass is greater than 4.0.  So both should be easily distinguishable from air which is essentially 1.0.

The Arduino CapSense library uses a very simple GPIO pin based method for measuring capacitance.  You could easily do this on your project.  The most interesting part would be designing the sensor layout to maximize the reliability of detecting the object of interest without false readings e.g. when someone's hand is near the surface.

The sensor would work by the glass or plastic object causing the fringing field capacitance between the two sensor electrodes to increase when the object is present, compared to the capacitance when only air is present above the sensor surface.  One electrode would be connected to ground and the other electrode to the MCU "receive pin" as in the following diagram:



Now I expect you'd want to use two electrodes and use the fringing field capacitance to do the sensing, rather than the "one-electrode" model used in the above figure, since the plastic or glass object won't be well coupled to ground.

You could use a spot sensor, like a circular sensor and a surrounding ground plane, or you could implement a wider-area sensor using interdigitated coplanar electrodes.