:root {
  --bg-color: rgb(0, 0, 25);
  --node-size: 192px;
  --shade-size: 164px;
  --button-width: 128px;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes morph {
  0% {
    border-radius: 54% 46% 70% 30% / 57% 30% 70% 43% 
  }

  20% {
    border-radius: 67% 33% 70% 30% / 42% 56% 44% 58%;
  }

  40% {
    border-radius: 61% 39% 31% 69% / 25% 38% 62% 75%;
  }

  60% {
    border-radius: 79% 21% 69% 31% / 58% 69% 31% 42%;
  }

  80% {
    border-radius: 41% 59% 43% 57% / 77% 34% 66% 23%;
  }

  100% {
    border-radius: 54% 46% 70% 30% / 57% 30% 70% 43%;
  }
}

body {
	background: radial-gradient(rgb(5, 5, 25), rgb(0,0,0));
	/*background: radial-gradient(rgb(0, 0, 25), #000);
	background: radial-gradient(rgb(25, 25, 100), #000);
	background: radial-gradient(rgb(150, 150, 255), #000);*/
  /*background: radial-gradient(rgb(230 100 101), rgb(145 152 229));*/
	text-align: center;
	user-select: none;
	overflow: hidden;
	width: 100vw;
	height: 100vh;
	transition: background 2s;
}

#game {
	display: none;
	width: 100vw;
	height: 100vh;
	position: relative;
}

#intro, #outro {
	width: 100vw;
	height: 50vh;
	position: fixed;
	top: 50%;
	margin-top: -25vh;
	display: none;
	z-index: 5000;
}

body[data-screen="intro"] #intro,
body[data-screen="outro"] #outro,
body[data-screen="game"] #game {
	display: block;
}


h1, p, span {
	color: #fff;
	font-size: 16px;
	font-family: sans-serif;
	max-width: 480px;
	margin: 10px auto;
	text-align: center;
	line-height: 150%;
	display: block;
	color: rgba(255, 255, 255, 0.75);
}

span {
	margin: 32px auto;
	text-transform: uppercase;
	font-size: 14px;
	color: rgba(255, 255, 255, 1);

}

h1 {
	font-size: 26px;
	margin: 0 auto 32px auto;
}


html {
	cursor: url(cursor.png), auto;
}

*,* {
	color: #fff;
	font: 14px sans-serif;
	margin: 0;
	padding: 0;
	pointer-events: none;
}

#cursor {
	position: fixed;
	display: block;
	width: 5px;
	height: 5px;
	border-radius: 100%;
	background: rgba(255, 255, 255, 1.0);
	animation: cursor-flicker;
	animation-duration: 1s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
	animation-fill-mode: both;
	z-index: 9999;
}

.particle {
	position: absolute;
	display: block;
	width: 5px;
	height: 5px;
	border-radius: 100%;
	background: rgba(255, 255, 150, 0.0);
	animation: cursor-flicker;
	animation-duration: 1s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
	animation-fill-mode: both;
	z-index: 9998;
	transition: transform 3s, opacity 2.5s;
	transform: translateY(-10vh) scale(0);
	opacity: 0;
}

.particle.new {
	transform: translateY(0) scale(3.5);
	opacity: 1;
}

@keyframes cursor-flicker {
  0% {
    box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.2);
  }

  50% {
    box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0.7);
  }

  100% {
    box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.2);
  }
}

div {
	position: absolute;
	display: block;
}

#buttons {
	display: flex;
	position: fixed;
	bottom: 32px;
	left: 0;
	right: 0;
	border-radius: 0;
	justify-content: center;
	gap: 20px;
	z-index: 110;
}

button {
	display: block;
	position: relative;
	pointer-events: all;
	background: transparent;
	color: rgba(255, 255, 255, 0.2);
	width: var(--button-width);
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 20px;
	box-sizing: border-box;
	padding-top: 16px;
	padding-bottom: 16px;
	font-size: 16px;
	font-weight: bold;
	text-align: center;
	overflow: hidden;
}

