*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: "Roboto", Arial, sans-serif;
  margin: 0;
  background: #f5f7fa;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.container {
  background: #fff;
  margin: 2em 0;
  padding: 2em 1.5em;
  border-radius: 16px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.08),
    0 1.5px 4px rgba(0, 0, 0, 0.03);
  max-width: 400px;
  width: 100%;
}
h1 {
  text-align: center;
  font-size: 1.5em;
  margin-bottom: 1.5em;
  color: #1976d2;
  font-weight: 700;
}
form {
  width: 100%;
}
label {
  font-size: 1em;
  margin-bottom: 0.3em;
  color: #333;
  font-weight: 500;
}
input[type="number"] {
  width: 100%;
  padding: 0.7em;
  font-size: 1.1em;
  border: 1px solid #bdbdbd;
  border-radius: 8px;
  margin-bottom: 1.5em;
  background: #f9f9f9;
  transition: border-color 0.2s;
}
input[type="number"]:focus {
  border-color: #1976d2;
  outline: none;
  background: #fff;
}
.button-group {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  margin-bottom: 1em;
}
button {
  padding: 0.9em 1em;
  font-size: 1.1em;
  border: none;
  border-radius: 8px;
  background: #1976d2;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(25, 118, 210, 0.07);
  cursor: pointer;
  transition: background 0.2s;
}
button:hover,
button:focus {
  background: #1565c0;
}
#result {
  margin-top: 1em;
  text-align: center;
  font-weight: 500;
  font-size: 1.1em;
  min-height: 1.5em;
  color: #1976d2;
}
@media (max-width: 500px) {
  .container {
    padding: 1.2em 0.5em;
    margin: 1em 0;
    border-radius: 10px;
  }
  h1 {
    font-size: 1.1em;
  }
  button {
    font-size: 1em;
    padding: 0.7em 0.5em;
  }
}
