html {
	--glass: rgba(255,255,255,.33);
	--background:#15263c;
	
	/* opties */
	--red: #990000;
	--blue: #003399;
	--green: #006600;
	--yellow: #cc9900;
	--purple: #663399;
	--white: #cccccc;
	
	/* variables */
	--outerColor: var(--red);
    --middleColor: var(--white);
    --innerColor: var(--red);
    --centerColor: var(--blue);
	--shapeColor: var(--white);
	
	/* snelheid */
	--tempo:1s;
}

html.traag {
	/* snelheid */
	--tempo:3s;
}

*, *::before, *::after{
	box-sizing:border-box;
	margin:0;
	padding:0;
	
	font-family: 'Courier New', Courier, monospace;
}

html {
	background-color:var(--background);
}

body {
    background-color:var(--background);
	
	color:var(--white);
    height: 100vh;
	
	display: flex;
    justify-content: center;
    align-items: center;
	
    overflow: hidden;
}

/**************/
/* THE SHIELD */
/**************/
.shield {
    position: relative;
    width: 300px; height: 300px;
    top: 0; left: 0;
	
	z-index: 100;
}

.shadow {
    position: absolute;
    width: 400px; height: 20px;
    left: 4rem; top: 18.6rem;
	
    border-radius: 50%;
    background: #070707;
    opacity: 0.4;
	filter: blur(4px);
	
	transition:calc(var(--tempo) * 4);
}

.circle {
	position: absolute;
	border-radius: 50%;
	
	display:flex;
	justify-content: center;
	align-items: center;
}

.outside {
    width: 100%; height: 100%;
    background-color: var(--outerColor);
	transition:all calc(var(--tempo) * 4), background 0s;
	right:0;
}
.outside::after {
    content: '';
    position: absolute;
    width: 70px; height: 30px;
	
    top: 135px; left: 115px;
    
	transform: rotate(146deg) translateY(115px);
    background: #fff;
    border-radius: 50%;
    filter: blur(12px);
    opacity: 0.8;
    box-shadow: 0px 0px 20px 8px var(--glass);
	transition:calc(var(--tempo) * 4);
}

.middle {
    width: 80%; height: 80%;
    background-color: var(--middleColor);
}

.inner {
    width: 75%; height: 75%;
    background-color: var(--innerColor);
}

.center {
    width: 65%; height: 65%;
    background: var(--centerColor);
}

.shape {
    width: 90%; height: 90%;
    background-color: var(--shapeColor);
	
	-webkit-clip-path: var(--startShape);
	clip-path: var(--startShape);
}

html {
	--startShape: var(--starShape);
}

/* animaties */
@keyframes shieldBounce {
    0% { transform:scale(1.15, .85); }
    50% { transform:scale(.9, 1.1) translateY(-15rem); }
    100% { transform:scale(1.15, .85); }
}

