body {
	background: #222;
	color: #ccc;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	font-size: 13px;
	margin: 0 auto;
	max-width: 100%;
	width: 1000px;
}
body.wide {
	width: 1200px;
}

a {
	color: #b5c6d0;
}
a:not([class]):hover {
	color: #fff;
	filter: drop-shadow(.07em .07em .14em #f0fc) drop-shadow( -.07em -.07em .14em #f0fc);
}

audio {
	height: 40px;
}

button {
	margin: 5px;
	padding: 6px;
	vertical-align: bottom;
}
button.active {
	background: #444;
	border: none;
	box-shadow: inset 1px 1px 0 #000;
	color: #0f0;
	padding: 8px;
	text-shadow: 2px 2px 10px #0f08, -2px -2px 10px #0f08;
}

canvas {
	display: block;
	width: 100%;
}

code {
	background: #fff2;
	border-radius: 4px;
	padding: 1px 4px;
}

fieldset {
	border: 1px dotted #666;
	display: inline-block;
	min-height: 70px;
	vertical-align: top;
}
fieldset:disabled {
	display: none;
}
fieldset legend {
	font-size: 12px;
}

header {
	position: relative;
}
h1 {
	color: #dfe6eb;
	filter: drop-shadow(2px 2px 0 #000);
}
h2 {
	margin: 1.5em 0 1em;
}

hr {
	border-color: #8888;
	border-width: 0 0 1px;
}

img {
	max-width: 100%;
}

input[type="range"],
input[type="number"] {
	width: 50px;
}

input[type="text"],
input[type="number"],
select {
	margin-top: 6px;
	padding: 6px;
}

ul {
	line-height: 1.6;
}

.big {
	font-size: 120%;
}

.box {
	margin-top: 10px;
}
.box .title {
	font-weight: bold;
	line-height: 2;
	margin-right: 1em;
}


.label {
	color: #fff;
	display: inline-block;
	font-size: 12px;
	margin: 0 6px;
	vertical-align: top;
}
.label input,
.label select {
	display: block;
}

.logo {
	background: linear-gradient(to bottom, #f2f6f8 0%, #d8e1e7 50%, #b5c6d0 51%, #e0eff9 100%);
	background-clip: text;
	font-family: Orbitron, sans-serif;
	padding-right: .5em;
	position: relative;
	text-decoration: none;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.logo:hover::after {
	animation: shine .5s ease-in-out;
	color: #fff;
	content: 'audioMotion-analyzer';
	left: 0;
	position: absolute;
	top: 0;
	-webkit-mask-image: linear-gradient(-75deg, transparent 45%, #000 50%, transparent 55%);
	-webkit-text-fill-color: #fff;
	-webkit-mask-position: -50%;
	-webkit-mask-size: 200%;
}

@keyframes shine {
	0% { -webkit-mask-position: 110%; }
	100% { -webkit-mask-position: -10%; }
}

#audio,
#video {
	display: block;
	width: 100%;
}

.analyzer-configuration {
	background: #fff1;
	border: 1px solid #ccc8;
	margin-bottom: 20px;
	padding: 10px 0;
}

.credits {
	font-size: 12px;
	margin: 10px 0;
	text-align: center;
}

.header-nav {
	position: absolute;
	right: 0;
	top: 0;
}
.header-nav li {
	display: inline;
	margin-right: .5em;
}
.header-nav li:not(:last-child)::after {
	content: ' |';
	margin-left: .5em;
}

/* minimal demo */
#container {
	height: 60vh;
}

/* fluid full-width analyzer (single instance demo) */
#container.fluid {
	height: 45vh;
	margin: 0 calc( 50% - 50vw + 9px );
}

.sticky {
	background: linear-gradient(to top, transparent 0%, #222 28px);
	margin-bottom: -10px !important;
	padding-bottom: 30px;
	pointer-events: none;
	position: sticky;
	top: 0;
	z-index: 1;
}

/* background animation for overlay test on fluid demo */
.fluid canvas {
	/*background-image: url(media/sealoop.gif);*/
	background-size: cover;
}

.center {
	text-align: center;
}

.flag {
	background: #444;
	border-radius: 999px;
	display: inline-block;
	font-size: .9em;
	margin: .5em .25em;
	opacity: .5;
	padding: .25em 1em;
}
.flag.active {
	background: #0f0;
	color: #222;
	opacity: 1;
}

.flex {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin: 10px 0;
}

.evenly {
	justify-content: space-evenly;
}

.multi-block {
	display: grid;
	grid-gap: 20px;
	grid-template: 1fr 1fr / 1fr 1fr 1fr;
	height: 340px;
	margin-bottom: 10px;
}

.colspan-2 {
	grid-column: span 2;
}
.rowspan-2 {
	grid-row: span 2;
}

.selector {
	margin-bottom: 20px;
}

.selected {
	outline: 3px solid #c00;
}

.stretch {
	align-items: stretch;
}

/* piano keys (fluid demo) */

#piano {
	margin: 10px 10px 0 4px;
	user-select: none;
}

.c4::before {
	background: #c00;
	border-radius: 50%;
	bottom: 10px;
	content: '';
	height: 6px;
	left: 50%;
	position: absolute;
	width: 6px;
}

.key {
	cursor: pointer;
	display: inline-block;
	position: relative;
}

.black {
	background: #000;
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	height: 60px;
	left: 17px;
	position: absolute;
	top: 0;
	width: 12px;
	z-index: 2;
}

.white {
	background: #fff;
	border: 2px solid #000;
	border-radius: 4px;
	height: 100px;
	margin-right: -6px;
	width: 20px;
}

.black:hover,
.white:hover {
	background: #888;
}

/* overlay */
#container.overlay {
	height: 675px;
	margin: 0 auto;
	position: relative;
	width: 100%;
}

.overlay canvas {
	bottom: 0;
	pointer-events: none; /* let mouse clicks pass to the underlying video element */
	position: absolute;
	touch-action: none; /* ditto for touch events */
}

.overlay:not(:fullscreen):hover canvas {
	opacity: .5;
}

/* Image gallery on index page */

.gallery {
	height: 280px;
	margin: 0 calc( 50% - 50vw );
	overflow: hidden;
	position: relative;
}
.gallery:hover .gallery-internal {
	animation-play-state: paused;
}
.gallery img {
	width: 500px;
}

.gallery-internal {
	animation: rotate 45s linear infinite;
	list-style: none;
	margin: 0;
	padding: 0;
	position: absolute;
	width: 9999px;
}
.gallery-internal li {
	display: inline-block;
	padding: 0 2px;
}

@keyframes rotate {
	0%   { left: 0; }
	100% { left: -3024px; }
}
