/* Layout */
body {
	display: flex;
	background: black;
	height: 100vh;
	font-size: 10vw;
	margin: 0;
	padding: 0;
}
#clock {
	margin: auto;
	display: flex;
}
/* 3d effects */
#clock div {
	transform-style: preserve-3d;
	perspective: 90vw;
}
/* Basic styles of each digit */
#clock div div {
	width: 1em;
	height: 1em;
	border: 1px solid green;
	margin: .1em .05em;
	transition: transform .5s cubic-bezier(.35,-0.7,.69,1.7),
				background 0s .25s;
}
/* Invisible digits */
#clock div:nth-of-type(2n + 1) div:first-child,
#clock div:first-child div:nth-child(2) {
	border-color: black;
}
/* This is the whole logic: */
.t1 div:nth-of-type(4),
.t2 div:nth-of-type(3),
.t3 div:nth-of-type(4),
.t3 div:nth-of-type(3),
.t4 div:nth-of-type(2),
.t5 div:nth-of-type(2),
.t5 div:nth-of-type(4),
.t6 div:nth-of-type(2),
.t6 div:nth-of-type(3),
.t7 div:nth-of-type(2),
.t7 div:nth-of-type(3),
.t7 div:nth-of-type(4),
.t8 div:nth-of-type(1),
.t9 div:nth-of-type(1),
.t9 div:nth-of-type(4){
	background: green;
	transform: rotateY(180deg);
}
/* Using prime number pseudo-random for colour effects */
.t2, .t4, .t8 {
	filter: hue-rotate(72deg);
}
.t5, .t0 {
	filter: hue-rotate(144deg);
}
.t7 {
	filter: hue-rotate(216deg);
}
.t3, .t6, .t9 {
	filter: hue-rotate(288deg);
}
/* That’s it. */