/*
 * Audiovisualization using the html canvas element.
 * Please note: this is an offline-only version. For this version to be used online you need an XMLHttpRequest to load the music file!
 * ©2017, Dominik Hofacker
 * https://www.behance.net/dominikhofacker
 * Please consider supporting this project on behance:
 * https://www.behance.net/gallery/49260123/Web-Audio-Visualization
 */
@font-face {
    font-family: Martell-Regular;
    src: url(../src/Martell-Regular.woff);
}

@keyframes hue {
  0% {
    filter: hue-rotate(0deg);
    -webkit-filter: hue-rotate(0deg);
  }

  100% {
    filter: hue-rotate(-360deg);
    -webkit-filter: hue-rotate(-360deg);
  }
}
#freq {
    background: linear-gradient(#ff0088, red);
    position: absolute; 
    left: 0;
    right: 0;
    margin: 0 auto;
}
body {
    overflow: hidden;
	background: #000;
}
#freq.animateHue, body.animateHue {
    animation-name: hue;
    animation-duration: 500s;
    animation-delay: 1s;
    animation-iteration-count: infinite;

    -webkit-animation-name: hue;
    -webkit-animation-duration: 500s;
    -webkit-animation-delay: 1s;
    -webkit-animation-iteration-count: infinite;
}
#title, #artist, #album {
    position: absolute;
    text-align: center;
    width: 100%;
    top: 100px;
    z-index: 999;
    font-weight: 100;
    font-family: "Martell-Regular", sans-serif;
    font-size: 100px;
    color: #fff;
    visibility: hidden;
    letter-spacing: -.05em;
    text-shadow: 0px 0px 8px rgba(0, 0, 0, 0.5);
}
#artist {
    font-size: 40px;
}
#album {
    font-size: 40px;
}

input {
    display: inline-block;
    background: none;
    position: relative;
    z-index: 999;
}

.button {
	border: 2px solid rgba(113, 107, 252, 1);
	color: rgba(113, 107, 252, 1);
	width: 180px;
	height: 45px;
	box-sizing: border-box;
	text-align: center;
	padding-top: 12px;
	font-family: "Martell-Regular", sans-serif;
	border-radius: 7px;
	letter-spacing: .05em;
	transition: all 0.4s ease;
	cursor: pointer;
	
	-webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#sample {
	z-index: 1000;
	display: inline-block;
}

#button_wrapper {
	width: 390px;
	height: 45px;
	margin: 0 auto;
	left: 0;
	right: 0;
	position: absolute;
	bottom: 150px;
}

.inputfile {
	width: 0.1px;
	height: 0.1px;
	opacity: 0;
	overflow: hidden;
	position: relative;
	z-index: -1;
	display: inline-block;
}

.inputfile + label, .button {
    border: 2px solid #fff;
	color: #fff;
	width: 170px;
	height: 45px;
	box-sizing: border-box;
	text-align: center;
	padding-top: 14px;
	font-family: "Martell-Regular", sans-serif;
	border-radius: 7px;
	letter-spacing: .05em;
	transition: all 0.4s ease;
	cursor: pointer;
	display: inline-block;
	font-size: 12px;
	
	-webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
	
	animation-delay: 1.5s;
	visibility: hidden; 
}

.inputfile + label {
	margin-right: 30px;
}

.inputfile:focus + label,
.inputfile + label:hover, .button:hover {
  
}

.inputfile:focus + label {
	outline: 1px dotted #000;
	outline: -webkit-focus-ring-color auto 5px;
}

#sample {
}

label {
}

#sample:hover, label:hover {
	  transform: scale(1.1);
}

#logo {
	position: absolute;
	bottom: 10px; 
	right: 10px;
	width: 100px;
	height: 90px;
	background: url(../src/logo.svg) no-repeat center center;
	background-size: contain;
	opacity: .75;
	z-index: 9999999;
	cursor: pointer;
}

.label {
	color: #fff;
	font-family: "Martell-Regular", sans-serif;
	margin: 0 auto;
	left: 0;
	right: 0;
	text-align: center;
	margin-top: 40px;
}

