* {
  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;
}

h1, h2, p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
/*#region task-1*/
#categories {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 24px auto;
  max-width: 392px;
}

#categories .item {
  padding: 16px;
  border-radius: 8px;
  background-color: #f6f6fe;
}

#categories .item h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: 0.04em;
  color: #2E2F42;
}

#categories .item ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#categories .item ul li {
  border: 1px solid #808080;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2E2F42;
}
/*#endegion task-1*/

/*#region task-2*/
.gallery {
/* flex-direction: row; */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 24px;
  column-gap: 48px;
  margin: 100px auto;
  max-width: 1440px;
}

.gallery .item {
  width: 360px;
  height: 300px;
}

.gallery .item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/*#endegion task-2*/

/*#region task-3*/
#name-input {
  display: block;
  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px;

  /* padding: 8px 16px; */
  margin-top: 24px;
  margin-bottom: 16px;

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

#name-output  {
 
  line-height: 2;
  letter-spacing: 0.04em;
  color: #2e2f42;
  margin: 10px auto 16px;
}
/*#endregion task-3*/

/*#region task-4*/
.login-form {
  display: flex;
  flex-direction: column;
  /* gap: 12px; */
  max-width: 408px;
  margin: 24px;
}

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

.login-form label :first-child {
  margin-bottom: 8px;
}

.login-form label :last-child {
  margin-bottom: 16px;
}
.login-form input {
  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px;

  transition: border-color 250ms ease-in-out;
}

.login-form input :hover {
  border: 1px solid #000;
}

.login-form button {
  padding: 10px;
  cursor: pointer;

  border: none;
  background: #4e75ff;
  border-radius: 8px;
  padding: 8px 16px;
  width: 86px;
  height: 40px;

  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;

  transition: background 250ms ease-in-out;
}

.login-form button:hover {
  background: #6c8cff;
}
/*#endregion task-4*/

/*#region task-5*/
.widget {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 360px;
  padding: 100px 88px;
}
.change-color {
  border-radius: 8px;
  border: none;
  padding: 8px 16px;
  width: 148px;
  height: 40px;

  background: #4e75ff;

  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;

  transition: background 250ms ease-in-out;
}

.change-color:hover {
  background: #6c8cff;
}
/*endregion task-5*/