button u {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	text-decoration: none;
}

button.enabled {
	border-color: rgba(255, 255, 255, 0.6);
	color: rgba(255, 255, 255, 0.6);
}

button:hover {
	color: rgba(255, 255, 255, 0.4);
	border-color: rgba(255, 255, 255, 0.4);
}


button.enabled:hover {
	border-color: rgba(255, 255, 255, 0.8);
	color: rgba(255, 255, 255, 0.8);
}

button.enabled:hover u {
	text-decoration: underline;
	color: rgba(255, 255, 255, 1)
}

button.enabled:active {
	transform: scale(0.95);
	border-color: rgba(255, 255, 255, 1);
	color: rgba(255, 255, 255, 1);
}

button .bar {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 6px;
	display: block;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.4);
	transition: width 0.3s;
}

button:hover .bars {
	background-color: rgba(255, 255, 255, 0.6);
}

.notice {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	padding: 16px;
	background: #445;
}

.node {
	border-radius: 50%;
	width: var(--node-size);
	height: var(--node-size);
	top: 50%;
	left: 50%;
	margin-left: calc(var(--node-size)/2*-1);
	margin-top: calc(var(--node-size)/2*-1);
/*	background: rgba(255, 255, 255, 0);*/
	pointer-events: all;
	transition: transform 3s, background-color 1s, border-radius 2s;
	transform: rotate(45deg);
/*	box-shadow:
		0 0 50px 5px rgba(255, 255, 255, 0.7),
		0 0 10px 5px rgba(255, 255, 255, 0.9),
		inset 0 0 20px rgba(0, 0, 25, 0.2);*/
}

.petal {
	position: absolute;
	display: block;
	top: 50%;
	left: 50%;
	margin-left: calc(var(--node-size)/2*-1);
	margin-top: calc(var(--node-size)/2*-1);
	width: calc(var(--node-size));
	height: calc(var(--node-size));
	line-height: calc(var(--node-size));
	border-radius: 100%;
	transition: transform 3s, background-color 1s, border-radius 2s;
}

.petal:nth-of-type(1) {transform: rotate(0); }
.petal:nth-of-type(2) {transform: rotate(90deg); }
.petal:nth-of-type(3) {transform: rotate(180deg); }
.petal:nth-of-type(4) {transform: rotate(270deg); }

.bud {
	position: absolute;
	display: block;
	top: 50%;
	left: 50%;
	margin-left: calc(var(--node-size)/4*-1);
	margin-top: calc(var(--node-size)/4*-1);
	width: calc(var(--node-size)/2);
	height: calc(var(--node-size)/2);
	line-height: calc(var(--node-size)/2);
	text-align: center;
	background: rgba(255, 255, 200, 1.0);
	border-radius: 100%;
	transform: scale(0);
	transition: transform 2s ease-out;
}

.phase3 .bud,
.phase4 .bud {
	transform: scale(1);
}

#progress {
	color: #000;
	top: 50%;
	left: 50%;
	position: absolute;
	margin-left: calc(var(--node-size)/2*-1);
	margin-top: calc(var(--node-size)/2*-1);
	width: calc(var(--node-size));
	height: calc(var(--node-size));
	line-height: calc(var(--node-size));
	text-align: center;
	display: block;
	font-weight: bold;
/*	border: 1px solid #fff;*/
	border-radius: 100%;
	color: #fff;
	z-index: 100;
	opacity: 0;
	pointer-events: all;
	transition: opacity 0.3s ease-in-out;
}

#progress:hover,
#progress:active {
	opacity: 0.5;
}


.orbit {
	position: absolute;
	pointer-events: none;
/*	outline: 16px solid rgba(0,0,0,0.1);*/
	top: 50%;
	left: 50%;
	transform: translateZ(0);
}

.satellite {
	position: absolute;
	pointer-events: none;
	top: 50%;
	left: 50%;
  animation-duration: 0.9s;
	animation-timing-function: linear;
	animation-name: rotate;
}

