* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: black;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  transition: all 0.3s ease;
}

.dark {
  background-color: blueviolet;
  padding: 10px;
  border-radius: 10px;
  position: fixed;
  cursor: pointer;
  top: 20px;
  right: 20px;
  color: blueviolet;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: white;
}

.container h1 {
  margin-bottom: 30px;
}

.wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.history {
  margin-left: 80px;
}

.hide {
  display: none;
}

.show {
  display: block;
}

#history_data {
  height: 300px;
  overflow-y: scroll;
  overflow-x: visible;
}

#clear_history {
  margin-top: 20px;
  padding: 10px;
  text-align: center;
  border-radius: 10px;
  background-color: blueviolet;
  width: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#clear_history:hover {
  scale: 1.2;
  box-shadow: 0px 0px 10px 0px black;
}

#showhistory {
  margin-bottom: 30px;
  padding: 10px;
  border-radius: 10px;
  background-color: blueviolet;
  width: 200px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

#showhistory:hover {
  scale: 1.2;
  box-shadow: 0px 0px 10px 0px black;
}

.history_input {
  margin-top: 15px;
  font-size: 15px;
}

.history_solved {
  margin-top: 5px;
  font-size: 25px;
}

.calculator {
  max-width: 300px;
}

.display {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.display input {
  border: none;
  width: 100%;
  outline: none;
  background-color: black;
  color: blueviolet;
  border-bottom: 2px solid blueviolet;
  font-size: 2rem;
  padding: 15px;
  margin-bottom: 15px;
  text-align: end;
}

#backspace {
  color: white;
  font-size: 1.2rem;
  background-color: blueviolet;
  border-radius: 10px;
  cursor: pointer;
  padding: 15px;
  transition: all 0.3s ease;
  display: grid;
  align-items: center;
}

.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 5px;
  text-align: center;
}

.buttons > div {
  font-size: 1.2rem;
  background-color: blueviolet;
  border-radius: 10px;
  cursor: pointer;
  padding: 25px;
  transition: all 0.3s ease;
  display: grid;
  align-items: center;
}

.buttons > div:hover {
  scale: 1.2;
  box-shadow: 0px 0px 10px 0px black;
}

#backspace:hover {
  scale: 1.2;
  box-shadow: 0px 0px 10px 0px black;
}

.light {
  background-color: white !important;
  color: black !important;
}

/* *****scrollbar******* */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: black;
}
::-webkit-scrollbar-thumb {
  background: blueviolet;
  border-radius: 5px;
}

@media screen and (max-width: 767px) {
  body {
    overflow: hidden;
  }
  .container {
    margin-top: 40px;
    height: auto;
  }

  .wrapper {
    display: flex;
    flex-direction: column;
  }

  .history {
    margin-left: 0px;
    margin-top: 30px;
    overflow-y: scroll;
  }
}
