* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Sans-serif", sans-serif;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

input {
  font-family: "Montserrat", sans-serif;
  text-align: right;
}
body {
  background: #f4f6f8;
  min-height: 100vh;
}

nav {
  background: #2467d2;
  padding: 1rem 2rem;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

nav h1 {
  font-family: "PT Serif", serif;
  font-size: 1.8rem;
  color: #fff;
  font-weight: 700;
}
.subheading {
  text-align: center;
  margin-top: 30px;
}
#form {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  max-width: 90%;
  width: 1000px;
  min-width: 800px;
  margin: auto;
  margin-top: 20px;
  margin-bottom: 15px;
  padding: 15px;
  background-color: #b6d2ff86;
  position: relative;
}
#form h1 {
  font-size: 1.7rem;
  margin-bottom: 1rem;
  color: #0341a5;
  font-weight: 700;
}
#form .hr {
  padding-bottom: 10px;
  border-bottom: 1px solid #000000;
}
.deduction {
  margin-left: 1rem;
}

.input-group {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

label {
  flex: 1;
  margin-right: 0.7rem;
  font-size: 14px;
}
input,
select {
  display: inline-block;
  outline: none;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  background-color: #fff;
  color: #333;
  transition: all 0.2s ease;
}

select option {
  padding: 10px;
  border: none;
  outline: none;
}

select {
  appearance: none;
  cursor: pointer;
}
form button {
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.button-group {
  display: flex;
  justify-content: space-between;
  max-width: 90%;
  width: 1000px;
  min-width: 800px;
  margin: auto;

  margin-bottom: 40px;
}

.button-group button {
  border: none;
  margin-bottom: 10px;
  padding-left: 15px;
  padding-right: 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  transition: background 0.2s ease;
}

.button-group .reset button {
  background: #f44336;
}

.button-group .calculate button {
  background: #4caf50;
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

.popup {
  position: relative;
  background: #dbe9ff;
  padding: 25px;
  border-radius: 12px;
  width: 360px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
body.pop .overlay {
  display: block;
  display: flex;
}

.popup h2 {
  margin-bottom: 20px;
  font-size: 20px;
  text-align: center;
  color: #0341a5;
}

.close-btn {
  display: block;
  position: absolute;
  top: 0px;
  right: 20px;
  margin: 15px auto 0;
  padding: 10px;
  background: #d82525;
  color: #fff;
  font-size: 16px;
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
}

footer {
  margin-top: auto;
  background: #0341a5;
  text-align: center;
  padding: 1rem 0;
  font-size: 1rem;
  color: #fff;
  width: 100%;
  small {
    font-size: 12px;
  }
}
.desc {
  max-width: 90%;
  width: 1000px;
  min-width: 800px;
  margin: auto;
  margin-bottom: 70px;
}
@media (max-width: 842px) {
  #form {
    flex-direction: column;
    justify-content: left;
    margin-left: 0;
    max-width: 90%;
    min-width: 400px;
    margin: auto;
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 20px;

    background-color: #b6d2ff86;
  }
  .button-group {
    max-width: 90%;
    min-width: 400px;
    margin: auto;
    flex-direction: column;
  }

  nav h1 {
    font-size: 1.5rem;
  }
}