.satellite.running  {
  	border-color: #fff;
}

.satellite-node {
	width: 16px;
	height: 8px;
	border-radius: 50% 50% 50% 50%;
	background: #fff;
	top: -16px;
	left: 50%;
	margin-left: calc(-24px/2);
	transition: transform 1s, opacity 2s;
	opacity: 1;
}

.satellite-node.new {
	transform: translate(-5vw, -50vh) scale(0.3);
	opacity: 0;
}

.satellite-node.collecting {
	opacity: 1;
}

.satellite-node.leaving {
	transition: transform 15s, opacity 4s;
	transform: translate(0, -100vw) scale(3);
	opacity: 1;
}

.blob-orbit {
	position: absolute;
	top: 2%;
	left: 2%;
	width: 200px;
	height: 200px;
	animation: rotate 10s;
	animation-iteration-count: 3;
	animation-timing-function: linear;
}

.blob-orbit.disappear {
	pointer-events: none;
	transition: opacity 0.3s;
	opacity: 0;
}

.blob {
	position: absolute;
	pointer-events: all;
	display: block;
	width: 24px;
	height: 24px;
	border-radius: 100%;
	background: rgba(255, 255, 200, 1.0);
	animation: rotate 5s, morph 4s, blob-flicker 2s;
	animation-iteration-count: infinite;
	animation-timing-function: ease-in-out;
	top: -6px;
	left: 50%;
}
.reverse {
	animation-direction: reverse;
}
.blob:after {
    content:'';
    position:absolute;
    top: -16px;
    bottom: -16px; 
    left: -16px;
    right: -16px; 
}

.blob.acquire {
	pointer-events: none;
	transition: opacity 0.3s;
	opacity: 0;
}


@keyframes blob-flicker {
  0% {
    box-shadow:
    	0 0 5px 5px rgba(255, 255, 200, 0.2),
    	0 0 0px 2px rgba(255, 255, 200, 1);
  }

  50% {
    box-shadow: 0 0 20px 5px rgba(255, 255, 200, 0.7);
  }

  100% {
    box-shadow:
    	0 0 5px 5px rgba(255, 255, 200, 0.2),
    	0 0 0px 2px rgba(255, 255, 200, 1);
  }
}

.shade-container {
	width: var(--shade-size);
	height: var(--shade-size);
	margin-left: calc(var(--shade-size)/2*-1);
	margin-top: calc(var(--shade-size)/2*-1);
	transition: top 20s linear, left 20s linear, opacity 0.6s linear;
	animation-iteration-count: 1;
}

.shade-container:after {
	pointer-events: none;
	display: none;
	position: absolute;
	z-index: 100;
	color: rgba(255, 255, 255, 0.3);
	width: var(--shade-size);
	height: var(--shade-size);
	line-height: var(--shade-size);
	text-align: center;
	content: attr(data-hp);
}
.shade-container:hover:after {
	display: block;
}

.shade-container.attack {
	left: 50vw!important;
	top: 50vh!important;
}

.shade-container.explode {
	pointer-events: none;
	opacity: 0;
}

.shade {
	z-index: 100;
	pointer-events: all;
	display: block;
	width: var(--shade-size);
	height: var(--shade-size);
	border-radius: 100%;
	background: rgba(0, 0, 0, 1.0);
	animation: rotate 5s, morph 4s, shade-flicker 1s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
}

.shade:active {
	filter: invert(25%);
}

@keyframes shade-flicker {
  0% {
    box-shadow:
    	0 0 50px 50px rgba(0, 0, 0, 1),
    	0 0 20px 20px rgba(0, 0, 0, 1);
  }

  50% {
    box-shadow:
    	0 0 64px 50px rgba(0, 0, 0, 1),
    	0 0 20px 20px rgba(0, 0, 0, 1);

  }

  100% {
    box-shadow:
    	0 0 50px 50px rgba(0, 0, 0, 1),
    	0 0 20px 20px rgba(0, 0, 0, 1);
  }
}