@font-face {
  font-family: "myFont";
  src: url("CW_BITMP.TTF") format('truetype');
}

body {
  margin: 0;
  overflow: hidden;
}

.start {
  z-index: 4;
  background-color: rgba(102, 51, 0, 0.9);
  padding: 10px 40px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-transform: uppercase;
  font-family: 'myFont', sans-serif;
  color: white;
  text-align: center;
  outline: 2px solid gold;
  outline-offset: -4px;
}

.start button {
  display: block;
  margin: 30px auto;
  padding: 10px 30px 20px;
  border: none;
  outline: none;
  border-radius: 2px;
  cursor: pointer;
  text-align: center;
  font-size: 20px;
  font-family: 'myFont', sans-serif;
  text-transform: uppercase;
  background-color: gold;
  color: rgba(102, 51, 0, 1);
  -webkit-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  -moz-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
}

.single:hover, .vs-player:hover {
  background-color: rgba(0, 128, 255, 1);
  outline: 2px solid gold;
  outline-offset: -4px;
  color: gold;
}

.background-image {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -2;
  height: 100%;
  width: 100%;
  background: url(../images/background-image.jpg) no-repeat;
  background-size: cover;
  -webkit-filter: blur(2px);
  -moz-filter: blur(2px);
  -o-filter: blur(2px);
  -ms-filter: blur(2px);
  filter: blur(2px);
}

.content {
  display: none;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  display: inline-grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  width: 600px;
  background-image: url(../images/8.png);
  opacity: 0.9;
  border: 1px solid grey;
  -webkit-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  -moz-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
}

.sidebar {
  padding: 20px 20px 40px 20px;
  margin-right: 20px;
  background-color: rgba(102, 51, 0, 0.9);
  outline: 2px solid gold;
  outline-offset: -4px;
}

.sidebar .info {
  margin: 20px 0;
  text-transform: uppercase;
  font-family: 'myFont', sans-serif;
  color: white;
  width: 100%;
  text-align: left;
}

.sidebar .player th, .sidebar .score th {
  background-color: transparent !important;
  font-weight: bold;
}

.sidebar .player td, .sidebar .score td {
  background-color: transparent !important;
  text-align: right;
}

.sidebar p {
  font-family: 'myFont', sans-serif;
  color: white;
}

.water-button {
  display: block;
  margin: 40px auto 0;
  padding: 10px 20px 15px;
  border: none;
  outline: none;
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
  font-family: 'myFont', sans-serif;
  text-transform: uppercase;
  background-color: rgba(0, 128, 255, 1);
  color: white;
}

.water-button:hover {
  outline: 2px solid gold;
  outline-offset: -4px;
  color: gold;
}

.extras {
  display: flex;
  justify-content: space-around;
}

.extras button {
  margin: 0 5px;
  padding: 10px 20px 15px;
  border: none;
  outline: none;
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
  font-family: 'myFont', sans-serif;
  text-transform: uppercase;
  background-color: grey;
  color: white;
}

.extras button#restart {
  background-color: red;
}

.extras button:hover {
  outline: 2px solid gold;
  outline-offset: -4px;
  color: gold;
}

.win strong {
  background-color: transparent !important;
}

.square {
  min-height: 50px;
  min-width: 50px;
  display: inline-block;
  opacity: 0.9;
  border: 1px solid grey;
  background-size: cover;
  cursor: url(../images/2.png), auto;
}

.square:hover {
  outline: 2px solid gold;
  outline-offset: -4px;
}

.square.weeds {
  background-image: url(../images/7.png);
  cursor: url(../images/4.png), auto;
  background-color: rgba(102, 51, 0, 0.8);
}

.plant {
  background-image: url(../images/1.png);
  background-size: cover;
}

.water:hover, .water:hover+.water, .water:hover+.water+.water+.water+.water+.water+.water+.water+.water+.water+.water+.water+.water, .water:hover+.water+.water+.water+.water+.water+.water+.water+.water+.water+.water+.water+.water+.water {
  cursor: url(../images/3.png), auto;
  background-color: rgba(0, 0, 255, 0.8);
  outline: 2px solid gold;
  outline-offset: -4px;
}

.one {
  background-color: rgba(0, 128, 255, 0.3);
  color: rgba(0, 128, 255, 1);
}

.one-planted {
  background-image: url(../images/12.png);
  background-color: rgba(0, 128, 255, 0.8);
}

