body {
  margin: 0;
  padding: 0;
  font-family: "Protest Strike", sans-serif;
  color: #9b2226;
  background-color: rgb(255, 140, 0, 0.5);
}

.hide {
  display: none;
}

#container canvas,
#settings-container {
  position: absolute;
}

#container canvas,
#game-layout {
  position: absolute;
}

#container canvas,
#main-screen-gear {
  position: absolute;
}

/* Gear icon */
#main-screen-gear {
  position: absolute;
  right: 15px;
  top: 15px;
}

#main-gear {
  width: 50px;
  height: 50px;
}

#game-layout {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  width: 80%;
  height: 80%;
  right: 10%;
  top: 10%;
}

#feedback-box {
  width: 100%;
  height: 20%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.left-side {
  width: 50%;
  height: 80%;
}
.right-side {
  width: 49%;
  height: 80%;
}
#problem-box {
  height: 15%;
}

#monster-box {
  width: 100%;
  height: 85%;
}

.hungry-image {
  background: url(./images/hungry-monster-481w.gif) no-repeat center center /
    contain;
}

.success-image {
  background: url(./images/happy-monster-481w.gif) no-repeat center center /
    contain;
}

.feedback {
  font-size: 3em;
  color: #ca6702;
}
.success {
  font-size: 5em;
  color: #9b2226;
  animation: blinker 0.7s linear infinite;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}

/* Number Problem Container */
#problem-box > .number-problem {
  width: 100%;
  height: 100%;
  font-size: 4em;
  gap: 20px;
  justify-content: center;
  align-items: center;
  display: flex;
}

.question {
  color: MediumSeaGreen;
}

/* Numbers Container */
.calc-box {
  display: flex;
  justify-content: center;
  align-items: center;
}
#calc-container {
  width: 70%;
}

.grid {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(3, 1fr);
}

.grid > button {
  padding: 10px;
  background-color: #e9d8a6;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  font-size: 4em;
  color: #9b2226;
  font-family: "Protest Strike", sans-serif;
  cursor: pointer;
  box-shadow: 0 15px 21px rgba(0, 0, 0, 0.2);
}

.grid > button:active {
  background-color: rgba(255, 239, 213, 0.8);
}

button.clear {
  font-size: 3em;
}

button.check {
  font-size: 3em;
}

.monster-space {
  display: flex;
  justify-content: center;
  align-items: center;
}

.happy-monster-space {
  position: absolute;
  right: 30%;
  bottom: 0%;
}

.playAgain {
  position: absolute;
  padding: 10px;
  font-size: 3em;
  font-family: "Protest Strike", sans-serif;
  color: #ae2012;
  bottom: 10%;
  right: 5%;
  border-radius: 10px;
  border: 4px solid #0a9396;
  background-color: #94d2bd;
  animation: blink-button 0.5s step-end infinite alternate;
}

@keyframes blink-button {
  50% {
    border-color: #ae2012;
  }
}

/* Settings */
#settings-container {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  width: 100%;
  min-width: 300px;
  height: 90%;
  padding: 5px 25px 10px;
  background-color: rgb(255, 140, 0, 0.001);
}

.settings-header {
  width: 100%;
  align-items: flex-end;
  display: flex;
  margin-left: auto;
  margin-right: 100px;
  margin-top: 0px;
  line-height: 1em;
}

.settings-header > img {
  height: 30px;
  width: 30px;
  display: inline-block;
  align-self: center;
}

h1,
settings-header {
  font-size: 2em;
}
h1 {
  margin: 18px 4px 18px;
  display: inline-block;
  align-self: center;
}
.columns {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  line-height: 2;
  font-size: 1.5em;
}

.col1 {
  width: 38%;
  line-break: auto;
}

.col2 {
  width: 38%;
  align-self: flex-end;
}

input[type="text"] {
  border: none;
  border-bottom: 2px solid #9b2226;
  background-color: rgb(255, 140, 0, 0.001);
  height: 2em;
  color: #9b2226;
  font-size: 1em;
  width: 50px;
  padding-left: 20px;
}

input[id="fname"] {
  width: 300px;
}

.done-button {
  align-self: flex-end;
  padding-left: 20px;
}

