* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

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

li {
  list-style-type: none;
}

a {
  display: inline-block;
  text-decoration: none;

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

  border-radius: 8px;
  padding: 8px 16px;
  min-width: 100px;
  text-align: center;
  background-color: #4e75ff;

  transition: 0.25s background-color ease-in-out;
  margin-bottom: 16px;
}

a:hover {
  background-color: #6c8cff;
}

/* #region Styles for task-1 */
.task-one h2 {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.33;
  letter-spacing: 0.04em;
  color: #2e2f42;

  margin-bottom: 16px;
}

.task-one #categories {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

  margin-bottom: 24px;
}

.task-one #categories .item ul > li {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;

  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px;

  padding: 8px 16px;

  margin-bottom: 8px;
}

.task-one #categories .item ul > li:last-child {
  margin-bottom: 0;
}
/* #endregion */

/* #region Styles for task-2 */
.task-two .gallery {
  margin: 0 auto;
}

.gallery {
  width: 1128px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px 24px;
}

.gallery img {
  width: 360px;
  height: 300px;
  object-fit: cover;
}
/* #endregion */

/* #region Styles for task-3 */
.task-three #name-input {
  padding: 8px 16px;
  width: 360px;

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

  border: 1px solid #808080;
  border-radius: 4px;
  background: transparent;

  margin-bottom: 16px;
}

.task-three #name-input:hover {
  border-color: #000;
}

.task-three #name-input:active,
.task-three #name-input:focus {
  border-color: #808080;
  outline: none;
}

.task-three h1,
#name-output {
  font-weight: 600;
  font-size: 24px;
  line-height: 133%;
  letter-spacing: 0.04em;
  color: #2e2f42;
}
/* #endregion */

/* #region Styles for task-4 */
.task-four .login-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  margin: 0 auto;

  width: 420px;
  padding: 24px;
  border-radius: 8px;
  background-color: #f6f6fe;
}

.task-four .login-form label {
  display: flex;
  flex-direction: column;

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

.task-four .login-form input {
  padding: 8px 16px;
  margin: 8px 0;

  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px;
}

.task-four .login-form input:hover {
  border-color: #000;
}

.task-four .login-form input:active,
.task-four .login-form input:focus {
  border-color: #808080;
  outline: none;
}

.task-four .login-form button {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;

  border-radius: 8px;
  border: none;
  padding: 8px 16px;
  text-align: center;
  background-color: #4e75ff;

  transition: 0.25s background-color ease-in-out;
  margin-top: 8px;
}

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

/* #region Styles for task-5 */
.task-five .widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 340px;
  margin: 0 auto;
}

.task-five .widget p {
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

.task-five .widget .change-color {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;

  border-radius: 8px;
  border: none;
  padding: 8px 16px;
  text-align: center;
  background-color: #4e75ff;

  transition: 0.25s background-color ease-in-out;
  margin-top: 8px;
}

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