/* reset  */
html {
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

  *, *:before, *:after {
  box-sizing: inherit;
  }
  
body {
  display: grid;
  grid-template-columns: 25% 25% 25% 25%;
  grid-template-rows: 20% 80%;
  height: 100%;
  margin: 0;
  background-color: #9e7c65;
}

@media screen and (min-width: 320px) and (max-width: 767px) and (orientation: portrait) {
  .game {
    display: none;
  }

  #rotate-screen {
    display: block;
  }
}

  
  /* typography */
  
body {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  color: #f0f3ec;
}

h1 {
  margin: 0;
  font-family: 'Mansalva', cursive;
  font-size: calc(38px + (60 - 38) * ((100vw - 300px) / (1600 - 300)));
  color: #dcdfd7;
  letter-spacing: 0.3em;
}

h2 {
  font-size: 38px;
  font-weight: bold;
}

p {
  font-size: calc(14px + (20 - 14) * ((100vw - 300px) / (1600 - 300)));
  font-weight: bold;
}

a {
  color: #050505;
}

/* components */

.button {
  background-color: transparent;
  border: none;
  cursor: pointer;
}

/* layout */

#site-header{
  grid-column: 1 / 5;
  grid-row: 1;
  justify-self: center;
  align-self: center;
}

#site-header h1 {
  user-select: none;
}

@media (min-width: 768px) {
  #site-header {
    margin-bottom: 75px;
  }
}

#site-main {
  position: relative;
  grid-column: 1 / 5;
  grid-row: 2;
  padding-top: 15px;
} 

/* site main */

.splash {
  display: block;
  position: relative;
  text-align: center;
}

.splash p {
  margin: 0 0 30px 0;
  color: #f0f3ec;
  letter-spacing: 0.1em;
  pointer-events: none;
}

@media (min-width: 768px) {
  .splash p  {
    margin: 0 0 40px 0;
  }
}

@media (min-width: 768px) {
  .splash button {
    padding-top: 20px;
  }
}

#play-button {
  margin-bottom: 20px;
  /* min-width: 60px;
  min-height: 60px;
  background-color: #ff8889; */
}

#play-button i {
  color: #ff8889;
  font-size: calc(90px + (120 - 90) * ((100vw - 300px) / (1600 - 300)));
}

#play-button i:hover {
  color: #39332b;
}

#game-settings button {
  color: #f0f3ec;
  background-color: #ff8889;
  border-radius: 5px;
  padding: 5px;
  font-size: calc(12px + (18 - 12) * ((100vw - 300px) / (1600 - 300)))
}

#game-settings button:hover {
  background-color: #39332b;
}

#game-settings button:focus {
  outline: none;
}

#sound.sound-on {
  background-color: rgb(119, 111, 111);
}

#game-info {
  margin-left: 10px;
}

/* game screen */

.game {
  display: none;
  grid-template-columns: 30% 40% 30%;
  grid-template-rows: auto 13%;
  height: 100%;
}

@media (min-width: 768px) {
  .game {
    max-width: 768px;
    margin: 0 auto;
  }
}

#canvas-wrapper {
  grid-column: 1 / 4;
  grid-row: 1;
}

#my-canvas {
  display: block; 
  margin: 0 auto; 
  background: #dcdfd7; 
}

#cat, #food, #poison {
  display: none;
}

#score {
  grid-column: 1;
  grid-row: 2;
}

#lives {
  grid-column: 3;
  grid-row: 2;
}

#score, #lives {
  margin: 0;
  align-self: center;
  justify-self: center;
  font-size: calc(18px + (38 - 18) * ((100vw - 300px) / (1600 - 300)));
  user-select: none;
}

#lives li {
  display: inline-block;
  color: #ff8889;
}

#rotate-screen {
  display: none;
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  padding: 40px;
  text-align: center;
  color: black;
  background-color: #ffc0cb9c;
}

#rotate-screen i {
  font-size: 36px;
}

/* game over screen */

.game-over {
  display: none;
  text-align: center;
}

.game-over h2 {
  font-size: 30px;
  margin: 0 0 20px 0;
}

@media (min-width: 768px) {
  .game-over h2 {
    font-size: 40px;
  }
}

#dead-cat {
  width: 120px;
  margin-bottom: 10px;
}

@media (min-width: 768px) {
  #dead-cat {
    width: 180px;
  }
}

#final-score {
  margin: 0 0 10px 0;
  font-size: 22px;
}

#restart-button {
  color: #f0f3ec;
  background-color: #ff8889;
  border-radius: 5px;
  padding: 5px;
  font-size: calc(12px + (18 - 12) * ((100vw - 300px) / (1600 - 300)))
}

#restart-button:hover {
  background-color: #39332b;  
}