.button {
  background-color: rgb(255, 140, 0, 0.001);
  border: 5px solid #9b2226;
  border-radius: 10px;
  color: #9b2226;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  padding: 10px 20px;
  font-size: 1.5em;
}

.button:hover {
  border: 5px solid DarkViolet;
  color: DarkViolet;
}

@media (max-width: 667px) {
  #game-layout {
    top: 15%;
  }

  #settings-container {
    padding-top: 20px;
    height: 100%;
  }

  .settings-header {
    display: none;
  }

  .columns {
    line-height: 1.5;
    font-size: 1em;
  }

  .col1 {
    width: 33%;
  }

  .col2 {
    align-self: flex-start;
    width: 40%;
    line-break: auto;
  }
  input[type="text"] {
    height: 1em;
    color: #9b2226;
    font-size: 1.2em;
    width: 30px;
    padding-left: 10px;
  }

  input[id="fname"] {
    width: 100px;
  }

  .button {
    border: 3px solid #9b2226;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 1em;
  }

  .done-button {
    padding-left: 10px;
  }

  /* Feedback */
  #feedback-box {
    height: 0%;
  }

  .feedback {
    font-size: 2em;
    /* color: #ca6702; */
  }

  /* NUMBER PROBLEM */
  #problem-box > .number-problem {
    font-size: 3em;
  }
  .number-problem {
    gap: 8px;
  }

  /* Calc Container */
  .grid > button {
    padding: 2px;
    font-size: 2em;
  }

  button.clear {
    font-size: 1em;
  }

  button.check {
    font-size: 1.5em;
  }

  .success {
    font-size: 2em;
    animation: blinker 0.7s linear infinite;
  }

  .playAgain {
    font-size: 1.5em;
    border-radius: 5px;
    top: 70%;
    right: 3%;
  }
}

@media screen and (max-device-width: 667px) and (orientation: landscape) {
  body {
    background-color: #ebdef0;
  }
  #main-screen-gear {
    position: absolute;
    right: 3%;
    top: 3%;
  }
  #game-layout {
    height: 90%;
  }
  .feedback {
    font-size: 1em;
  }
  #problem-box > .number-problem {
    width: 100%;
    height: 100%;
    font-size: 3em;
  }
  .calc-box {
    align-items: flex-end;
  }
}
/* iPad mini 768 */
@media screen and (max-device-width: 500px) and (orientation: portrait) {
  body {
    background-color: BlanchedAlmond;
  }

  /* Settings */
  #settings-container {
    position: absolute;
    top: 5%;
  }

  .columns {
    line-height: 2.1;
    flex-direction: column;
    font-size: 1em;
  }

  #game-layout {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    width: 80%;
    height: 100%;
    top: 10%;
    padding-top: 10%;
  }

  #feedback-box {
    width: 100%;
    margin-bottom: 10px;
  }

  .right-side {
    width: 49%;
    height: 80%;
    margin-top: 13%;
    width: 100%;
    z-index: 10;
  }
  .left-side {
    width: 50%;
    height: 70%;
    margin-top: 15%;
    position: absolute;
    top: 3%;
    z-index: 1;
  }

  #monster-box {
    height: 40%;
  }

  .calc-box {
    align-items: flex-end;
  }
  #play-again-container {
    order: 3;
    width: 100%;
  }

  .playAgain {
    bottom: initial;
    z-index: 20;
  }
  .done-button {
    z-index: 21;
  }
  .col2 {
    z-index: 22;
  }
  .col1 {
    z-index: 23;
  }

  /* Gear icon */
  #main-screen-gear {
    position: absolute;
    right: 3%;
    bottom: 3%;
  }

  .feedback {
    font-size: 1.2em;
  }

  .done-button {
    /* width: 100%; */
    min-width: 150px;
  }

  .col1 {
    width: 50%;
    margin: 30px 30px 0px;
    /* min-width: 150px; */
  }
  .col2 {
    width: 50%;
    margin: 10px 30px;

    /* min-width: 250px; */
  }
}

/* iPHONE 8 PORTRAIT ORIENTATION */
@media only screen and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) {
  body {
    background-color: greenyellow;
  }

  #game-layout {
    height: 90%;
  }
  .left-side {
    height: 90%;
  }

  .right-side {
    width: 40%;
    height: 100%;
  }
}
/* Settings */
