body {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100vh;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

#header {
  width: 100%;
  height: 4rem;
  padding: 0;
  margin: 0;
  background-color: #4e5ba6;
  color: #ffffff;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
}

#header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  margin-left: 8.125rem;
}

main {
  display: flex;
  flex-direction: column;
  border: 0.063rem solid rgba(0, 0, 0, 0.12);
  width: 25.875rem;
  height: 36rem;
  padding: 1rem;
}

#main-header-div {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;

  h1 {
    font-weight: 800;
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 1);
  }
}

#purchaseForm {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 4em;
  margin-top: 1rem;
  gap: 0.25rem;

  #purchase-label {
    width: 19.375em;
    height: 1.5em;
    font-weight: 400;
    font-size: 0.938rem;
    line-height: 1.5rem;
    color: rgba(0, 0, 0, 1);
    letter-spacing: 0.031rem;
  }

  #purchase-input-div {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 2.25em;
    justify-content: space-between;

    #purchaseInput {
      width: 20rem;
      border: 0.063rem solid rgba(180, 180, 180, 1);
      border-radius: 0.25rem;
      padding: 0.5rem 0.5rem 0 0.5rem;

      ::placeholder {
        width: 18.375em;
        height: 1.5em;
        font-weight: 400;
        font-size: 0.938rem;
        line-height: 1.5rem;
        letter-spacing: 0.031rem;
        vertical-align: bottom;
        color: rgba(139, 139, 139, 1);
      }
    }
  }

  #purchaseButton {
    width: 3.5rem;
    padding: 0.375rem 0.375rem 0.375rem 0.5rem;
    background-color: rgba(78, 91, 166, 1);
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;

    font-weight: 700;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 1);
    letter-spacing: 0.078rem;
    line-height: 1rem;
  }

  #purchaseButton:hover {
    background-color: rgb(56, 67, 132);
  }
}

#myLotto {
  display: none;
  height: 17.25rem;

  #myLottoP {
    height: 1.5rem;
    font-weight: 400;
    font-size: 0.938rem;
    line-height: 1.5rem;
    letter-spacing: 0.031rem;
    color: rgba(0, 0, 0, 1);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
  }

  #myLottoLists {
    height: 16rem;
    list-style: none;
    padding-left: 0;
    margin: 0;
    gap: 0.25rem;
    overflow-y: auto;

    font-weight: 400;
    font-size: 0.938rem;
    line-height: 1.5rem;
    letter-spacing: 0.031rem;
    color: rgba(0, 0, 0, 1);
  }
}

#winningDiv {
  display: none;
  flex-direction: column;
  margin-top: 2rem;
}

#winning-p {
  height: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
  font-size: 0.938rem;
  line-height: 1.5rem;
  letter-spacing: 0.031rem;
  color: rgba(0, 0, 0, 1);
}

#winning-bonus {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

#winning-label {
  height: 1.5rem;
  font-weight: 400;
  font-size: 0.938rem;
  line-height: 1.5rem;
  letter-spacing: 0.031rem;
  color: rgba(0, 0, 0, 1);
  margin: 0.2rem 0;
}

#winning-input-lists {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  border: none;
  padding: 0;
  margin: 0;
}

.winningInput {
  width: 2rem;
  height: 1.5rem;
  margin: 0.2rem 0;
}

#bonus-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
  border: none;
  padding: 0;
  margin: 0;
}

#bonus-legend {
  height: 1.5rem;
  font-weight: 400;
  font-size: 0.938rem;
  line-height: 1.5rem;
  letter-spacing: 0.031rem;
  color: rgba(0, 0, 0, 1);
  margin: 0.2rem 0;
}

#bonusInput {
  width: 2rem;
  height: 1.5rem;
  margin: 0.2rem 0;
}

#getResultButton {
  display: none;
  height: 2.25rem;
  margin-top: 1rem;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
  background-color: rgba(78, 91, 166, 1);
  border: none;
  border-radius: 4px;
  cursor: pointer;

  font-weight: 700;
  font-size: 14px;
  line-height: 16px;
  letter-spacing: 1.25px;
  color: rgba(255, 255, 255, 1);
}

#getResultButton:hover {
  background-color: rgb(56, 67, 132);
}

footer {
  position: fixed;
  height: 4rem;
  bottom: 0;
  width: 100%;
  border-top: 1px solid rgba(78, 91, 166, 0.2);

  display: flex;
  justify-content: center;
  align-items: center;
}

#lotto-caption {
  color: rgba(78, 91, 166, 1);
  font-weight: 700;
  font-size: 14px;
  padding-bottom: 0.5em;
}

#resultModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.5);
}

#resultModal.active {
  align-items: center;
  justify-content: center;
}

#result-modal-main {
  width: 21.875rem;
  height: 31.25rem;
  border: none;
  border-radius: 0.25rem;
  background-color: rgba(255, 255, 255, 1);
  padding: 16px;

  display: flex;
  align-items: center;
  flex-direction: column;
  position: relative;
}

#result-modal-close {
  width: 0.875rem;
  height: 0.875rem;
  align-self: flex-end;
  color: rgba(0, 0, 0, 1);
  cursor: pointer;
}

#result-modal-h1 {
  height: 1.5rem;
  margin-top: 1.25rem;

  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.5rem;
  letter-spacing: 0.15px;
  color: rgba(0, 0, 0, 1);
}

#result-modal-table {
  width: 19.938rem;
  height: 15.438rem;
  margin-top: 2.063rem;
  border-collapse: collapse;
  
  th {
    font-weight: 600;
    font-size: 0.938rem;
    line-height: 1.5rem;
    letter-spacing: 0.5px;
    color: rgba(0, 0, 0, 1);
  }

  td {
    font-weight: 400;
    font-size: 0.938rem;
    line-height: 1.5rem;
    letter-spacing: 0.5px;
    color: rgba(0, 0, 0, 1);
  }

  th, td {
    border: none;
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    padding: 0.5rem;
    vertical-align: middle;
    text-align: center;
  }
}

#profitP {
  font-weight: 700;
  font-size: 0.938rem;
  line-height: 1.5rem;
  letter-spacing: 0.5px;
  color: rgba(0, 0, 0, 1);
  margin-top: 2rem;
}

#retryButton {
  width: 100%;
  height: 2.25rem;
  padding: 0.375rem 0.375rem 0.375rem 0.5rem;
  margin-top: 2rem;
  cursor: pointer;

  border: none;
  border-radius: 0.25rem;
  background-color: rgba(78, 91, 166, 1);
  color: rgba(255, 255, 255, 1);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1rem;
  letter-spacing: 1.25px;
  text-transform: uppercase;
}

#retryButton:hover {
  background-color: rgb(56, 67, 132);
}
