/* FONT API */
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,500;0,700;0,900;1,100;1,300&display=swap");

*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}
:root {
  --white: #fff;
  --calcbg: #000;
}

html {
  box-sizing: border-box;
}
body {
  font-family: "Roboto", sans-serif;
}
main {
  /* background-color: var(--calcbg); */
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
section {
  background-color: var(--calcbg);
  border-radius: 30px;
  /* padding: 0.5rem; */
  width: max-content;
  /* margin: auto; */
}

.display {
  background-color: var(--calcbg);
  color: white;
  width: 400px;
  text-align: right;
  padding: 2rem 2.5rem 0.3rem 1.5rem;
  outline: none;
  border-radius: 30px;
  border: none;
  font-size: 60px;
  overflow: hidden;
}
.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-content: center;
  color: white;
  padding: 0 1rem 1.5rem 1rem;
  gap: 8px;
}
button {
  background-color: #505050;
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 100%;
  padding: 1.6rem;
  font-size: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
}
button:active {
  background-color: #e1e1e1a9;
}
.zero-btn {
  width: 100%;
  grid-column: 1 / span 2;
  border-radius: 100px;
  justify-content: start;
}

.operator {
  background-color: #ffa62a;
}
.operator:active {
  background-color: #fff;
  color: #ffa62a;
}

.first-3 {
  background-color: #d4d4d2 !important;
  color: var(--calcbg);
}
.first-3:active {
  background-color: #ffffff !important;
}

@media only screen and (max-width: 768px) {
  body {
    background-color: var(--calcbg);
  }
  main {
    background-color: var(--calcbg);
  }
  section {
    border-radius: 0;
  }
}
@media only screen and (max-width: 395px) {
  section {
    width: 100%;
  }
  .display {
    width: 100%;
  }
  .buttons {
    padding: 0;
    width: 100%;
  }
  button {
    padding: 1.6rem 1.2rem;
  }
}
