* {
  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;
  min-height: 100vh;
}

/* Default */

ul {
  list-style: none;
}

/* Index */

a {
  padding: 16px 40px;
  margin: 5px;
  border: solid black 2px;
  color: black;
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
}

a:hover {
  background-color: black;
  color: white;
}

/* Task - 1 */

#categories {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 24px;
  border-radius: 8px;
  padding: 24px;
  width: 440px;
}

.item {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 16px;
  border-radius: 8px;
  padding: 16px 16px;
  background: #f6f6fe;
}

.item > h2 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.33;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

.item > ul {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 8px;
  padding: 0;
}

.item > ul > li {
  padding: 8px 16px;
  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}


/* Task - 2 */

.gallery {
  width: 1128px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 48px;
  column-gap: 24px;
  padding: 0;
}

.gallery__item {
  width: 360px;
  height: 300px;
  flex-basis: calc((100% - 48px)/3);
}

.gallery__img{
  display: block;
  margin: auto;
  width: 100%;
  height: 100%;
}

/* Task - 3 */
h1 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.33;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

#name-input {
  width: 360px;
  height: 40px;
  padding: 8px 140px 8px 16px;
  border: 1px solid #808080;
  border-radius: 4px;
}

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

#name-output {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.33;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

/* Task - 4 */

.login-form {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  border-radius: 8px;
  padding: 24px;
  width: 408px;
}

.login-form label {
  margin-bottom: 8px;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

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

.login-form button {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  width: 86px;
  height: 40px;
  font: inherit;
  background: #4e75ff;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
}

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


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

.widget p {
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

.change-color {
  border-radius: 8px;
  padding: 8px 16px;
  width: 148px;
  height: 40px;
  border: none;
  background: #4e75ff;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
}

/* Task - 6 */

#controls {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: row;
  gap: 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  padding: 32px;
  width: 486px;
  height: 104px;
  background: #f6f6fe;
}

#controls input {
  border: 1px solid #808080;
  border-radius: 8px;
  padding: 8px;
  width: 150px;
  height: 40px;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

button[data-create] {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  width: 120px;
  height: 40px;
  background: #4e75ff;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
}

button[data-create]:hover {
  background: #6c8cff;
  cursor: pointer;
}



button[data-destroy] {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  width: 120px;
  height: 40px;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  background: #ff4e4e;
  color: #ffffff;
}

button[data-destroy]:hover {
  background: #ff7070;
  cursor: pointer;
}


#boxes {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 44px;
  border-radius: 8px;
  padding: 32px;
  width: 486px;
  height: 134px;
  background: #f6f6fe;
}
