* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif;
}

body {
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
}

.calculator {
  width: 100%;
  max-width: 375px;
  background-color: #000;
  border-radius: 10px;
  overflow: hidden;
}

.display {
  height: 120px;
  padding: 20px;
  text-align: right;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

#result {
  color: white;
  font-size: 64px;
  font-weight: 300;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 12px;
  padding: 20px;
}

button {
  border: none;
  border-radius: 50%;
  height: 75px;
  font-size: 30px;
  cursor: pointer;
  outline: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.number-btn {
  background-color: #333333;
}

.function-btn {
  background-color: #a5a5a5;
  color: black;
}

.operation-btn {
  background-color: #ff9f0a;
}

.zero-btn {
  grid-column: span 2;
  border-radius: 40px;
  justify-content: flex-start;
  padding-left: 30px;
}

button:active {
  opacity: 0.7;
}

@media (max-height: 700px) {
  .calculator {
    max-width: 320px;
  }

  .display {
    height: 100px;
  }

  #result {
    font-size: 54px;
  }

  button {
    height: 65px;
  }
}

.install-container {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 100;
  display: none;
}

.install-button {
  background-color: #ff9f0a;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  height: auto;
}

.install-button:hover {
  background-color: #e08c00;
}

@media (display-mode: standalone) {
  .install-container {
    display: none !important;
  }
}
