* {
  padding: 0;
  border: 0;
  margin: 0;
  font-family: "Raleway", sans-serif;
}

body {
  overflow: hidden;
  background-color: gray;
  background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(48, 48, 48, 0.65)),
    url(../images/dice.jpg);
  background-size: cover;
  height: 100vh;
}

.wrapper {
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr minmax(485px, 1.6fr) 1fr;
  grid-template-rows: 0.5fr auto minmax(300px, 600px) 70px 1fr;
  grid-template-areas:
  /* 1      2       3 */
    ".      .       ." /* 1 */
    ".      header  ." /* 2 */
    ".      main    ." /* 3 */
    ".      footer  ." /* 4 */
    ".      .       ."; /* 5 */
  box-shadow: 10px 10px black;
}

header {
  display: flex;
  justify-content: center;
  grid-area: header;
  padding: 20px;
  font-size: 120%;
  font-weight: 500;
  color: #fff;
  text-shadow: 1px 1px 3px #2b2b2b;
  justify-self: center;
  text-transform: uppercase;
}

main {
  grid-area: main;
  background-color: rgb(194, 194, 194);
  box-shadow: 1px 3px 6px rgba(0, 0, 0, 0.65);
}

footer {
  grid-area: footer;
  background-color: #fff;
}

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

footer a {
  color: #ee8a18;
  text-decoration: none;
}

footer a,
footer p {
  font-size: 12px;
}

footer button {
  font-size: 25px;
}

footer button:first-child:hover {
  cursor: pointer;
  color: #eb4d4d;
}

main {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr minmax(5vw, 45px) minmax(5vw, 45px) 1fr 1fr 1fr;
  grid-template-rows: auto auto minmax(5vw, 45px) minmax(5vw, 45px) auto auto auto;
}

#player-area-1 {
  background-color: #fff;
  grid-column: 1/5;
  grid-row: 1/8;
}

#player-area-2 {
  background-color: #f5f4f4;
  grid-column: 5/9;
  grid-row: 1/8;
}

#new-game-button {
  padding: 1.9rem 0 0 0;
  grid-column: 3/7;
  grid-row: 1/2;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#player-name-1 {
  grid-column: 1/4;
  grid-row: 2/3;
  display: flex;
}

#player-name-2 {
  grid-column: 6/9;
  grid-row: 2/3;
}

.player-name {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(235, 77, 77);
  font-weight: 100;
  font-size: 2em;
  text-transform: uppercase;
}

#player-dot-1 {
  grid-column: 4/5;
  grid-row: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
  content: "•";
}

#player-dot-2 {
  grid-column: 5/6;
  grid-row: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

#current-scoreboard-title-1 {
  grid-column: 1/4;
  grid-row: 3/4;
}

#current-scoreboard-title-2 {
  grid-column: 6/9;
  grid-row: 3/4;
}

.current-scoreboard-title,
.scoreboard-title {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 20px;
  padding-top: 0px;
}
#current-scoreboard-1 {
  grid-column: 1/4;
  grid-row: 4/5;
}

#current-scoreboard-2 {
  grid-column: 6/9;
  grid-row: 4/5;
}

.current-scoreboard,
.scoreboard {
  color: rgb(235, 77, 77);
  font-weight: 100;
  font-size: 45px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

#dice {
  grid-column: 4/6;
  grid-row: 3/4;
  width: 100%;
  border-radius: 25px;
  box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.04);
}

#btn-roll-1 {
  grid-column: 1/3;
  grid-row: 5/6;
}
#btn-roll-2 {
  grid-column: 5/7;
  grid-row: 5/6;
}
#btn-hold-1 {
  grid-column: 3/5;
  grid-row: 5/6;
}
#btn-hold-2 {
  grid-column: 7/9;
  grid-row: 5/6;
}

#scoreboard-title-player-1 {
  grid-column: 1/4;
  grid-row: 6/7;
  display: flex;
  align-content: center;
  justify-content: space-evenly;
}
#scoreboard-title-player-2 {
  grid-column: 6/9;
  grid-row: 6/7;
  display: flex;
  align-content: center;
  justify-content: space-evenly;
}
#scoreboard-player-1 {
  grid-column: 1/4;
  grid-row: 7/8;
  display: flex;
  align-content: center;
  justify-content: space-evenly;
}
#scoreboard-player-2 {
  grid-column: 6/9;
  grid-row: 7/8;
  display: flex;
  align-content: center;
  justify-content: space-evenly;
}

i {
  color: #eb4d4d;
  display: inline-block;
  margin-right: 15px;
  font-size: 32px;
  transition: margin 0.3s;
}

button {
  padding: 10px 0px 0px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  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;
}

.btn-player-1 {
  visibility: visible;
}
.btn-player-2 {
  visibility: hidden;
}

#overlay {
  position: fixed; /* Sit on top of the page content */
  display: none; /* Hidden by default */
  width: 100%; /* Full width (cover the whole page) */
  height: 100%; /* Full height (cover the whole page) */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3); /* Black background with opacity */
  z-index: 2; /* Specify a stack order in case you're using a different order for other elements */
  cursor: pointer; /* Add a pointer on hover */
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  grid-template-areas:
  /* 1      2       3 */
    ".      .       ." /* 1 */
    ".      pig     ." /* 2 */
    ".      .       ."; /* 3 */
}

#overlay img,
#overlay h1 {
  grid-area: pig;
}

#overlay img {
  justify-items: center;
  margin: auto;
}

#overlay h1 {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
  text-shadow: 1px 1px 3px #2b2b2b;
}

#inst {
  position: fixed; /* Sit on top of the page content */
  display: none; /* Hidden by default */
  width: 100%; /* Full width (cover the whole page) */
  height: 100%; /* Full height (cover the whole page) */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14vh 20vw;
  background-color: rgba(
    255,
    255,
    255,
    0.8
  ); /* Black background with opacity */
  z-index: 3; /* Specify a stack order in case you're using a different order for other elements */
  cursor: pointer; /* Add a pointer on hover */
}

#inst h1 {
  color: #eb4d4d;
  padding-bottom: 15px;
}
#inst ul {
  margin-left: 12px;
  padding: 5px;
  width: 65%;
}
#inst li {
  margin-left: 15px;
}

#inst p {
  width: 65%;
}
