* {
	box-sizing: border-box;
}
:root {
	--clr-bg: #011920;
	--clr-1: red;
	--clr-2: blue;
	--clr-3: rgb(175, 208, 84);
}

@property --angle {
	syntax: "<angle>";
	initial-value: 0deg;
	inherits: false;
}

body {
	min-height: 100svh;
	background-color: var(--clr-bg);
	display: grid;
	place-content: center;
	perspective: 1000px;
	background-image: radial-gradient(
		circle,
		rgba(175, 208, 84, 0.25) 1px,
		rgba(0, 0, 0, 0) 1px
	);
	background-size: 40px 40px;
	background-attachment: fixed;
}
.wrapper {
	position: relative;
	width: 200px;
	height: 200px;
	display: grid;
}
.wrapper > .ring {
	--speed-neon: 2000ms;
	--speed-rotation: 10000ms;

	--scale: calc(1 - (var(--i) * 0.1));
	--rotate-z: 180deg;
	--rotate-x: 360deg;
	--rotate-y: calc(var(--i) * 5deg);
	--translate-z: calc(var(--i) * -55px);

	width: 100%;
	height: 100%;
	grid-area: 1/1;
	border: 30px solid transparent;
	border-radius: 50%;
	filter: blur(1px);

	background: linear-gradient(var(--clr-bg) 0 0) padding-box,
		conic-gradient(
				from var(--angle),
				var(--clr-2),
				var(--clr-1),
				var(--clr-3),
				var(--clr-2)
			)
			border-box;
	animation-name: neon-rotate, rotate;
	animation-duration: var(--speed-neon), var(--speed-rotation);
	animation-direction: normal, alternate;
	animation-timing-function: linear, ease-in-out;
	animation-iteration-count: infinite;
	mask: linear-gradient(red, red),
		radial-gradient(circle, red 73px, #0000 0) center no-repeat;
	mask-composite: exclude;
}
@keyframes neon-rotate {
	from {
		--angle: 0deg;
	}
	to {
		--angle: 360deg;
	}
}
@keyframes rotate {
	from {
		transform: rotateZ(0deg) rotateY(0deg) rotateX(0deg) translateZ(0px)
			scale(0.5);
	}
	to {
		transform: rotateZ(var(--rotate-z)) rotateY(var(--rotate-y))
			rotateX(var(--rotate-x)) translateZ(var(--translate-z)) scale(var(--scale));
	}
}

