html {
  /* footer support */
  position: relative;
  min-height: 100%;
}

body {
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
    "Lucida Sans", Arial, sans-serif;
  background-color: #333;
}

.header {
  padding: 0px 0;
}

.title {
  text-align: center;
  font-size: 80px;
  color: white;
}

.container#window {
  display: flex;
  justify-content: center;
}

.container#calculator {
  width: 400px;
  height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 20px;

  background-color: rgb(79, 79, 79);
}

.container#screen {
  width: 90%;
  display: flex;
  flex-direction: column;
  margin: 20px;
  box-sizing: border-box;
  border-radius: 20px;
  flex: 1;
  padding: 20px;
  justify-content: flex-end;
  align-items: flex-end;
  overflow: hidden;
  text-overflow: ellipsis; /*cut off text with an ellipsis*/
  white-space: nowrap; /*keep text on one line */
  background-color: rgb(50, 50, 50);
}

#topValue {
  color: rgb(172, 172, 172);
  font-size: 20px;
  flex: 1;
  margin-top: 15px;
}

#bottomValue {
  color: white;
  font-size: 30px;
  flex: 1;
  display: inline-block;
  white-space: nowrap; /*keep text on one line */
}

.container#tools {
  display: flex;
  flex-direction: column;
  background-color: rgb(117, 117, 117);
  box-sizing: border-box;
  width: 90%;
  border-radius: 20px;
  margin-bottom: 20px;
  overflow: hidden;
  flex: 5;
}

.container#main-buttons {
  display: flex;
  flex: 7;
  box-sizing: border-box;
}

.container#option-buttons {
  display: flex;
  flex: 1;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  padding: 5px;
  padding-bottom: 0px;
}

.container#digit-buttons {
  display: flex;
  flex: 8;
  box-sizing: border-box;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 5px;
}

.container#operation-buttons {
  display: flex;
  flex: 2;
  box-sizing: border-box;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 5px;
  padding-left: 0px;
}

button.digit,
button.equal {
  flex-basis: 29%;
  height: 75px;
  margin: 5px;
  border-radius: 20px;
  box-sizing: border-box;
  background-color: rgb(79, 79, 79);
  border: none;
  font-size: 30px;
  color: white;
}

button.operation {
  flex-basis: 100%;
  margin: 5px;
  height: 75px;
  border-radius: 20px;
  box-sizing: border-box;
  background-color: rgb(79, 79, 79);
  border: none;
  font-size: 30px;
  color: white;
}

button.option {
  margin: 5px;
  flex: 1;
  height: 50px;
  border-radius: 20px;
  box-sizing: border-box;
  background-color: rgb(79, 79, 79);
  border: none;
  font-size: 30px;
  color: white;
}

button.mode {
  margin: 5px;
  height: 60px;
  width: 70px;
  position: fixed;
  bottom: 10%;
  right: 0;
  text-align: center;
  border-radius: 10px;
  box-sizing: border-box;
  background-color: #333;
  border: none;
  font-size: 15px;
  color: white;
}

button:hover {
  background-color: rgb(103, 103, 103);
}
