AI Screen Edge Glow Effect CSS
A glow around the edge of the screen that shows an AI assistant is active, while the content in the middle stays untouched and readable. The colors travel around the frame, a thin sharp line sits on the very edge, and a soft glow fades in from it. The switch in the card turns the glow on and off, and the heading changes to match.
The frame is a conic-gradient whose starting angle comes from a custom property registered with @property, animated from 0deg to 360deg. A mask of two layers, one clipped to the content box and one covering the whole box, combined with exclude, cuts the gradient down to a band as wide as the padding. The soft layer is the same band, wider and blurred with filter, and it reaches past the edges so the blur does not fade out at the border. The switch uses body:has(#glow-toggle:checked), so no JavaScript is needed.
The glow is fixed to the viewport and ignores the pointer, so everything under it still works. To frame a card or a phone mockup instead, use absolute instead of fixed positioning inside a positioned parent with overflow hidden. The animation pauses while the glow is off and stops for visitors who prefer reduced motion. It works in current Chrome, Edge, Firefox and Safari, which all support @property, :has() and mask-composite.