@font-face {
  font-family: "Tex Gyre Adventor";
  src: url("tex-gyre-adventor/texgyreadventor-regular.otf");
}

@font-face {
  font-family: "Tex Gyre Adventor Bold";
  src: url("tex-gyre-adventor/texgyreadventor-bold.otf");
}

#wrapper {
  width: 1250px;
  margin: 40px auto;
  border: 1px solid #323232;
  font-family: "Tex Gyre Adventor", sans-serif;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

nav {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  background-color: #323232;
  color: white;
  padding-left: 25px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

h1 {
  font-size: 40px;
  margin: 10px 20px 10px 0;
  font-weight: normal;
}

button {
  background-color: #323232;
  color: white;
  text-transform: uppercase;
  margin: 0 20px;
  cursor: pointer;
  border: none;
  font-size: 14px;
}

main > div {
  width: 95%;
  height: 350px;
}

#player-1, #player-2 {
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 10px;
  box-sizing: border-box;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#player-2 {
  align-items: flex-start;
  padding-top: 10px;
}

#board {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  background-image: url("images/wood_board.png");
  border-radius: 20px;
}

#board > div {
  height: 100%;
}

#col-1, #col-3 {
  width: 15%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

#col-2 {
  width: 70%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#row-1, #row-2 {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

#mancala-1, #mancala-2 {
  height: 80%;
  width: 80%;
  padding: 15px;
  box-sizing: border-box;
  border-radius: 40px;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("images/wood_board.png");
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  position: absolute;
  z-index: 2;
}

.mancala-layer {
  display: flex;
  padding: 15px;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  flex-direction: row;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 3;
}

.hole-1, .hole-2 {
  border-radius: 50%;
	width: 115px;
	height: 115px;
  position: relative;
  margin: 10px;
  box-sizing: border-box;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("images/wood_board.png");
  padding: 15px;
  z-index: 1;
}

.marble-layer {
	width: 100%;
	height: 100%;
  display: flex;
  padding: 15px;
  box-sizing: border-box;
  cursor: pointer;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  flex-direction: row;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 2;
}

.marble {
  border-radius: 50%;
  width: 30px;
  height: 30px;
  background-color: pink;
  background: radial-gradient(#b400a2, #9e0031);
  box-shadow: 0 3px 2px rgba(0, 0, 0, 0.3);
}

.hover-number {
  z-index: 3;
  visibility: hidden;
  text-align:center;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  cursor: pointer;
}

.mancala-number {
  z-index: 4;
  visibility: hidden;
  text-align:center;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  cursor: pointer;
}

.player-number {
  position: absolute;
  visibility: hidden;
  animation-name: player-appear;
  animation-duration: 4s;
}

@keyframes player-appear {
  0% {visibility: visible;}
  30% {transform: scale(2); opacity: 1;}
  100% {opacity: 0;}
}

/*used same rules laid out here: https://raventools.com/blog/create-a-modal-dialog-using-css-and-javascript/*/
#winning-message {
  width:300px;
  margin: 100px auto;
  background-color: #fff;
  border:1px solid #000;
  padding:15px;
  text-align:center;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
  font-family: "Tex Gyre Adventor", sans-serif;
}

#instructions {
  width:1000px;
  margin: 100px auto;
  background-color: #fff;
  border:1px solid #000;
  padding:15px;
  text-align:left;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
  font-family: "Tex Gyre Adventor", sans-serif;
  letter-spacing: 1px;
  display: flex;
  flex-direction: column;
}

span {
  font-family: "Tex Gyre Adventor Bold", sans-serif;
}

footer {
  height: 50px;
  background-color: #323232;
  letter-spacing: 2px;
  color: white;
  text-transform: uppercase;
  font-size: 9px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/*used same rules laid out here: https://raventools.com/blog/create-a-modal-dialog-using-css-and-javascript/*/
#winning-modal {
  visibility: hidden;
  position: absolute;
  left: 0px;
  top: 0px;
  width:100%;
  height:100%;
  text-align:center;
  z-index: 5000;
  background-color: rgba(0,0,0,.4);
}

#instructions-modal {
  visibility: hidden;
  position: absolute;
  left: 0px;
  top: 0px;
  width:100%;
  height:100%;
  text-align:center;
  z-index: 5000;
  background-color: rgba(0,0,0,.4);
}

.modal-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  margin-top: 20px;
}

#close-button {
  display: flex;
  justify-content: flex-end;
  flex-direction: row;
  align-items: center;
}
