@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: #eef5ff;
  display: flex;
  flex-direction: column;
  gap: 42px;
  padding: 0 16px;
  max-width: 620px;
  margin: 0 auto;
}

header {
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.title {
  color: black;
  font-weight: 700;
  font-size: 32px;
  text-align: center;
}

.description {
  color: black;
  font-weight: 500;
  text-align: center;
  font-size: 18px;
}

header > ul {
  gap: 24px 0;
  margin-top: 34px;
  width: 100%;
}

header > ul > li {
  color: black;
  background-color: #9eb8d9;
  padding: 16px;
  margin-top: 12px;
  font-weight: 600;
  transition: 0.1s ease-in-out;
}

header > ul > li:hover {
  color: black;
  background-color: #eef5ff;
}

li {
  list-style: none;
}

a {
  color: black;
  text-decoration: none;
}

section {
  background-color: #9eb8d9;
  border: 1px solid #9eb8d9;
}

.title-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
}

.gambar-wrapper {
  display: flex;
  justify-content: center;
}

.gambar-rumus {
  width: 307px;
  height: auto;
}

.content-section {
  background-color: #eef5ff;
  padding: 16px;
}

.rumus-keliling-container,
.rumus-luas-container {
  margin-top: 12px;
}

.rumus-variable-keliling,
.rumus-variable-luas {
  margin-top: 12px;
}

.rumus-variable-keliling,
.rumus-variable-keliling > ul {
  margin-top: 12px;
}

form {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  gap: 14px;
}

form > h3 {
  text-align: center;
  margin-bottom: 32px;
}

form > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

form > div > label {
  flex-basis: 20%;
  font-size: 16px;
  font-weight: 600;
}

form > div > input {
  flex-basis: 75%;
  padding: 6px;
  border: none;
  border-radius: 6px;
  outline: 1px solid;
  outline-color: #7c93c3;
  width: 100%;
}

form > div > input:focus {
  outline: 1px solid;
  outline-color: #a25772;
}

.button-wrapper {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
}

.validation-error {
  display: none;
  background-color: salmon;
  color: black;
  font-weight: 600;
  font-size: 16px;
  padding: 6px;
  border: 1px solid black;
}

.hitung-button,
.hitung-luas-button {
  background-color: #9eb8d9;
  padding: 4px 16px;
  border: #7c93c3;
  border-radius: 4px;
}

.reset-button,
.reset-luas-button {
  background-color: #a25772;
  padding: 4px 16px;
  border: #9eb8d9;
  border-radius: 4px;
  color: white;
}

#hasil-keliling {
  display: none;
  margin-top: 28px;
}

#hasil-keliling > ul {
  margin-top: 12px;
}

main {
  display: flex;
  flex-direction: column;
  gap: 42px 0;
  padding: 40px 0;
}

.rumus {
  text-align: center;
  margin-top: 12px;
  font-size: 24px;
  font-weight: 600;
}

#hasil-luas {
  display: none;
}

#hasil-luas > ul {
  margin-top: 12px;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  background-color: #9eb8d9;
  padding: 16px;
}

footer > * {
  font-size: 16px;
  font-weight: 600;
}

footer > p > a {
  text-decoration: underline;
}
