* {
  box-sizing: border-box;
}

body {
  margin: 16px;
  font-family: "Montserrat", sans-serif;
  background-color: #fff;
  color: #2e2f42;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

ul {
  list-style-type: none;
  margin: 0;
  padding-left: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  color: #fff;
  background-color: #4e75ff;
  transition: background-color 250ms ease-in-out;
}

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

button {
  font-size: inherit;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  color: #fff;
  background-color: #4e75ff;
  transition: background-color 250ms ease-in-out;
}

button:hover,
button:focus {
  background-color: #6c8cff;
}

input {
  font-size: inherit;
  font-family: inherit;
  outline: none;
  background-color: transparent;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid #808080;
  transition: border 250ms ease-in-out;
}

input:hover,
input:focus {
  border: 1px solid black;
}

input:active {
  border: 1px solid #808080;
}

/* task-1-styles */

#categories {
  max-width: 392px;
  margin: 0 auto;
}

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

#categories > .item:last-child {
  margin-bottom: 0;
}

#categories > .item > h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
}

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

#categories > .item > ul > li {
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid #808080;
}

/* task-2-styles */

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

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

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* task-3-styles */

#name-input {
  width: 360px;
  height: 40px;
  margin-bottom: 16px;
}

#name-input + h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

/* task-4-styles */

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.login-form input {
  max-width: 360px;
}

/* task-5-styles */

.widget {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