@keyframes shadowBounce {
    0% { width: 400px; height: 20px; top: 98%; }
    50% { width: 600px; height: 30px; top: 155%; }
    100% { width: 400px; height: 20px; top: 98%; }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotateShine {
    0% { transform: rotate(146deg) translateY(115px);}
    100% { transform: rotate(-214deg) translateY(115px);}
}

.shield.bounce {
	animation: shieldBounce calc(var(--tempo) * 2) ease-in-out infinite;
}
 
.shadow.bounce {
	animation: shadowBounce calc(var(--tempo) * 2) ease-in-out infinite;
}
.shadow.left {
	left:-21rem;
}
.shadow.right {
	left:29rem;
}

.outside.rotate {
	animation: rotate calc(var(--tempo) * 2) linear infinite;	
}
.outside.rotate::after {
	animation: rotateShine calc(var(--tempo) * 2) linear infinite;	
}

.outside.left {
	transform:rotate(-270deg);
	right:25rem	
}
.outside.left::after {
	transform: rotate(416deg) translateY(115px);
}

.outside.right {
	transform:rotate(270deg);
	right:-25rem	
}
.outside.right::after {
	transform: rotate(-124deg) translateY(115px);
}


/*****************/
/* SHIELD SHAPES */
/*****************/
:root{
	--starShape: polygon(
		50% 0,
		61.2% 34.5%,
		97.6% 34.5%,
		68.2% 55.9%,
		79.4% 90.4%,
		50% 69%,
		20.6% 90.4%,
		31.8% 55.9%,
		2.4% 34.5%,
		38.8% 34.5%,
		50% 0
	);
	
	--toStarShape: polygon(
		50% 0,
		61.2% 34.5%,
		61.2% 34.5%,
		68.2% 55.9%,
		79.4% 90.4%,
		50% 80.15%,
		20.6% 90.4%,
		31.8% 55.9%,
		38.8% 34.5%,
		38.8% 34.5%,
		50% 0
	);
	
	--eenShape: polygon(
		60% 5%,
		60% 80%,
		70% 80%,
		70% 90%,
		30% 90%,
		30% 80%,
		40% 80%,
		40% 25%,
		30% 25%,
		30% 20%,
		60% 5%
	);
	
	--toEenShape: polygon(
		60% 5%,
		60% 40%,
		70% 60%,
		70% 90%,
		30% 90%,
		30% 60%,
		30% 60%,
		40% 40%,
		40% 40%,
		40% 15%,
		60% 5%
	);
	
	--chevronsShape: polygon(
		50% 10%,
		90% 50%,
		50% 30%,
		50% 40%,
		90% 80%,
		50% 60%,
		10% 80%,
		50% 40%,
		50% 30%,
		10% 50%,
		50% 10%
	);
	
	--antiChevronsShape: polygon(
		50% 40%,
		90% 20%,
		50% 60%,
		50% 70%,
		90% 50%,
		50% 90%,
		10% 50%,
		50% 70%,
		50% 60%,
		10% 20%,
		50% 40%
	);
	
	--toChevronsShape: polygon(
		50% 10%,
		90% 50%,
		90% 50%,
		90% 80%,
		90% 80%,
		50% 60%,
		10% 80%,
		10% 80%,
		10% 50%,
		10% 50%,
		50% 10%
	);
}

/* transities mbv animaties */
@keyframes toStar {
	0%{
		-webkit-clip-path: var(--startShape);
		clip-path: var(--startShape);
	}
	50%{
		-webkit-clip-path: var(--toStarShape);
		clip-path: var(--toStarShape);
	}
	100%{
		-webkit-clip-path: var(--starShape);
		clip-path: var(--starShape);
	}
}

@keyframes toEen {
	0%{
		-webkit-clip-path: var(--startShape);
		clip-path: var(--startShape);
	}
	50%{
		-webkit-clip-path: var(--toEenShape);
		clip-path: var(--toEenShape);
	}
	100%{
		-webkit-clip-path: var(--eenShape);
		clip-path: var(--eenShape);
	}
}

@keyframes toChevrons {
	0%{
		-webkit-clip-path: var(--startShape);
		clip-path: var(--startShape);
	}
	50%{
		-webkit-clip-path: var(--toChevronsShape);
		clip-path: var(--toChevronsShape);
	}
	100%{
		-webkit-clip-path: var(--chevronsShape);
		clip-path: var(--chevronsShape);
	}
}

/* de animatie */
.starShape .shape {
	animation: toStar calc(var(--tempo) * 2) forwards;
}
.eenShape .shape {
	animation: toEen calc(var(--tempo) * 2) forwards;
}
.chevronsShape .shape {
	animation: toChevrons calc(var(--tempo) * 2) forwards;
}

/**********************/
/* OPTIONS CONTAINERS */
/**********************/
aside {
    position: absolute;
	height:100%;
    top:0;
	padding:2em;
    font-size: 1.5rem;
}
.animationPanel {
	left:0;
	background-position: right center;
}
.stylePanel {
	right:0;	
	background-color:rgba(17,30,48,.5);
	z-index:200;
	transition: calc(var(--tempo) / 2);
	
	transform:translateX(95%);
}

.stylePanel.show {
	transform:translateX(0);
}

.stylePanel > div {
	position: absolute;
	width:4.5rem; height:2.25rem;
	top:2em; left:-2.25rem;
	padding-top:1.25rem;
	
	text-align:center;
	background: inherit;
	color:transparent;
	border-radius:.375em .375em 0 0;
	
	transform-origin: bottom center;
	transform: rotate(-90deg);
	overflow:hidden;
	user-select: none;
}

.stylePanel > div::after {
	content:"";
	position: absolute;
	width:2rem; height:2rem;
	top:.25rem; left:1.25rem;
	
	background:var(--white);
	
	-webkit-clip-path:var(--chevronsShape);
	clip-path:var(--chevronsShape);
	
	transition: calc(var(--tempo) * 4);
}


.stylePanel.show > div::after {
	-webkit-clip-path:var(--antiChevronsShape);
	clip-path:var(--antiChevronsShape);
}


aside fieldset {
    padding-bottom: 3rem;
	border:none;
}

/***********/
/* OPTIONS */
/***********/
input {
    display: none;
}

label {
	position: relative;
	display: block;
}

/*******************/
/* ANIMATE OPTIONS */
/*******************/
.animationPanel label {
	margin: 0 0 1em;
    cursor: pointer;
	line-height:2.5rem;
}

#arrowUp:checked + label,
#arrowDown + label{
	color:var(--white);
	display:none;
}