.two-planted {
  background-image: url(../images/12.png);
  background-color: rgba(255, 51, 51, 0.8);
}

.two {
  background-color: rgba(255, 51, 51, 0.3);
  color: rgba(255, 51, 51, 1);
}

.walking-chicken {
  background: url(../images/walkingchicken.gif) no-repeat;
  background-size: cover;
  position: fixed;
  animation: walkingChicken 60s linear 5;
  left: -100px;
  bottom: 0;
  width: 100px;
  height: 120px;
}

@keyframes walkingChicken {
  0% {
    left: -100px;
  }
  20% {
    left: -100px;
  }
  50% {
    left: 50%;
  }
  100% {
    left: calc(100% + 100px);
  }
}

/*********************
Title animation
*********************/

*, *:before, *:after {
  position: relative;
}

.title-mobile h1 {
  text-transform: uppercase;
  font-family: 'myFont', sans-serif;
  text-align: center;
  font-size: 3em;
  color: gold;
  text-shadow: .03em .03em 0 hsla(230, 40%, 50%, 1);
  margin: 0;
}

.title-mobile {
  display: none;
  position: fixed;
  left: 0;
  top: -10px;
  right: 0;
}

.title-main {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
}

.title-main h1 {
  text-transform: uppercase;
  margin: 0 10px;
  display: inline-block;
  color: gold;
  font-family: 'myFont', serif;
  font-size: 4.5em;
  text-shadow: .03em .03em 0 hsla(230, 40%, 50%, 1);
}

.title-main h1:after {
  content: attr(data-shadow);
  position: absolute;
  top: .06em;
  left: .06em;
  z-index: -1;
  text-shadow: none;
  background-image: linear-gradient( 45deg, rgba(102, 51, 0, 0.8) 45%, hsla(48, 20%, 90%, 1) 45%, hsla(48, 20%, 90%, 1) 55%, transparent 0);
  background-size: .05em .05em;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shad-anim 15s linear infinite;
}

@keyframes shad-anim {
  0% {
    background-position: 0 0
  }
  0% {
    background-position: 100% -100%
  }
}

/***************************
MODAL BOX css
*************************/

#modal {
  display: none;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.3);
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 1;
  overflow: hidden;
}

.how-to-play>#modal-textbox, .how-to-play-single>#modal-textbox {
  width: 770px;
  padding: 1% 2%;
}

#modal-textbox {
  text-transform: uppercase;
  background-color: rgba(102, 51, 0, 0.9);
  outline: 2px solid gold;
  outline-offset: -4px;
  width: 550px;
  color: white;
  border-radius: 2px;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
  padding: 2%;
  font-family: "myFont", serif;
  text-align: center;
}

.modal-buttons {
  text-transform: uppercase;
  margin: 20px 0;
  padding: 10px 20px 15px;
  border: none;
  outline: none;
  border-radius: 3px;
  background-color: gold;
  font-family: 'myFont';
  cursor: pointer;
  color: rgba(102, 51, 0, 1);
}

.modal-buttons:hover {
  outline: 2px solid white;
  outline-offset: -4px;
  color: white;
}

#modal-footer {
  text-align: center;
}

p strong, li strong {
  color: gold;
  margin-right: 10px;
}

li, ul, p {
  text-align: left;
  padding: 0;
  list-style: none;
}

li {
  margin-bottom: 10px;
}

/************************
Responsive Design
***********************/

@media screen and (max-width: 900px) {
  html, body {
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
  }
  .title-start.title-mobile {
    position: fixed;
    top: 50px;
  }
  .content {
    flex-direction: column-reverse;
    height: initial;
  }
  .sidebar {
    display: flex;
    width: 60%;
    padding: 20px;
    margin: 20px 0 0 0;
  }
  .water-button {
    margin: 0;
    margin-left: 20px;
    flex: 1;
  }
  .sidebar .info {
    margin: 0;
    flex: 3;
    width: auto;
  }
  .title-main {
    display: none;
  }
  .title-mobile {
    display: block;
    position: relative;
  }
  .extras {
    display: none;
  }
  .walking-chicken {
    width: 65px;
    height: 80px;
  }
}

@media screen and (max-width: 650px) {
  .start {
    width: 60%;
  }
  .square {
    min-height: 30px;
    min-width: 30px;
  }
  .sidebar {
    width: 80%;
  }
  .container {
    width: 360px;
    grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
  }
  #modal-textbox {
    width: 300px;
  }
  h1 {
    font-size: 20px;
  }
}
