body {
  width: 100%;
  height: 100%;
  position: absolute;
  margin: 0;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.calculator {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: linear-gradient(-45deg, #ee896a, #cc5381, #3a9ec2, #3ddfb9);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
  height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

header {
  position: absolute;
  left: 2%;
  top: 3%;
  font-size: 20px;
}
.by_jk {
  font-size: 0.3em;
}

/* /////////////////////////////////////////////// */

.settings {
  position: absolute;
  right: 50px;
  top: 50px;
  cursor: pointer;
  display: flex;
  flex-direction: row-reverse;
}

.settings img::after {
  /* float: left; */
  /* right: 10%; */
  /* content: "+"; */
}

.settings img {
  height: 40px;
  width: 40px;
  transition: 0.4s;
}

.settings img:active {
  transform: rotate(180deg) scale(1.2);
  filter: brightness(0) invert(1);
}

/* .settings img:hover {
  transform: rotate(90deg) scale(1.2);
  filter: brightness(0) invert(1);
} */

li a {
  text-decoration: none;
  color: #2d2f31;
}

.slide {
  /* clear: both; */
  width: 100%;
  height: 0px;
  padding: 0px 0 0 0;
  margin: 20px -20px 0 0;
  z-index: 2;
  overflow: hidden;
  text-align: center;
  transition: height 0.6s cubic-bezier(0, 1.01, 1, -0.54);
}

.slide li {
  padding: 20px;
  list-style-type: none;
  background-color: gray;
  margin: 10px;
  border-radius: 5px;
  transition: 0.3s;
}

.slide li:hover {
  transform: scale(1.05);
}

.slide a:hover {
  color: white;
}

#touch {
  position: absolute;
  opacity: 0;
  height: 0px;
}

#touch:checked + .slide {
  height: 300px;
}

/* /////////////////////////////////////////////////////////// */

.first_step {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
}

.clalc_inside {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#resultAfterCount {
  display: none;
  color: rgb(55, 55, 55);
}

.text_outputs {
  width: 78%;
  height: 95px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  /* border: 2px solid peru; */
  /* border: 3px solid rgb(0, 0, 0); */
  padding: 0 20px;
}

.results {
  width: 100%;
  height: auto;
  text-align: right;
  background-color: transparent;
  /* border: 3px solid rgb(0, 0, 0); */
  font-size: 40px;
  padding: 0 5px;
  border: 0;
}

input.results {
  /* to jest do zrobienia */
  text-overflow: ellipsis;
  /* direction: rtl; */
  white-space: nowrap;
  overflow: hidden;
}

input.results:focus {
  outline: none;
}

main {
  color: black;
}

.button {
  font-size: 25px;
  width: 50px;
  height: 40px;
  margin: 15px 70px;
  border: 0;
  opacity: 0.8;
  transition: 0.15s;
  background-color: transparent;
}

.button:hover {
  transform: scale(1.3);
  opacity: 1;
}

.button:active {
  transform: scale(1.8);
  color: white;
}

/* .button_adons {
  border-left: 1px solid rgb(0, 0, 0);
  border-bottom: 1px solid rgb(0, 0, 0);
}

.button_withoutLeft {
  border-bottom: 1px solid rgb(0, 0, 0);
}

.button_withoutDown {
  border-left: 1px solid rgb(0, 0, 0);
} */

.history {
  display: none;
  width: 220px;
  height: 65%;
}
.history_inside {
  width: 100%;
  height: 90%;
  text-overflow: ellipsis;
  overflow: auto;
}

.score {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  cursor: pointer;
  width: 75%;
  height: 90%;
  max-height: 70px;
  padding: 2% 8% 0 4%;
  margin: 2% 0 2% 5%;
  border-radius: 4px;
  background-color: rgb(201, 201, 201);
  opacity: 0.8;
  transition: 0.3s;
}

.score:hover {
  transform: scale(1.05);
}

.first_new_inp {
  font-size: 15px;
}

.second_new_inp {
  font-size: 22px;
}

.history_inputs {
  width: 100%;
  height: 50%;
  text-align: right;
  text-overflow: ellipsis;
  overflow: hidden;
  background-color: transparent;
}

.history_inside::-webkit-scrollbar {
  width: 1em;
}

.history_inside::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

.history_inside::-webkit-scrollbar-thumb {
  background-color: darkgrey;
  outline: 1px solid slategrey;
}

@media screen and (max-width: 1000px) {
  .text_outputs {
    width: auto;
    height: 60px;
  }
  #result {
    font-size: 25px;
  }
  .button {
    font-size: 30px;
    width: 100px;
    height: 60px;
    margin: 5px 10px;
  }
  .history {
    width: 150px;
  }
}

@media screen and (max-width: 800px) {
  .text_outputs {
    width: auto;
    height: 60px;
  }
  #result {
    font-size: 25px;
  }
  .button {
    width: 100px;
    height: 60px;
    margin: 5px 10px;
  }
}

@media screen and (max-width: 650px) {
  header {
    font-size: 14px;
  }
  .text_outputs {
    width: 65%;
  }
  #result {
    font-size: 20px;
  }
  .clalc_inside {
    width: 90%;
    height: 60%;
  }
  main {
    width: 100%;
    /* height: 100%; */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }
  .button {
    width: 20%;
    height: 90%;
    margin: 1% 0;
  }
  .rower {
    width: 100%;
    display: inline;
    text-align: center;
  }
  .first_step {
    flex-direction: column;
  }
  .history {
    width: 90%;
    height: auto;
  }
  .history_inside {
    display: flex;
    flex-direction: row;
    overflow: auto;
    height: 60%;
  }

  .first_new_inp {
    font-size: 12px;
  }

  .second_new_inp {
    font-size: 15px;
  }

  .score {
    width: 80px;
    height: auto;
    margin: 2px;
    padding: 0 5px 0 0;
  }
  .history_inputs {
    width: 95%;
    height: 45%;
  }
}

@media (max-width: 270px) and (max-height: 475px) {
  header {
    font-size: 12px;
  }
  .clalc_inside {
    margin-top: 50px;
  }
  .button {
    font-size: 20px;
  }
  .history {
    width: 90%;
    height: auto;
  }
  .history h3 {
    margin: 10px 0 0 0;
    /* padding: 20px 0 0 0; */
    font-size: 10px;
  }
  .history_inside {
    padding: 0;
    margin: 0;
    height: 90%;
  }
  .score {
    width: 80px;
    height: 90%;
    /* margin: 2px;
    padding: 0 1px 0 0; */
  }
  .history_inputs {
    width: 95%;
  }

  .first_new_inp {
    font-size: 6px;
  }

  .second_new_inp {
    font-size: 9px;
  }
}
