/***************** GENERAL  ****************/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

body {
  background: linear-gradient(#11998e, #38ef7d);
  background-size: cover;
  background-position: center;
  font-family: Lato;
  font-weight: 300;
  color: #555;
  height: 100vh;
}

.game-name {
  text-align: center;
  color: #222;
  font-size: 50px;
  font-weight: bold;
  padding-top: 3%;
}

.wrapper {
  width: 50%;
  height: auto;
  background-color: #fff;
  box-shadow: 0px 10px 50px rgba(0, 0, 0, 0.3);
  margin: 5% 25%;
}

.player-0-panel,
.player-1-panel {
  width: 50%;
  float: left;
  height: auto;
  padding: 15%;
}

/******************  PLAYERS  ******************/

.player-name {
  font-size: 40px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 100;
  margin-top: 20px;
  margin-bottom: 10px;
  position: relative;
}

.player-score {
  text-align: center;
  font-size: 80px;
  font-weight: 100;
  color: #0ed145;
  margin-bottom: 130px;
}

.active {
  background-color: #f7f7f7;
}
.active .player-name {
  font-weight: 300;
}

.player-current-box {
  background-color: #0ed145;
  color: #fff;
  width: 100px;
  height: auto;
  margin: 0 auto;
  padding: 12px;
  text-align: center;
}

.player-current-label {
  text-transform: uppercase;
  margin-bottom: 10px;
  font-size: 12px;
  color: #222;
}

.player-current-score {
  font-size: 30px;
}

button {
  position: absolute;
  margin-top: 15%;
  width: 200px;
  left: 50%;
  transform: translateX(-50%);
  color: #555;
  background: none;
  border: none;
  font-family: Lato;
  font-size: 20px;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 300;
  transition: background-color 0.3s, color 0.3s;
}

button:hover {
  font-weight: 600;
}
button:hover i {
  margin-right: 20px;
}

button:focus {
  outline: none;
}

i {
  color: #0ed145;
  display: inline-block;
  margin-right: 15px;
  font-size: 32px;
  line-height: 1;
  vertical-align: text-top;
  margin-top: -4px;
  transition: margin 0.3s;
}

.btn-new {
  top: 45px;
}
.btn-roll {
  top: 403px;
}
.btn-hold {
  top: 467px;
}

.dice {
  position: absolute;
  left: 50%;
  top: 178px;
  transform: translateX(-50%);
  margin-top: 15%;
  height: 100px;
  box-shadow: 0px 10px 60px rgba(0, 0, 0, 0.1);
}

.winner {
  background-color: #f7f7f7;
}
.winner .player-name {
  font-weight: 300;
  color: #0ed145;
}

/*********** FINAL SCORE INPUT FIELD ***********/

.final-score {
  margin-top: 15%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 520px;
  color: #555;
  font-size: 18px;
  font-family: Lato;
  text-align: center;
  padding: 10px;
  width: 160px;
  text-transform: uppercase;
}

.final-score:focus {
  outline: none;
}

/* DICE */

#dice-1 {
  top: 120px;
}

#dice-2 {
  top: 250px;
}

/*********** MEDIA QUERIES ***********/

@media (min-width: 320px) {
  /* smartphones, iPhone, portrait 480x320 phones */
  .game-name {
    padding-top: 3%;
  }

  .wrapper {
    width: 100%;
    margin: 1%;
  }

  .player-0-panel,
  .player-1-panel {
    padding-bottom: 15%;
  }

  button,
  .dice,
  .final-score {
    margin-top: 25%;
  }
}
@media (min-width: 481px) {
  /* portrait e-readers (Nook/Kindle), smaller tablets @ 600 or @ 640 wide. */
  .game-name {
    padding-top: 5%;
  }

  .wrapper {
    width: 90%;
    margin: 5%;
  }

  .player-0-panel,
  .player-1-panel {
    padding-bottom: 15%;
  }

  button,
  .dice,
  .final-score {
    margin-top: 20%;
  }
}
@media (min-width: 641px) {
  /* portrait tablets, portrait iPad, landscape e-readers, landscape 800x480 or 854x480 phones */

  .game-name {
    padding-top: 5%;
  }

  .wrapper {
    width: 90%;
    margin: 5%;
  }

  .player-0-panel,
  .player-1-panel {
    padding-bottom: 15%;
  }

  button,
  .dice,
  .final-score {
    margin-top: 20%;
  }
}
@media (min-width: 961px) {
  /* tablet, landscape iPad, lo-res laptops ands desktops */

  .game-name {
    padding-top: 3%;
  }

  .wrapper {
    width: 90%;
    margin: 5%;
  }

  .player-0-panel,
  .player-1-panel {
    padding-bottom: 15%;
  }

  button,
  .dice,
  .final-score {
    margin-top: 20%;
  }
}
@media (min-width: 1025px) {
  /* big landscape tablets, laptops, and desktops */

  .game-name {
    padding-top: 3%;
  }

  .wrapper {
    width: 80%;
    margin: 5% 10%;
  }

  .player-0-panel,
  .player-1-panel {
    padding-bottom: 15%;
  }

  button,
  .dice,
  .final-score {
    margin-top: 20%;
  }
}

@media (min-width: 1281px) {
  /* hi-res laptops and desktops */
  div,
  button {
    font-size: larger;
  }

  .game-name {
    padding-top: 3%;
  }

  .wrapper {
    width: 50%;
    margin: 5% 25%;
  }

  .player-0-panel,
  .player-1-panel {
    padding-bottom: 15%;
  }

  button,
  .dice,
  .final-score {
    margin-top: 15%;
  }

  .final-score {
    font-size: larger;
    width: 200px;
  }
}
