* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  background: #101010;
  color: #fff;
  font-family: 'joystix', sans-serif;
  font-size: 1.4vw;
  text-align: center;
}

a {
  text-decoration: none;
  color: white;
}

header {
  height: 10vh;
  padding-bottom: 10px;
}

img {
  max-height: 100px;
  float: left;
}

li {
  list-style: none;
  display: block;
  float: left;
}

ul {
  float: left;
  width: 20%;
}

.group:after {
  content: "";
  display: block;
  clear: both;
}

.canvas-area {
  margin: 0 auto;
  margin-left: 33vw;
  text-align: left;
  font-size: 12px;
}

.controls {
  float: left;
  width: auto;
}

.sidebar {
  float: left;
}

@font-face {
  font-family: 'joystix';
  src: url('assets/joystix.otf') format('opentype');
}

#tetris, #nextPiece, #holdPiece {
  border: solid .2em #fff;
  height: 80vh;
  width: auto;
  float: left;
}

#game-over, #game-paused, #home {
  display: none;
  width: 100vw;
  height: 100vh;
  position: absolute;
  vertical-align:bottom;
  z-index: 1;
  top: 0;
  left: 0;
  background: #101010;
  text-align: center;
  flex-direction: column;
  justify-content: center;
}

#play {
  font-family: 'joystix';
  background-color: transparent;
  border: none;
  color: white;
  font-size: 2em;
}

#play:active {
  outline: none;
}

#home {
  display: flex;
}

#game-paused {
  background-color: #101010DD;
}

#holdPiece {
  width: 20vh;
  height: auto;
}

#nextPiece {
  width: 20vh;
  height: auto;
}

#save-score-btn {
  display: none;
}

#score {
  margin-top: 20px;
}

#score-form {
  margin-top: 2%;
}

#score-form input {
  font-family: 'Open Sans', sans-serif;
  border: 2px solid #f0f0f0;
  border-radius: 4px;
  padding: 10px;
  font-size: 16px;
}

#score-form input:focus {
  outline: 0;
  border-color: #777;
}

#score-submit-message {
  border: none;
  color: white;
  padding: .7% 1.2%; 
  margin: .5% 28%;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 18px; 
  font-family: inherit;
  border-radius: 10px;
  background-image: linear-gradient(to right, #25aae1, #40e495, #30dd8a, #2bb673);
  box-shadow: 0 4px 15px 0 rgba(49, 196, 190, 0.75);
}

.game-over-btn {
  border: none;
  color: white;
  padding: .7% 1.4%; 
  margin: .35% 0%;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 18px; 
  font-family: inherit;
  border-radius: 4px;
  cursor: pointer;
  background-size: 300% 100%;
  border-radius: 50px;
  background-image: linear-gradient(to right, #25aae1, #40e495, #30dd8a, #2bb673);
  box-shadow: 0 4px 15px 0 rgba(49, 196, 190, 0.75);
  -moz-transition: all .4s ease-in-out;
  -o-transition: all .4s ease-in-out;
  -webkit-transition: all .4s ease-in-out;
  transition: all .4s ease-in-out;
}

.game-over-btn:focus {
  outline: none;
}

.game-over-btn:hover {
  background-position: 100% 0;
  -moz-transition: all .4s ease-in-out;
  -o-transition: all .4s ease-in-out;
  -webkit-transition: all .4s ease-in-out;
  transition: all .4s ease-in-out;
}

.game-over-btn.color-1 {
  background-image: linear-gradient(to right, #25aae1, #40e495, #30dd8a, #2bb673);
  box-shadow: 0 4px 15px 0 rgba(49, 196, 190, 0.75);
}

.game-over-btn.color-2 {
  margin-top: 2.5%;
  background-image: linear-gradient(to right, #f5ce62, #e43603, #fa7199, #e85a19);
  box-shadow: 0 4px 15px 0 rgba(229, 66, 10, 0.75);
}

.leaderboard {
  display: none;
  padding: 1% 2%;
  margin: 0% 10%;
  border-radius: 50px;
  background-color: #111;
  box-shadow: 0 4px 15px 0 rgba(49, 196, 190, 0.75);
  -moz-transition: all .2s ease-in-out;
  -o-transition: all .2s ease-in-out;
  -webkit-transition: all .2s ease-in-out;
  transition: all .2s ease-in-out;
}

.leaderboard div {
  margin: .5% 0%;
}

.control-box.volume-on .icon {
	color: #5AF1F0;
}

.volume-control {
  margin: 10px;
  width: 100%;
  height: 40px;
  display: flex;
  align-items: baseline;
}

.volume-control .speaker {
  font-size: 35px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
  transition: 0.3s ease-in-out;
}

.control-container.volume-on .volume-control .speaker {
  color: #5AF1F0;
}

.volume-control .bars {
  position: relative;
  display: flex;
  align-items: flex-end;
  margin-left: 20px;
  width: 48%; 
  height: 80%;
}

.volume-control .bars .bar {
  width: 14%;
  margin: 0 3%;
  background-color: #bbb;
  transition: 0.3s ease-in-out;
}

.volume-control .bars .bar:nth-child(1) {
  height: 20%;
}

.volume-control .bars .bar:nth-child(2) {
  height: 40%;
}

.volume-control .bars .bar:nth-child(3) {
  height: 60%;
}

.volume-control .bars .bar:nth-child(4) {
  height: 80%;
}

.volume-control .bars .bar:nth-child(5) {
  height: 100%;
}

.volume-control .bars input[type='range'] {
  position: absolute;
  left: -10%;
  width: 110%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.volume-control.volume-20 .bars .bar:nth-child(1),
.volume-control.volume-40 .bars .bar:nth-child(1),
.volume-control.volume-60 .bars .bar:nth-child(1),
.volume-control.volume-80 .bars .bar:nth-child(1),
.volume-control.volume-100 .bars .bar:nth-child(1),
.volume-control.volume-40 .bars .bar:nth-child(2),
.volume-control.volume-60 .bars .bar:nth-child(2),
.volume-control.volume-80 .bars .bar:nth-child(2),
.volume-control.volume-100 .bars .bar:nth-child(2),
.volume-control.volume-60 .bars .bar:nth-child(3),
.volume-control.volume-80 .bars .bar:nth-child(3),
.volume-control.volume-100 .bars .bar:nth-child(3),
.volume-control.volume-80 .bars .bar:nth-child(4),
.volume-control.volume-100 .bars .bar:nth-child(4),
.volume-control.volume-100 .bars .bar:nth-child(5) {
  background-color: #5AF1F0;
}

@media (max-width: 1500px) {
  .volume-control {
    height: 30px;
  }
  .volume-control .speaker {
    font-size: 25px;
  }
  .volume-control .bars {
    margin-left: 10px;
    width: 45%;
  }
  #save-score-btn {
    font-size: 15px;
  }
  #score-submit-message {
    font-size: 15px;
  }
  .game-over-btn {
    font-size: 15px;
  }
}

@media (max-width: 600px) {
  .volume-control {
    height: 20px;
  }
  .volume-control .speaker {
    font-size: 15px;
  }
  .volume-control .bars {
    margin-left: 5px;
    width: 35%;
  }
  #save-score-btn {
    font-size: 8px;
  }
  #score-submit-message {
    font-size: 8px;
  }
  .game-over-btn {
    font-size: 8px;
  }
}
