:root {
  --bigFont: calc(5vmin + 15px);
  --buttonFont: calc(2vmin + 15px);
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #191716;
  margin: 0px;
  padding: 0px;
  font-family: "Montserrat", sans-serif;
}

.header {
  display: flex;
  justify-content: center;
  color: #c3f3c0;
  font-size: var(--bigFont);
  padding: 10px;
}

.content {
  display: flex;
  flex: 1 0 auto;
  justify-content: center;
  margin: 0px 18px;
  margin-bottom: 24px;
}

/* content items */
.calc {
  background: black;
  height: max-content;
  border-radius: 10px;
  width: max-content;
  margin-top: 5%;
}

#screen {
  display: flex;
  flex-direction: column;
  padding: 0px;
  height: 120px;
  background: #c5e6a6;
  border-radius: 10px 10px 0px 0px;
}

#screen div {
  height: auto;
  padding: 10px;
  background: transparent;
  font-size: 2.4em;
  direction: rtl;
}

#screen #upScreen {
  font-size: 1.8em;
  direction: ltr;
}

.Keys {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  width: inherit;
  padding: 8px;
  gap: 10px;
}

.calc-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.calc-row > button {
  font-family: "Montserrat", sans-serif;
  background: #373f47;
  font-size: var(--buttonFont);
  font-weight: 700;
  color: #c3f3c0;
  padding: 10px;
  height: max(40px, 100%);
  width: max(40px, 90%);
  border: 0px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;
}

.Keys button:hover {
  background: grey;
}

#equals {
  width: inherit;
  border-radius: 30px;

  grid-column: 3 / 5;
}

#equals:hover {
  background: #3185fc;
}

#bkSpace {
  font-size: 1.5em;
}

.Keys .red {
  color: #ff3366;
}

.Keys .red:hover {
  background: #f5b700;
}

.Keys .operate:hover {
  background: #ff3366;
}

.footer {
  display: flex;
  justify-content: center;
  margin-top: auto;
  background: #c3f3c0;
  padding: 10px;
  font-weight: 700;
}

@media (min-width: 700px) {
  .calc {
    width: 420px;
  }

  .Keys {
    height: 400px;
  }
}