#loading_wrapper {
	/*width: 390px;*/
	height: 120px;
	margin: 0 auto;
	left: 0;
	right: 0;
	position: absolute;
	top: 50%;
	/*border: 3px solid #fff;*/
	vertical-align: middle;
	text-align: center;
}

#viewer_discretion {
	color: #fff;
	font-family: "Martell-Regular", sans-serif;
	font-size: 11px;
	margin: 0 auto;
	left: 0;
	right: 0;
	text-align: center;
	position: absolute;
	bottom: 20px;
	line-height: 1.5em;
	width: 60%
}

#loading_screen {
	width: 100%;
	height: 100%;
	background-image: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
}

.sk-folding-cube {
  margin: 20px auto;
  width: 40px;
  height: 40px;
  position: relative;
  -webkit-transform: rotateZ(45deg);
          transform: rotateZ(45deg);
}

.sk-folding-cube .sk-cube {
  float: left;
  width: 50%;
  height: 50%;
  position: relative;
  -webkit-transform: scale(1.1);
      -ms-transform: scale(1.1);
          transform: scale(1.1); 
}
.sk-folding-cube .sk-cube:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  -webkit-animation: sk-foldCubeAngle 2.4s infinite linear both;
          animation: sk-foldCubeAngle 2.4s infinite linear both;
  -webkit-transform-origin: 100% 100%;
      -ms-transform-origin: 100% 100%;
          transform-origin: 100% 100%;
}
.sk-folding-cube .sk-cube2 {
  -webkit-transform: scale(1.1) rotateZ(90deg);
          transform: scale(1.1) rotateZ(90deg);
}
.sk-folding-cube .sk-cube3 {
  -webkit-transform: scale(1.1) rotateZ(180deg);
          transform: scale(1.1) rotateZ(180deg);
}
.sk-folding-cube .sk-cube4 {
  -webkit-transform: scale(1.1) rotateZ(270deg);
          transform: scale(1.1) rotateZ(270deg);
}
.sk-folding-cube .sk-cube2:before {
  -webkit-animation-delay: 0.3s;
          animation-delay: 0.3s;
}
.sk-folding-cube .sk-cube3:before {
  -webkit-animation-delay: 0.6s;
          animation-delay: 0.6s; 
}
.sk-folding-cube .sk-cube4:before {
  -webkit-animation-delay: 0.9s;
          animation-delay: 0.9s;
}
@-webkit-keyframes sk-foldCubeAngle {
  0%, 10% {
    -webkit-transform: perspective(140px) rotateX(-180deg);
            transform: perspective(140px) rotateX(-180deg);
    opacity: 0; 
  } 25%, 75% {
    -webkit-transform: perspective(140px) rotateX(0deg);
            transform: perspective(140px) rotateX(0deg);
    opacity: 1; 
  } 90%, 100% {
    -webkit-transform: perspective(140px) rotateY(180deg);
            transform: perspective(140px) rotateY(180deg);
    opacity: 0; 
  } 
}

@keyframes sk-foldCubeAngle {
  0%, 10% {
    -webkit-transform: perspective(140px) rotateX(-180deg);
            transform: perspective(140px) rotateX(-180deg);
    opacity: 0; 
  } 25%, 75% {
    -webkit-transform: perspective(140px) rotateX(0deg);
            transform: perspective(140px) rotateX(0deg);
    opacity: 1; 
  } 90%, 100% {
    -webkit-transform: perspective(140px) rotateY(180deg);
            transform: perspective(140px) rotateY(180deg);
    opacity: 0; 
  }
}

html, body {
  width:  100%;
  height: 100%;
  margin: 0px;
}

@media screen and (max-width : 375px)  {
	
	#button_wrapper {
		width: 330px;
		height: 45px;
	}
	
	.inputfile + label, .button {
		width: 140px;
		height: 45px;
		font-size: 10px;
	}
}

@media screen and (max-width : 768px)  {
	#logo {
		width: 60px;
		height: 50px;
	}
	#viewer_discretion {
		font-size: 8px;
	}
}

@media screen and (min-width : 1018px)  {
	#viewer_discretion {
		width: 80%;
	}
}

@media screen and (max-height : 680px)  {
	#button_wrapper {
		bottom: 110px;
	}
}

@media screen and (max-height : 560px)  {
	#button_wrapper {
		bottom: 90px;
	}
}