body {
  margin-left: auto;
  margin-right: auto;
  /*border: yellow 1px solid;*/
  max-width: 1200px;
  width: 100%;
  color: #FFF;
  font-family: 'Righteous', cursive;
}
.hidden {
  display:none;
}
.small-text {
  font-size: 16px;
}
/*Used an online gradient generator for help creating the backgrounds on the buttons: http://www.colorzilla.com/gradient-editor/*/
.yellow-bkgnd {
  background: rgb(254,244,169);
  background: -moz-linear-gradient(top,  rgba(254,244,169,1) 0%, rgba(255,204,0,1) 52%, rgba(255,204,0,1) 100%, rgba(255,204,0,1) 100%);
  background: -webkit-linear-gradient(top,  rgba(254,244,169,1) 0%,rgba(255,204,0,1) 52%,rgba(255,204,0,1) 100%,rgba(255,204,0,1) 100%);
  background: linear-gradient(to bottom,  rgba(254,244,169,1) 0%,rgba(255,204,0,1) 52%,rgba(255,204,0,1) 100%,rgba(255,204,0,1) 100%);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fef4a9', endColorstr='#ffcc00',GradientType=0 );
  font-family: 'Righteous', cursive;
}
a {
  text-decoration: none;
}
a:active {
  text-decoration: none;
}
header {
  text-align: center;
}
h1 {
  padding-left: 145px;
  color: #882120;
  text-shadow: 2px 8px 6px rgba(0,0,0,0.2),
  0px -5px 35px rgba(255,255,255,0.3);
  font-size: 40px;
}
/*Researched stack overflow for a good way to flip text vertically - just as a fun extra on the title: http://stackoverflow.com/questions/5406368/can-you-use-css-to-mirror-flip-text*/
.vertical-flip {
  -moz-transform: scale(1, -1);
  -webkit-transform: scale(1, -1);
  -o-transform: scale(1, -1);
  -ms-transform: scale(1, -1);
  transform: scale(1, -1);
}


/* Popup Window Styling*/
.popup-cover {
  display:        none;
  position:       absolute;
  left:           0px;
  top:            0px;
  width:          100vw;
  height:         100vh;
  z-index: 1;
  background-color:     rgba(0,0,0,.8);
}
.win-cover {
  display:        none;
  position:       absolute;
  left:           0px;
  top:            0px;
  width:          100%;
  height:         100%;
  background:     #333;
  /*filter:         alpha(Opacity = 80);
  opacity:        0.8;
  -moz-opacity:   0.8;
  -khtml-opacity: 0.8;*/
}
.popup-window {
  /*opacity: 0;*/
  font-size: 18px;
  color: #000;
  /*display:    none;*/
  margin: 20px auto;
  /*margin-left: auto;
  margin-right: auto;*/
  /*top:        15px;*/
  width:      65%;
  /*position:   absolute;*/
  z-index:    100;
  padding: 20px;
  border:     3px solid #000;
  box-shadow: 8px 8px 20px #000;
  border-radius: 40px;
  background: rgba(41,150,67,1);
  background: -moz-radial-gradient(center, ellipse cover,  rgba(41,150,67,1) 0%, rgba(40,136,62,1) 25%, rgba(34,119,57,1) 48%, rgba(28,102,45,1) 74%, rgba(21,77,33,1) 98%);
  background: -webkit-radial-gradient(center, ellipse cover,  rgba(41,150,67,1) 0%,rgba(40,136,62,1) 25%,rgba(34,119,57,1) 48%,rgba(28,102,45,1) 74%,rgba(21,77,33,1) 98%);
  background: radial-gradient(ellipse at center,  rgba(41,150,67,1) 0%,rgba(40,136,62,1) 25%,rgba(34,119,57,1) 48%,rgba(28,102,45,1) 74%,rgba(21,77,33,1) 98%);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#299643', endColorstr='#154d21',GradientType=1 );
  filter:         alpha(Opacity = 100);
  opacity:        1 !important;
  -moz-opacity:   1 !important;
  -khtml-opacity: 1 !important;
}
.win-popup-window {
  margin-left: auto;
  margin-right: auto;
  margin-top: 15px;
  top:        0;
  position:   absolute;
  z-index: 100;
}
.popup-window-small {
  margin-top: 100px;
  width: 35%;
}
.popup-window h2 {
  text-align: center;
  margin-top: 0;
  color: #FFF;
  text-shadow: 3px 3px 6px #000;
}
.popup-button {
  display: block;
  margin: 10px auto 0 auto;
  padding: 10px;
  font-size: 20px;
  color: #FFF;
  text-shadow: 2px 2px 3px rgba(150, 150, 150, 1);
  border: #000 2px solid;
  border-radius: 40px;
  outline: none;
  box-shadow: 3px 3px 5px #000;
}
.close-popup {
  float: right;
  color: rgba(255,204,0,1);
  font-size: 30px;
  font-weight: 700;
  z-index: 75;
  margin: 20px;
}
/* End Popup Window Styling*/


