* {
  box-sizing: border-box;
  font-family: 'Courier New', Courier, monospace;
  overflow: hidden;
}

html {
  height: 100vh;
}

body {
  margin: 0;
  height: 100%;
  background-image: url(../images/beach-background.png);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.title {
  text-align: center;
}

.title h1 {
  font-size: 80px;
  color: darkgreen;
  margin: 20px auto;
}

.game-wrapper {
  display: flex;
  justify-content: space-evenly;
  height: 100%;
}

.grid-wrapper {
  max-height: 600px;
  max-width: 600px;
  flex-grow: 1;
  height: 100%;
  justify-content: center;
}

.grid-wrapper .gameEndText {
  font-size: 40px;
  text-align: center;
  position: absolute;
  top: 60%;
  left: 50%;
  background-color: forestgreen;
  width: 460px;
  margin-left: -230px;
  margin-top: -50px;
  border-radius: 12px;
}

.gameEndText h2 {
  font-size: 50px;
}

.gameEndText p {
  font-size: 30px;
  padding: 0 20px;
}

.grid {
  box-shadow: 0 0 40px 0 rgba(0, 128, 0, 0.2);
  display: flex;
  flex-wrap: wrap;
  height: 100%;
}

.grid div {
  flex-grow: 1;
  height: 10%;
  width: 10%;
}

.buttons {
  text-align: center;
  display: flex;
  flex-direction: column;
  margin-top: 40px;
}

.start, .reset {
  margin-bottom: 30px;
  font-size: 40px;
  padding: 10px 25px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
}

.start {
  background-color: forestgreen;
  border: forestgreen 4px solid;
}

.start:hover {
  border: forestgreen 4px solid;
  background-color: white;
  color: forestgreen;
}

.start:active {
  animation: startButtonGradient 100ms;
  background:forestgreen;
  color:white;
}

.reset {
  background-color: palegreen;
  border: palegreen 4px solid;
}
.reset:hover {
  border: palegreen 4px solid;
  background-color: white;
  color: palegreen;
}

.reset:active {
  animation: resetButtonGradient 100ms;
  background:palegreen;
  color: white;
}

.timer {
  background-color: black;
  font-size: 35px;
  font-family: 'PT Mono', monospace;
  color: white;
  display: inline;
}

.timer span {
  font-weight: bold;
}

.instructions h3 {
  font-size: 30px;
}

.instructions p {
  font-size: 20px;
}

.safespace {
  background-color: honeydew;
  background-size: 300px;
}

.river1, .river2 {
  background-image: url(../images/river.jpeg);
  background-size: 300px;
  display: flex;
  align-items: center;
}

.road {
  background-color: gainsboro;
  background-size: 300px;
  border-bottom: white 2px dashed;
}

.grid div.frog {
  background-image: url(../images/pixel-frog-transparent.png);
  height: 100%;
  width: 100%;
  background-size: 60px;
  border-radius: 18px;
}

.grid div.lily {
  background-image: url(../images/pixel-lilypad-transparent.png);
  background-size: 60px;
  height: 100%;
  width: 100%;
}

.river1 .log, .river2 .log {
  background-image: url(../images/log.jpeg);
  background-size: 300px;
  height: 75%;
  width: 100%;
}

.grid .car {
  background-image: url(../images/pixel-car-transparent-facing-right.png);
  background-size: 60px;
  height: 100%;
  width: 100%;
}

.grid .car2 {
  background-image: url(../images/pixel-car-transparent.png);
  background-size: 60px;
  height: 100%;
  width: 100%;
}

/* Button click animations */
@keyframes startButtonGradient {
  0% {
    background: radial-gradient(circle at center, forestgreen 0%, white 0%, white 100%);
  }
  25% {
    background: radial-gradient(circle at center, forestgreen 24%, white 25%, white 100%);
  }
  50% {
    background: radial-gradient(circle at center, forestgreen 49%, white 50%, white 100%);
  }
  75% {
    background: radial-gradient(circle at center, forestgreen 74%, white 75%, white 100%);
  }
  100% {
    color: white;
    background: radial-gradient(circle at center, forestgreen, 99%, white 100%, white 100%);
  }
}

@keyframes resetButtonGradient {
  0% {
    background: radial-gradient(circle at center, palegreen 0%, white 0%, white 100%);
  }
  25% {
    background: radial-gradient(circle at center, palegreen 24%, white 25%, white 100%);
  }
  50% {
    background: radial-gradient(circle at center, palegreen 49%, white 50%, white 100%);
  }
  75% {
    background: radial-gradient(circle at center, palegreen 74%, white 75%, white 100%);
  }
  100% {
    color: white;
    background: radial-gradient(circle at center, palegreen, 99%, white 100%, white 100%);
  }
}