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

ul, li {
  list-style: none;
  padding: 0;
}

.task-list {
  max-width: 320px;
  font-family: "Montserrat", sans-serif;
}


.task-list li {
  margin: 10px 0;
}

.task-list li a {
  display: block;
  text-decoration: none;
  padding: 12px 16px;
  background-color: #4e75ff;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.task-list li a:hover {
  background-color: #6c8cff;
  box-shadow: 0 5px 12px rgba(0,0,0,0.15);
}

.task-list li a:active {
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

body > p > a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  color: #ff3f00;
  border: 1px solid #000;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

body > p > a:hover {
  background-color: #4e75ff;
  border-color: #fff;
  color: #fff;
}

/* task 1 styles */

#categories {
display: flex;
align-items: flex-start;
justify-content: flex-start;
flex-direction: column;
gap: 24px;
margin: 48px 16px 16px 16px;
}

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

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

.item ul li {
  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px;
  padding: 6px 16px;
}

.item ul li:not(:last-child) {
  margin-bottom: 8px;
}

/* task 2 styles */

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
}

.gallery-item {
  flex-basis: calc((100% -48px) / 3);
}

.gallery-image {
  display: block;
  width: 360px;
  height: 300px;
  object-fit: cover;
}

.gallery-image:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

}

/* task 3 styles */

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

h1, #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 styles */

.login-form {
display: flex;
  flex-direction: column;
  width: 408px;
  padding: 24px;
  border: 1px solid #808080;
  border-radius: 8px;
  background-color: #fff;
  font-family: "Montserrat", sans-serif;
}

.login-form label {
  display: flex;
  flex-direction: column;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #2e2f42;
  margin-bottom: 8px;
}

.login-form label:last-of-type {
  margin-bottom: 0;
}

.login-form input {
  margin-top: 8px;
  margin-bottom: 0;
  width: 360px;
  height: 40px;
  padding: 8px 16px;
  border: 1px solid #808080;
  outline: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

.login-form input:hover{
  border: 1px solid #000;
}

.login-form input:focus {
  border: 1px solid #808080;
}

.login-form button {
  width: 86px;
  height: 40px;
  padding: 8px 16px;
  margin-top: 16px;
  background-color: #4e75ff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

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

/* task 5 styles */

.widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.04em;
  padding: 100px 88px;
  width: 345px;
  height: 280px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.widget p {
  font-weight: 400;
  font-size: 16px;
  margin: 0 0 16px 0;
}

 .change-color {
  width: 148px;
  height: 40px;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 16px;
  color: #fff;
  background: #4e75ff;
  border: none;
  cursor: pointer;
}

  .change-color:hover {
  background-color: #6c8cff;
}