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

p a {
  text-decoration: none;
  color: #4e75ff;
  font-weight: 400;
}

p a:hover {
  text-decoration: underline;
}

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

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

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

.item ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item ul li {
  padding: 8px 12px;
  background-color: #fff;
  border: 1px solid #808080;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1.5;
}

/* task-2 */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 100px 156px;
  margin: 0;
  width: 1440px;
}

.gallery li {
  width: calc((1128px - 20px) / 3);
  height: 300px;
}

.gallery img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 5px;
  object-fit: cover;
}

/* task-3 */
h1 {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.33;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

.placeholder {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
  padding-bottom: 8px;
  padding-top: 8px;
  padding-left: 16px;
}

#name-input {
  width: 360px;
  height: 40px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s ease;
}

#name-input:focus {
  border-color: #1a2fec;
}

#name-input::placeholder {
  color: #757575;
}

/* task-4 */
.login-form {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 16px;
  border-radius: 8px;
  padding: 24px;
  width: 408px;
  height: 256px;
  background: #fff;
}

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

.login-form input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 360px;
  height: 40px;
}

.login-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;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
}

.login-form button:hover {
  background: #6c8cff;
}

/* task-5 */
.widget {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 10px;
  border-radius: 8px;
  padding: 100px 88px;
  width: 345px;
  height: 280px;
  background: #fff;
}

.widget p {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 169px;
  height: 80px;
}

.widget button {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  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;
}
