:root {
  --strongcyan: hsl(172, 67%, 45%);
  --verydarkcyan: hsl(183, 100%, 15%);
  --darkgrayishcyan: hsl(186, 14%, 43%);
  --grayishcyan: hsl(184, 14%, 56%);
  --lightgrayishcyan: hsl(185, 41%, 84%);
  --verylightgrayishcyan: hsl(189, 41%, 97%);
  --white: hsl(0, 0%, 100%);
}

html {
  height: 100%;
}

header {
  position: relative;
  top: -100px;
}

body {
  height: 100%;
  margin: 0px;
  background-color: var(--lightgrayishcyan);
  font-family: "Space Mono", monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.container {
  width: 1000px;
  height: 500px;
  background-color: var(--white);
  border-radius: 30px;
  display: flex;
}

.calc {
  box-sizing: border-box;
  width: 50%;
  padding: 60px;
  color: var(--darkgrayishcyan);
}

label {
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
}

label span {
  color: lightcoral;
}

.calc-input {
  box-sizing: border-box;
  background-color: var(--verylightgrayishcyan);
  height: 50px;
  border-radius: 5px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calc-input:hover {
  outline: 2px solid var(--strongcyan);
  cursor: pointer;
}

input {
  border: none;
  font-family: "Space Mono", monospace;
  text-align: right;
  font-size: 24px;
  background: none;
  outline: none;
  color: var(--verydarkcyan);
  width: 100%;
}

::placeholder {
  color: var(--grayishcyan);
}

input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.percent,
.people {
  margin-top: 35px;
}

.percent__amount {
  width: 100%;
  height: 120px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.percent__amount__button {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 5px;
  border-radius: 5px;
  border: none;
  background-color: var(--verydarkcyan);
  color: var(--white);
  font-family: "Space Mono", monospace;
  font-size: 24px;
}

.percent__amount button:hover {
  cursor: pointer;
  background-color: var(--strongcyan);
  color: var(--verydarkcyan);
}

.percent__amount__toggled {
  background-color: var(--strongcyan);
  color: var(--verydarkcyan);
}

.percent-input {
  padding: 0px;
  margin: 5px;
}

.percent-input input::placeholder {
  text-align: center;
}

.results {
  box-sizing: border-box;
  background-color: var(--verydarkcyan);
  width: 50%;
  margin: 40px;
  border-radius: 30px;
  padding: 40px;
}

.results__tips {
  height: 50%;
}

.results__reset {
  height: 50%;
  display: flex;
  align-items: flex-end;
}

.results__reset button {
  width: 100%;
  height: 50px;
  background-color: var(--strongcyan);
  border: none;
  border-radius: 5px;
  font-family: "Space Mono", monospace;
  font-size: 24px;
  color: var(--verydarkcyan);
}

.results__reset button:hover {
  cursor: pointer;
  background-color: var(--lightgrayishcyan);
}

.results__amount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--darkgrayishcyan);
  margin-bottom: 40px;
}

.results__amount p {
  margin: 0px;
  font-size: 20px;
  color: var(--verylightgrayishcyan);
}

.results__score {
  font-size: 45px;
  color: var(--strongcyan);
}

footer {
  width: 100%;
  text-align: center;
  position: relative;
  top: 120px;
  color: var(--grayishcyan);
}

footer a {
  text-decoration: none;
  color: var(--strongcyan);
}

.input-zero {
  outline: 2px solid lightcoral;
}

@media screen and (max-width: 860px) {
  body {
    height: 150vh;
  }

  .container {
    box-sizing: border-box;
    flex-direction: column;
    width: 100vw;
    height: 100%;
    padding: 30px;
  }

  .calc {
    width: 100%;
    padding: 0px;
    margin-bottom: 30px;
  }

  .results {
    width: 100%;
    height: 30%;
    margin: 0px;
    border-radius: 12px;
    padding: 25px 15px;
  }

  .results__score {
    font-size: 30px;
  }

  .percent__amount {
    height: 180px;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
  }

  .results__amount {
    margin-bottom: 20px;
    font-size: 13px;
  }

  .results__amount p {
    font-size: 16px;
  }

  .results__reset button {
    height: 40px;
    font-size: 18px;
  }

  .results__reset {
    height: 40%;
  }

  footer {
    top: 20px;
    text-align: center;
  }

  header {
    top: -30px;
  }
}