#arrowUp:checked ~ #arrowDown + label,
.animationPanel input:checked+label {
    display:block;
	font-weight: bold;
}	

.animationPanel label::before{
	content:attr(alt);
	position:relative;
	display:inline-block;
	width:2.5rem; height:2.5rem;
	top:-.125rem;
	margin-right:.75rem;
	
	text-align: center;
	background:var(--glass);
	border-radius: .375em;
	
	transform-origin: bottom center;
	transition: calc(var(--tempo) / 2);
}

.animationPanel label[for="Escape"]::before{
	font-size:.75em;
}

#arrowUp:checked ~ #arrowDown + label::before,
.animationPanel input:checked + label::before{
	transform: scale(1.1) translateY(-2px);
	box-shadow: 0 4px 0 2px hsl(214, 48%, 8%);
}


/* reset */
.animationPanel button {
    padding: .5rem 1rem;
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    border-radius: 5px;
	font-size: 1.5rem;
    cursor: pointer;
    
    transition: calc(var(--tempo) * .3) linear;
}

.animationPanel button:hover {
    color: var(--background);
    background-color: var(--white);
}

/*****************/
/* STYLE OPTIONS */
/*****************/
.stylePanel h2 {
	font-size: 1.5rem;
	font-weight: normal;
	margin-bottom:.5rem;
}

.stylePanel section {
	display:flex;
	margin-bottom:1.5rem;
}

/* elke optie */
.stylePanel label {
    width: 2.5rem; height: 2.5rem;
    margin-right: .5em;
	transition:  calc(var(--tempo) * .4) ease-in-out;
	border-radius: 50%;
	cursor: pointer;
	transform-origin: bottom center;
}

.stylePanel input:checked + label {
    transform: scale(1.1) translateY(-2px);
	box-shadow: 0 4px 0 2px hsl(214, 48%, 8%);
}

/* de cirkels en kleuren */
#outRed + label { background-image: radial-gradient( var(--glass) 52%, var(--red) 52% ); }
#outBlue + label { background-image: radial-gradient( var(--glass) 52%, var(--blue) 52% ); }
#outGreen + label { background-image: radial-gradient( var(--glass) 52%, var(--green) 52% ); }
#outYellow + label { background-image: radial-gradient( var(--glass) 52%, var(--yellow) 52% ); }
#outPurple + label { background-image: radial-gradient( var(--glass) 52%, var(--purple) 52% ); }
#outWhite + label { background-image: radial-gradient( var(--glass) 52%, var(--white) 52% ); }

