* {
  box-sizing: border-box;
}
@font-face {
  /* http://www.dafont.com/ds-digital.font */
  font-family: 'DS-Digital';
  src: url(DS-DIGII.TTF);
}
body {
  background: black;
  margin: 0;
  padding: 0;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  width: 100vw;
  height: 100vh;
  font-family: sans-serif;
}
.calc-container {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  padding: 10px;
  border-radius: 17px;
  background: #434343;
  width: 60%;
  max-width: 1000px;
  height: 80%;
  opacity: 0.93;
}
.calc-container .readout {
  position: relative;
  width: 100%;
  height: 15vmin;
  background: darkkhaki;
  border-radius: 10px;
  font-family: 'DS-Digital', monospace, sans-serif;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-justify-content: flex-end;
      -ms-flex-pack: end;
          justify-content: flex-end;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 0 10px;
  font-size: 8vmin;
  font-weight: bold;
  overflow: hidden;
}
.calc-container .plain-readout {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-justify-content: flex-end;
      -ms-flex-pack: end;
          justify-content: flex-end;
  font-size: 3vmin;
  font-weight: 100;
  height: 8vmin;
  border-radius: 10px;
  margin-top: 10px;
  padding-right: 10px;
  background: #7e7a47;
}
.calc-container .buttons {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-basis: 100%;
      -ms-flex-preferred-size: 100%;
          flex-basis: 100%;
  font-size: 5vmin;
  padding: 5px;
  margin-top: 10px;
  border: 1px solid gray;
  border-radius: 10px;
}
.calc-container .buttons .button {
  cursor: pointer;
  border: 1px solid transparent;
}
.calc-container .buttons .button:hover {
  background: white!important;
}
.calc-container .buttons .button.active {
  background: black!important;
  color: white;
}
.calc-container .buttons .number-pad {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-flex-basis: 75%;
      -ms-flex-preferred-size: 75%;
          flex-basis: 75%;
}
.calc-container .buttons .number-pad .row {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-grow: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
}
.calc-container .buttons .number-pad .row .pad {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-basis: 33.33333%;
      -ms-flex-preferred-size: 33.33333%;
          flex-basis: 33.33333%;
  padding: 5px;
}
.calc-container .buttons .number-pad .row .pad#zero {
  -webkit-flex-basis: 66.66667%;
      -ms-flex-preferred-size: 66.66667%;
          flex-basis: 66.66667%;
}
.calc-container .buttons .number-pad .row .pad .button {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-grow: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  border-radius: 5px;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  background: #8fe18f;
}
.calc-container .buttons .number-pad .row .pad .button#colon {
  background: aquamarine;
}
.calc-container .buttons .operators {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-flex-basis: 25%;
      -ms-flex-preferred-size: 25%;
          flex-basis: 25%;
}
.calc-container .buttons .operators .operator {
  -webkit-flex-grow: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  cursor: pointer;
  border-radius: 5px;
  margin: 5px;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}
.calc-container .buttons .operators .operator#clear,
.calc-container .buttons .operators .operator#delete {
  background: rgba(0, 255, 255, 0.85);
}
.calc-container .buttons .operators .operator#add,
.calc-container .buttons .operators .operator#subtract {
  background: yellow;
}
.calc-container .buttons .operators .operator#equals {
  background: tomato;
}
.bg-overlay {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}
.bg-overlay::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  /* http://compresspng.com/ 
  background: url('grunge.png') no-repeat center center fixed;
  background-size: cover;*/
}
.randoms {
  overflow: hidden;
  font-family: monospace;
  font-weight: bold;
}
.randoms .random {
  position: absolute;
  text-shadow: 0 0 25px white;
}
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .calc-container {
    width: 80%;
    height: 80%;
  }
  .calc-container .readout {
    height: 15vh;
    font-size: 10vh;
  }
  .calc-container .readout::before {
    padding-top: 0.4vh;
  }
  .calc-container .plain-readout {
    height: 10vh;
    font-size: 4vh;
  }
  .calc-container .buttons {
    padding: 3px;
  }
  .calc-container .buttons .button {
    font-size: 5vh;
  }
}
@media screen and (max-width: 767px) {
  .calc-container {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
  .calc-container .readout {
    height: 15vh;
    font-size: 10vh;
  }
  .calc-container .readout::before {
    padding-top: 0.8vh;
  }
  .calc-container .plain-readout {
    height: 10vh;
    font-size: 4vh;
  }
  .calc-container .buttons {
    padding: 3px;
  }
  .calc-container .buttons .button {
    font-size: 6vh;
    margin: 3px;
  }
}
