/* General Layout */ 

html,
body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	user-select: none;
}

body {
	position: relative;
	background-color: black;
	overflow: hidden;
	touch-action: none;
}

video {
	transition: 1s opacity ease-in;
}

.hidden {
	display: none;
}

.fit-size {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
	position: fixed;
}

#cover {
	transition: 0.25s opacity ease-in;
	filter: brightness(0.5);
}

#wrapper {
	text-align: center;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

#wrapper.scrubbing {
	cursor: ew-resize !important;
}

/* Body States */

body.loading video {
	filter: brightness(0.5);
}

body.loading #play {
	display: none;
}

body.ready {
	cursor: pointer;
}

body.ready canvas, body.ready #cover {
	display: none;
}

body.playing video, body.playing #cover {
	opacity: 0;
}

body.paused #wrapper {
	cursor: pointer;
}

body.ready:active #play img {
	transform: scale(0.95);
}

/* Cover Image */

#cover {
	pointer-events: none;
}

/* Play Button */

#play.played {
	opacity: 0;
	transform: scale(2);
	transition: 0.25s opacity, 0.25s transform;
}

#play.subtle img:first-child {
	display: none;
}

#play.subtle img:last-child {
	opacity: 0.5;
	transform: scale(2);
}

#play {
	position: absolute;
	top: 50%;
	left: 50%;
	pointer-events: none;
}

#play img {
	position: absolute;
	width: 25vmin;
	margin-left: -12.5vmin;
	margin-top: -12.5vmin;
}

#play img:nth-child(1) {
	filter: brightness(0);
}

#play img:nth-child(2) {
	filter: brightness(1);
}

/* Progress Bar */

#scrub-bar {
	width: 100%;
	height: 6vmin; 
	background: transparent; 
	position: absolute;
	bottom: 0;
	left: 0;
	cursor: ew-resize;
	background: transparent;
	display: none;
}

body.playing #scrub-bar {
	display: block;
}

#scrub-bar:hover #progress, #wrapper.scrubbing #progress {
	height: 1vmin;
	opacity: 1.0;
}

body.paused #progress {
	height: 1vmin;
	opacity: 0.5; 
}

#progress {
	position: absolute;
	bottom: 0;
	height: 1vmin;
	background: white;
	opacity: 0.0; 
}

/* Progress Bar & Play Interaction */
#wrapper.scrubbing #play.subtle img:last-child {
	opacity: 1;
}