:root {
	--border-animation-color: #fcfc01;
	--border-animation-speed: 6s;
	--border-animation-width: 2px;
}

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

@keyframes borderRotate {
	to {
		--border-animation-angle: 1turn;
	}
}

/* Parpadeo irregular */
@keyframes electricFlicker {
	0%, 100% { opacity: 1; }
	10% { opacity: 0.6; }
	15% { opacity: 1; }
	30% { opacity: 0.7; }
	35% { opacity: 1; }
	60% { opacity: 0.8; }
	65% { opacity: 1; }
}

.ct-border-animation {
	position: relative;
	overflow: hidden;
}

.ct-border-animation:after {
	pointer-events: none;
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: var(--border-animation-width);

	animation:
		borderRotate var(--border-animation-speed) linear infinite,
		electricFlicker 1.2s infinite;

	background: conic-gradient(
		from var(--border-animation-angle),
		transparent 0%,
		transparent 70%,
		#fcfc01 78%,
		#ffffff 80%,
		#fcfc01 83%,
		transparent 88%,
		transparent 100%
	);

	-webkit-mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;

	box-shadow:
		0 0 6px #fcfc01,
		0 0 12px #fcfc01,
		0 0 20px #fcfc01;
}