* {
  box-sizing: border-box;
}

body {
  margin: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #fafafa;
  color: #212121;
  line-height: 1.5;
}

/*task 1*/

#categories {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  list-style-type: none;
  max-width: 440px;
}

#categories h2 {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.33333;
  letter-spacing: 0.04em;
  color: #2e2f42;
  padding: 16px 0 16px 16px;
  margin: 0;
}

#categories > li > ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style-type: none;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
  padding: 0px 16px 16px 16px;
}

#categories > li > ul > li {
  padding: 8px 0px 8px 16px;
  border: 1px solid #808080;
  border-radius: 4px;
  max-width: 360px;
}

/*task 2*/
.gallery {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  row-gap: 48px;
  column-gap: 24px;
}

.gallery > li {
  width: calc((100% - 48px) / 3);
}

.gallery > li > img {
  width: 360px;
  height: 300px;
  object-fit: cover;
}

/*task 3*/
#name-input {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
  min-width: 360px;
  border: 1px solid #808080;
  border-radius: 4px;
  padding: 8px 0px 8px 16px;
}

h1 {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.33333;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

/*task 4*/
.login-form {
  width: 408px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 8px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

input {
  width: 360px;
  height: 40px;
  padding: 8px 0px 8px 16px;
  border-color: transparent;
  border: 1px solid #808080;
  border-radius: 4px;
  outline: none;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

input:hover {
  border: 1px solid #000;
  border-radius: 4px;
}

form > button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 10px;
  border-radius: 8px;
  padding: 8px 16px;
  width: 86px;
  height: 40px;
  background: #4e75ff;
  border-color: transparent;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  margin-top: 8px;
}

form > button:hover {
  background: #6c8cff;
}

/*task 5*/
.change-color {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 10px;
    border-radius: 8px;
    padding: 8px 16px;
    width: 148px;
    height: 40px;
    background: #4e75ff;
    border-color: transparent;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #fff;
    padding-left: 10.5px;
}

.change-color:hover {
  background: #6c8cff;
}

.widget > p {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}