The :playing, :paused, :seeking, :buffering, :stalled, :muted, and :volume-locked CSS pseudo-classes match <audio> and <video> elements based on their state. This is one of the focus areas in https://wpt.fyi/interop-2026.
Allows styling of media elements or custom media controls based on the state of the media element. For example, a large play button overlaying a video could be hidden while playing. There is no expectation that custom media controls can be implemented entirely with CSS, as there is still a lot of state not exposed to CSS.