* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.green {
  color: rgb(18, 194, 27);
}
.red {
  color: rgb(207, 17, 43);
}


body {
font-size: 1.5em;
}
  


main {
  display: grid;
  align-items: center;
  justify-content: center;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
  height: 100vh;
  overflow: hidden;
}

section.ui {
  grid-column: 2/-2;
  position: relative;
}

pre {
  background-color: rgb(228, 227, 227);
  border-radius: 3px;
  padding: 20px 10px;
  margin: 10px 0px;
  height: 600px;
  overflow: scroll;
}

section.ui {
  font-family: "Roboto Condensed", sans-serif;
  align-self: end;
}

section.ui .problem-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

section.ui h2 {
  text-align: center;
}

section.ui .p-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

section.ui input {
  margin: 0px 5px 0px 5px;
  text-align: center;
  font-size: 1em;
  flex: 1;
}

section.ui .result-display {
  display: flex;
  justify-content: space-between;
}

button {
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-size: 1.2em;
  cursor: pointer;
  transition: box-shadow 0.3s, filter 0.3s, border-radius 0.3s;
}
button:nth-child(1) {
  background-color: #652487;
  background-image: linear-gradient(160deg,#652487 0,#443ac3 60%,#073eac 100%);
}
button:nth-child(2) {
  background-color: #652487;
  background-image: linear-gradient(160deg,#073eac 0%,#04988e 100%);
}

button:hover {
  border-radius: 4px;
  box-shadow: 2px 2px 5px black;
  filter: brightness(1.1);
}

.inactive-btn {
  background-color: gray!important;
  background-image:none!important;
  pointer-events: none;

}

section.navigator {
  grid-column: 2/-2;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-self: start;
}
section.navigator button {
  flex: 1;
}

@media only screen and (max-width: 1200px) {
  body {
    font-size: 1.2em;
  }
  pre {
    height: 500px;
  }
  
}

@media only screen and (max-width: 458px) {
  body {
    font-size: 1em;
  }
  pre {
    height: 500px;
  }
  div.problem-view h2 {
    font-size: 1.2em;
  }
  section {
    padding: 0 10px;
  }
  section.ui {
    grid-column: 1/-1;
  }
  section.navigator {
    grid-column: 1/-1;
  }

  
}


@media only screen and (max-height: 820px) {
  body {
    font-size: 1.2em;
  }
  pre {
    height: 300px;
  }
  
}

@media only screen and (max-height: 592px) {
  body {
    font-size: 1.2em;
  }
  pre {
    height: 300px;
  }
  
}