#midRed + label { background-image: radial-gradient( var(--glass) 40%, var(--red) 40%, var(--red) 58%,  var(--glass) 58% ); }
#midBlue + label { background-image: radial-gradient( var(--glass) 40%, var(--blue) 40%, var(--blue) 58%,  var(--glass) 58% ); }
#midGreen + label { background-image: radial-gradient( var(--glass) 40%, var(--green) 40%, var(--green) 58%,  var(--glass) 58% ); }
#midYellow + label { background-image: radial-gradient( var(--glass) 40%, var(--yellow) 40%, var(--yellow) 58%,  var(--glass) 58% ); }
#midPurple + label { background-image: radial-gradient( var(--glass) 40%, var(--purple) 40%, var(--purple) 58%,  var(--glass) 58% ); }
#midWhite + label { background-image: radial-gradient( var(--glass) 40%, var(--white) 40%, var(--white) 58%,  var(--glass) 58% ); }

#innerRed + label { background-image: radial-gradient( var(--glass) 26%, var(--red) 26%, var(--red) 44%,  var(--glass) 44% ); }
#innerBlue + label{ background-image: radial-gradient( var(--glass) 26%, var(--blue) 26%, var(--blue) 44%,  var(--glass) 44% ); }
#innerGreen + label { background-image: radial-gradient( var(--glass) 26%, var(--green) 26%, var(--green) 44%,  var(--glass) 44% ); }
#innerYellow + label { background-image: radial-gradient( var(--glass) 26%, var(--yellow) 26%, var(--yellow) 44%,  var(--glass) 44% ); }
#innerPurple + label { background-image: radial-gradient( var(--glass) 26%, var(--purple) 26%, var(--purple) 44%,  var(--glass) 44% ); }
#innerWhite + label { background-image: radial-gradient( var(--glass) 26%, var(--white) 26%, var(--white) 44%,  var(--glass) 44% ); }

#centerRed + label { background-image: radial-gradient( var(--red) 32%, var(--glass) 32% ); }
#centerBlue + label { background-image: radial-gradient( var(--blue) 32%, var(--glass) 32% ); }
#centerGreen + label { background-image: radial-gradient( var(--green) 32%, var(--glass) 32% ); }
#centerYellow + label { background-image: radial-gradient( var(--yellow) 32%, var(--glass) 32% ); }
#centerPurple + label { background-image: radial-gradient( var(--purple) 32%, var(--glass) 32% ); }
#centerWhite + label { background-image: radial-gradient( var(--white) 32%, var(--glass) 32% ); }

.shapeColors label {
	background-color:var(--glass);
}
.shapeColors label::after {
	content:"";
	position: absolute;
	width:50%; height:50%;
	top:25%; left:25%;
	-webkit-clip-path: var(--starShape);
	clip-path: var(--starShape);
}
#shapeRed + label::after { background-color: var(--red); }
#shapeBlue + label::after { background-color: var(--blue); }
#shapeGreen + label::after { background-color: var(--green); }
#shapeYellow + label::after { background-color: var(--yellow); }
#shapePurple + label::after { background-color: var(--purple); }
#shapeWhite + label::after { background-color: var(--white); }

.starShape .shapeColors label::after {
	-webkit-clip-path: var(--starShape);
	clip-path: var(--starShape);
}
.eenShape .shapeColors label::after {
	-webkit-clip-path: var(--eenShape);
	clip-path: var(--eenShape);
}
.chevronsShape .shapeColors label::after {
	-webkit-clip-path: var(--chevronsShape);
	clip-path: var(--chevronsShape);
}

/* de shapes */
input[name="shape"] + label {
	background-color:var(--centerColor);
}

input[name="shape"] + label div {
	height:100%;
	background-color:var(--shapeColor);
	transform:scale(.75);
}

#starShape + label div {
	-webkit-clip-path: var(--starShape);
	clip-path: var(--starShape);
}
#eenShape + label div {
	-webkit-clip-path: var(--eenShape);
	clip-path: var(--eenShape);
}
#chevronsShape + label div {
	-webkit-clip-path: var(--chevronsShape);
	clip-path: var(--chevronsShape);
}

input[name="shape"]:disabled + label {
	opacity:.5;
}