main {
  border: #170d0c 7px ridge;
  box-shadow: 10px 10px 40px #000;
}
/*Styling for Number Line & Numbers*/
.number-line-1 {
  display: flex;
  border-bottom: #170d0c 7px ridge;
  text-shadow: 2px 8px 6px rgba(0,0,0,0.2),
  0px -5px 35px rgba(255,255,255,0.3);
  background: rgb(143,35,33);
  background: -moz-radial-gradient(center, ellipse cover,  rgba(143,35,33,1) 0%, rgba(113,25,24,1) 47%, rgba(50,12,13,1) 99%, rgba(143,35,33,1) 100%);
  background: -webkit-radial-gradient(center, ellipse cover,  rgba(143,35,33,1) 0%,rgba(113,25,24,1) 47%,rgba(50,12,13,1) 99%,rgba(143,35,33,1) 100%);
  background: radial-gradient(ellipse at center,  rgba(143,35,33,1) 0%,rgba(113,25,24,1) 47%,rgba(50,12,13,1) 99%,rgba(143,35,33,1) 100%);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#8f2321', endColorstr='#8f2321',GradientType=1 );
}
.not-players-turn {
  color: #c95e5e;
}
.col-1 {
  flex: 1;
  border: #000 1px solid;
  height: 150px;
  text-align: center;
  line-height: 150px;
  font-size: 80px;
}
.col-1-2-player, .col-2-2-player {
  flex: 1;
  border: #000 1px solid;
  height: 75px;
  text-align: center;
  line-height: 75px;
  font-size: 40px;
}
.player-id {
  font-size: 30px !important;
  line-height: 35px;
}

.selected {
  background-color: rgba(0,0,0,0.5);
}
.played {
  background-color: rgba(0,0,0,0.8) !important;
  background-repeat: no-repeat;
  background-size: cover;
}
/*End styling for Number Line & Numbers*/


/*Styling for Dice area*/
#game-space {
  background: rgb(41,150,67);
  background: -moz-radial-gradient(center, ellipse cover,  rgba(41,150,67,1) 0%, rgba(40,136,62,1) 25%, rgba(34,119,57,1) 48%, rgba(28,102,45,1) 74%, rgba(21,77,33,1) 98%);
  background: -webkit-radial-gradient(center, ellipse cover,  rgba(41,150,67,1) 0%,rgba(40,136,62,1) 25%,rgba(34,119,57,1) 48%,rgba(28,102,45,1) 74%,rgba(21,77,33,1) 98%);
  background: radial-gradient(ellipse at center,  rgba(41,150,67,1) 0%,rgba(40,136,62,1) 25%,rgba(34,119,57,1) 48%,rgba(28,102,45,1) 74%,rgba(21,77,33,1) 98%);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#299643', endColorstr='#154d21',GradientType=1 );
}
.main-space {
  display: flex;
}
#dice-board {
  flex: 1;
  border-right: #170d0c 7px ridge;
}
#dice-row {
  margin-top: 40px;
  display: flex;
  padding: 0 5%;
  justify-content: space-around;
}
.dice {
  width: 139px !important;
  height: 139px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  margin: 10px;
  box-shadow: 5px 5px 12px #000;
  border-radius: 20px;
  border: #000 1px solid;
  background-color: #000;
}
/*To make dice spin I found some css tips on Stack Overflow: http://stackoverflow.com/questions/14859322/css3-spin-animation*/
.roll-dice-1 {
  animation-name: spin1;
  animation-duration: 300ms;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}
@keyframes spin1 {
    from {transform:rotate(0deg);}
    to {transform:rotate(360deg);}
}
.roll-dice-2 {
  animation-name: spin2;
  animation-duration: 300ms;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}
