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

/* #region Task 1 css */

#categories {
  display: flex;
  flex-direction: column;
  list-style-type: none;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.04em;
  color: #2e2f42;
  padding: 24px;
  border-radius: 8px;

  width: 440px;
  height: 888px;
  background: #fff;
  gap: 24px;
}

#categories li {
  color: #2e2f42;
  border-radius: 8px;
  padding: 16px;
  width: 392px;

  background: #f6f6fe;
}
#categories li:not(:last-child) {
  margin-bottom: 8px;
}

#categories ul {
  width: 360px;
  padding: 0;
  list-style-type: none;
  gap: 8px;
}

#categories h2 {
  margin: 0 0 16px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 133%;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

#categories ul li {
  padding: 8px 16px;
  width: 100%;
  height: 40px;
  border: 1px solid #808080;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

/* #endregion */

/* #region Task 2 css */
.gallery {
  margin: 0 auto;
  padding: 100px 0;
  width: 1128px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 24px;
}

.gallery li {
  list-style-type: none;
}

.gallery li img {
  max-width: 360px;
  height: 300px;
}

/* #endregion */

/* #region Task 3 css */
#name-input {
  width: 360px;
  height: 40px;
  padding: 8px 16px;
  border: 1px solid #808080;
  border-radius: 4px;
  margin-bottom: 16px;
}

#name-input::placeholder {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

h1 {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 133%;
  letter-spacing: 0.04em;
  color: #2e2f42;
}
/* #endregion */

/* #region Task 4 css */

.login-form {
  margin: 24px auto;
  display: flex;
  flex-direction: column;
  width: 360px;
  height: 152px;
}

.login-form label {
  display: flex;
  flex-direction: column;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  color: #2e2f42;
  margin-bottom: 8px;
}

.login-form input {
  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px;
  padding: 0 16px;
}

.login-form input:active {
  border: 1px solid #000;
  border-radius: 4px;
  width: 360px;
  height: 40px;
}

button {
  border: 0;
  margin-top: 16px;
  border-radius: 8px;
  padding: 8px 16px;
  width: 86px;
  height: 40px;
  background: #4e75ff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  color: #fff;
}

button:hover {
  background: #6c8cff;
  cursor: pointer;
}

/* #endregion */

/* #region Task 5 css */

.change-color {
  margin: 0;
  border-radius: 8px;
  padding: 8px 16px;
  width: 148px;
  height: 40px;
}

.widget {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.widget p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  color: #2e2f42;
}
/* #endregion */
