* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  html {
    overflow-x: hidden;
    scroll-behavior: smooth;
  }
  body {
    font-family: 'Bree Serif Lt', sans-serif;
    background-color: rgb(224, 225, 227);
  }
  /* header start*/
  header {
    width: 100vw;
    height: 80px;
    background-color: #200E3A;
  }
  header h1 {
    font-family: 'Haarlem Sans', sans-serif;
    text-align: center;
    padding: 25px;
    color: #ebe4f4;
  }
  header h1 span {
    font-size: 1.2rem;
    color: #5DA7DB;
  }
  /* header end */
  /* main page start*/
  main {
    box-sizing: border-box;
    width: 100vw;
    text-align: center;
    background-color: rgb(224, 225, 227);
  
    margin-top: 20px;
    display: block;
  }
  main .text {
    padding-top: 40px;
  }
  main .text h2 {
    margin-bottom: 20px;
    font-size: 2rem;
    text-shadow: 2px 2px 1px rgba(0, 0, 0, 0.3);
  }
  main .text p {
    line-height: 1.5;
    font-size: 1.1rem;
  }
  /* main page end*/
  /* section luas start */
  section {
    display: grid;
    align-items: center;
    justify-content: center;
    flex-direction: row;
  }
  section .luas {
    border: 3px solid #38419D;
    min-width: 35vw;
    margin-bottom: 20px;
    background-color: #ffffff;
  }
  section .luas .header-item {
    background-color: #38419D;
    height: 60px;
    padding: 1rem;
  }
  section .luas .header-item h2 {
    color: aliceblue;
    font-size: 1.7rem;
    text-align: center;
  }
  section .luas .gambar {
    width: 100%;
    flex-direction: column;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    line-height: 3;
  }
  
  section .luas .text {
    padding: 30px;
    border-bottom: 3px solid rgb(211, 209, 209);
  }
  section .luas .text p {
    line-height: 2;
  }
  section .luas .text p:nth-child(2) {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
  }
  section .luas .nilai-luas {
    display: block;
    position: relative;
  }
  section .luas .nilai-luas h3 {
    text-align: center;
    padding-top: 50px;
    font-size: 2rem;
  }
  section .luas .nilai-luas input {
    width: 80%;
    box-sizing: border-box;
    padding: 3px;
    position: relative;
    margin: 40px;
    border-radius: 5px;
    border: 2px solid gray;
  }
  
  section .luas .hasil-luas {
    display: none;
    justify-content: left;
    position: relative;
    left: 30px;
    line-height: 2;
  }
  section .luas .btn-hitung {
    position: relative;
    font-size: 1.2em;
    padding: 0.7em 1.4em;
    background-color: #52D3D8;
    text-decoration: none;
    border: none;
    border-radius: 0.5em;
    color: #fcf8f8;
    box-shadow: 0.5em 0.5em 0.5em rgba(0, 0, 0, 0.3);
  }
  section .luas .btn-hitung::before {
    position: absolute;
    content: "";
    height: 0;
    width: 0;
    top: 0;
    left: 0;
    background: linear-gradient(
      135deg,
      rgb(240, 248, 254) 0%,
      rgb(240, 248, 254) 50%,
      rgb(56, 135, 190) 50%,
      rgb(59, 112, 150) 60%
    );
    border-radius: 0 0 0.5em 0;
    box-shadow: 0.2em 0.2em 0.2em rgba(0, 0, 0, 0.3);
    transition: 0.3s;
  }
  section .luas .btn-hitung:hover::before {
    width: 1.6em;
    height: 1.6em;
  }
  section .luas .btn-hitung:active {
    box-shadow: 0.2em 0.2em 0.3em rgba(0, 0, 0, 0.3);
    transform: translate(0.1em, 0.1em);
  }
  section .luas .hitung {
    justify-content: center;
    align-items: center;
    display: flex;
    min-height: 70px;
  }
  section .luas .reset {
    justify-content: right;
    display: flex;
    min-height: 50px;
    margin-bottom: 50px;
    margin-right: 20px;
  }
  section .luas .btn-reset {
    display: inline-block;
    padding: 3px 20px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    color: #fff;
    background-color: #ff5252;
    border: 2px solid #000;
    border-radius: 10px;
    box-shadow: 5px 5px 0px #000;
    transition: all 0.3s ease;
  }
  section .luas .btn-reset:hover {
    background-color: #fff;
    color: #ff5252;
    border: 2px solid #ff5252;
    box-shadow: 5px 5px 0px #ff5252;
  }
  section .luas .btn-reset:active {
    background-color: #fcf414;
    box-shadow: none;
    transform: translateY(4px);
  }
  /* section luas end */
  /* section Keliling Start */
  
  section .keliling {
    border: 3px solid #38419D;
    min-width: 35vw;
    margin-bottom: 50px;
    background-color: #ffffff;
  }
  section .keliling .header-item {
    background-color: #38419D;
    height: 60px;
    padding: 1rem;
  }
  section .keliling .header-item h2 {
    color: aliceblue;
    font-size: 1.7rem;
    text-align: center;
  }
  section .keliling .gambar {
    width: 100%;
    flex-direction: column;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    line-height: 3;
  }
  
  section .keliling .text {
    padding: 30px;
    border-bottom: 3px solid rgb(211, 209, 209);
  }
  section .keliling .text h4 {
    margin-bottom: 20px;
  }
  section .keliling .text p {
    line-height: 2;
  }
  section .keliling .text p:nth-child(2) {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
  }
  section .keliling .nilai-keliling {
    display: block;
    position: relative;
  }
  section .keliling .nilai-keliling h3 {
    text-align: center;
    padding-top: 50px;
    font-size: 2rem;
  }
  section .keliling .nilai-keliling input {
    width: 80%;
    box-sizing: border-box;
    padding: 3px;
    position: relative;
    margin: 40px;
    border-radius: 5px;
    border: 2px solid gray;
  }
  section .keliling .nilai-keliling .btn-hitung {
    position: relative;
    font-size: 1.2em;
    padding: 0.7em 1.4em;
    background-color: #52D3D8;
    text-decoration: none;
    border: none;
    border-radius: 0.5em;
    color: #fcfafa;
    box-shadow: 0.5em 0.5em 0.5em rgba(0, 0, 0, 0.3);
  }
  section .keliling .nilai-keliling .btn-hitung::before {
    position: absolute;
    content: "";
    height: 0;
    width: 0;
    top: 0;
    left: 0;
    background: linear-gradient(
      135deg,
      rgb(240, 248, 254) 0%,
      rgb(240, 248, 254) 50%,
      rgb(56, 135, 190) 50%,
      rgb(59, 112, 150) 60%
    );
    border-radius: 0 0 0.5em 0;
    box-shadow: 0.2em 0.2em 0.2em rgba(0, 0, 0, 0.3);
    transition: 0.3s;
  }
  section .keliling .nilai-keliling .btn-hitung:hover::before {
    width: 1.6em;
    height: 1.6em;
  }
  section .keliling .nilai-keliling .btn-hitung:active {
    box-shadow: 0.2em 0.2em 0.3em rgba(0, 0, 0, 0.3);
    transform: translate(0.1em, 0.1em);
  }
  section .keliling .hasil-keliling {
    display: none;
    justify-content: left;
    position: relative;
    left: 15px;
    line-height: 2;
  }
  section .keliling .nilai-keliling .hitung {
    justify-content: center;
    align-items: center;
    display: flex;
    min-height: 70px;
  }
  #output-keliling {
    display: none;
    position: relative;
    left: 30px;
    line-height: 2;
  }
  section .keliling .nilai-keliling .reset {
    justify-content: right;
    display: flex;
    min-height: 50px;
    margin-bottom: 50px;
    margin-right: 20px;
  }
  section .keliling .nilai-keliling .btn-reset {
    display: inline-block;
    padding: 3px 20px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    color: #fff;
    background-color: #ff5252;
    border: 2px solid #000;
    border-radius: 10px;
    box-shadow: 5px 5px 0px #000;
    transition: all 0.3s ease;
  }
  section .keliling .nilai-keliling .btn-reset:hover {
    background-color: #fff;
    color: #ff5252;
    border: 2px solid #ff5252;
    box-shadow: 5px 5px 0px #ff5252;
  }
  section .keliling .nilai-keliling .btn-reset:active {
    background-color: #fcf414;
    box-shadow: none;
    transform: translateY(4px);
  }
  footer {
    width: 100vw;
    height: 50px;
    background-color: #200E3A;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  footer h6 {
    color: #dedede;
    font-size: 1rem;
  }
  /* section Keliling End */
  /*media Queries*/
  
  /*laptop*/
  
  /*Tablet*/
  @media (max-width: 768px) {
    html {
      font-size: 62.5%;
    }
    header h1 {
      font-size: 4rem;
    }
    header h1 span {
      font-size: 2rem;
    }
    main .text h2 {
      font-size: 3.7rem;
    }
    main .text p {
      font-size: 2rem;
    }
    main .button-click button {
      margin-top: 1rem;
      width: 70vw;
    }
    section .luas .text h4,
    section .keliling .text h4 {
      font-size: 2rem;
    }
    section .luas .text p,
    section .keliling .text p {
      font-size: 1.8rem;
    }
    section .luas .text p:nth-child(3),
    section .keliling .text p:nth-child(3) {
      font-size: 1.8rem;
    }
    section .luas .nilai-luas h3,
    section .keliling .nilai-keliling h3 {
      font-size: 3rem;
    }
    section .keliling,
    section .luas,
    section .keliling .header-keliling h2,
    section .luas .header-luas h2 {
      font-size: 3.5rem;
      padding-top: 0.9rem;
    }
    section .keliling .nilai-keliling input,
    section .luas .nilai-luas input {
      width: 55%;
      padding: 6px;
    }
    #output-keliling,
    section .luas .hasil-luas {
      font-size: 2rem;
    }
    section .keliling .nilai-keliling .btn-hitung,
    section .luas .btn-hitung {
      width: 30%;
      height: 40px;
      font-size: 2rem;
      padding: 5px 10px;
    }
    section .keliling .nilai-keliling .btn-reset,
    section .luas .btn-reset {
      font-size: 1.8rem;
      padding: 1rem 2rem;
    }
    footer h6 {
      font-size: 1.6rem;
    }
  }
  
  /*Mobile Phone*/
  @media (max-width: 450px) {
    html {
      font-size: 55%;
    }
  }