@keyframes spin2 {
    from {transform:rotate(360deg);}
    to {transform:rotate(0deg);}
}
.dice-1 {
  background-image: url("/shutthebox/images/dice-1.png");
}
.dice-2 {
  background-image: url("/shutthebox/images/dice-2.png");
}
.dice-3 {
  background-image: url("/shutthebox/images/dice-3.png");
}
.dice-4 {
  background-image: url("/shutthebox/images/dice-4.png");
}
.dice-5 {
  background-image: url("/shutthebox/images/dice-5.png");
}
.dice-6 {
  background-image: url("/shutthebox/images/dice-6.png");
  background-repeat: no-repeat;
  background-position: center;
}
.button-row {
  display: flex;
  padding: 0 5%;
  margin-top: 30px;
  height: 2 0%;
  justify-content: space-around;
}
.dice-button {
  width: 200px;
  height: 100%;
  border-radius: 50px;
  margin:20px;
  outline: none;
  color: #FFF;
  text-shadow: 2px 2px 5px rgba(150, 150, 150, 0.56);
  font-size: 28px;
  border: #000 2px solid;
  justify-content: space-between;
  box-shadow: 5px 5px 12px #000;
  padding: 15px;
}
.button-clicked {
  box-shadow:none;
  color: #000;
}
.players-turn-button {
  font-size: 38px;
  width: 300px;
  color: #000;
}
#roll-dice {
  width: 300px;
}
/*End styling for Dice area*/


/*Styling for Scoreboard area*/
#scoreboard {
  flex: 1;
  text-align: center;
  text-shadow: 3px 3px 6px #000;
  font-size: 18px;
}
.player-selection-intro {
  font-size: 24px;
  padding: 25px;
}
.how-to-play {
  float: right;
  margin-right: 10px;
  padding: 7px;
  font-size: 20px;
  color: #FFF;
  text-shadow: 2px 2px 3px rgba(150, 150, 150, 1);
  border: #490D0D 2px solid;
  border-radius: 40px;
  outline: none;
  box-shadow: 3px 3px 5px #000;
}
h2 {
  margin: 10px auto;
  font-family: 'Righteous', cursive;
  font-weight: 200;
}
h3 {
  margin-bottom: 10px;
  font-family: 'Changa One', cursive;
  font-weight: 200;
}
.bar1 {
  border-bottom: #FFF 2px solid;
  width: 80%;
  margin: 0 auto;
  box-shadow: 3px 3px 6px #000;
  border-radius: 2px;
}
.score-row {
  display: flex;
  padding: 5px 20px 15px 20px;
}
.score-block {
  flex: 1;
}
.top-bar {
  border-top: #FFF 2px solid;
  box-shadow: 3px 3px 6px #000;
  width: 65%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
  border-radius: 2px;
}
.copyright {
  margin: 10px auto;
  font-size: 14px;
  color: #490D0D;
  text-align: center;
}
@media (max-width: 800px){
  h1 {
    padding: 0 15px;
  }
  .how-to-play {
    float: none;
    margin-top: 10px;
  }
  .main-space {
    display: block;
  }
  #dice-board {
    border-right: none;
    margin-right: none;
    margin-bottom: 20px;
    width: 100% !important;
    border-bottom: #170d0c 7px ridge;
  }
  #dice-row {
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
    width: 95%;
    padding: 10px;
  }
  .dice {
    width: 90px !important;
    height: 90px;
  }
  .button-row {
    margin-top: 0;
    margin-right: auto;
    margin-left: auto;
    padding: 10px;
    width: 95%;
  }

  .col-1 {
    height: 70px;
    line-height: 70px;
    font-size: 40px;
  }
  .col-1-2-player {
    height: 50px;
    line-height: 50px;
    font-size: 30px;
  }
  .player-id {
    font-size: 20px !important;
    line-height: 20px;
  }
  .dice-button {
    font-size: 18px;
  }

}

/*ANIMATION*/
.animated {
  -webkit-animation-duration: 2s;
  animation-duration: 2s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

@-webkit-keyframes flipInX {
  from {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
    transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
    -webkit-animation-timing-function: ease-in;
    animation-timing-function: ease-in;
    opacity: 0;
  }

  40% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
    transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
    -webkit-animation-timing-function: ease-in;
    animation-timing-function: ease-in;
  }

  60% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
    transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
    opacity: 1;
  }

  80% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
    transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
  }

  to {
    -webkit-transform: perspective(400px);
    transform: perspective(400px);
  }
}

@keyframes flipInX {
  from {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
    transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
    -webkit-animation-timing-function: ease-in;
    animation-timing-function: ease-in;
    opacity: 0;
  }

  40% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
    transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
    -webkit-animation-timing-function: ease-in;
    animation-timing-function: ease-in;
  }

  60% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
    transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
    opacity: 1;
  }

  80% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
    transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
  }

  to {
    -webkit-transform: perspective(400px);
    transform: perspective(400px);
  }
}

.flipInX {
  -webkit-backface-visibility: visible !important;
  backface-visibility: visible !important;
  -webkit-animation-name: flipInX;
  animation-name: flipInX;
}