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

/*task-1*/

#categories {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
  list-style: none;
  max-width: 400px;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

h2 {font-family: var(--font-family);
font-weight: 600;
font-size: 24px;
line-height: 133%;
letter-spacing: 0.04em;
color: #2e2f42;
}

.item {
  background-color: #F6F6FE;
  border: none;
  padding: 16px;
  border-radius: 8px;
  margin: 0 0 12px;
  font-size: 20px;
  color: #2E2F42;
  font-family: var(--font-family);
font-weight: 400;
font-size: 16px;
line-height: 150%;
}

.item ul {
  padding-left: 16px;
  margin: 0;
  list-style-type: none;
}

.item li {
  padding: 8px 12px;
  background-color: #F6F6FE;
  border: 1px solid #808080;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 16px;
}

/*task-2*/

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  padding: 0;
}

.gallery-item {
  flex: 0 1 calc((100% - 32px) / 3);
  box-sizing: border-box;
}

.gallery-item img {
  display: block;
  width: 100%;    
  height: auto;
}

/*task-3*/

#name-input {
border-radius: 8px;
padding: 24px;
width: 360px;
height: 40px;
}

#name-output {
 font-family: var(--font-family);
font-weight: 600;
font-size: 24px;
line-height: 133%;
letter-spacing: 0.04em;
color: #2e2f42;
}

/*task-4*/


.login-form {
  display: flex;
  flex-direction: column; 
  gap: 20px;               
  margin: 0 auto;
  background-color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
padding: 24px;
width: 408px;
height: 256px;
}

.login-form label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 8px;
  border: #808080;
  border-radius: 12px;
  width: 360px;
height: 72px;
}

label {
  font-family: var(--font-family);
font-weight: 400;
font-size: 16px;
line-height: 150%;
letter-spacing: 0.04em;
color: #2e2f42;
height: 40px;



}

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

button {
border-radius: 8px;
padding: 8px 16px;
width: 86px;
height: 40px;
background: #4e75ff;
font-family: var(--font-family);
font-weight: 500;
font-size: 16px;
line-height: 150%;
letter-spacing: 0.04em;
color: #fff;
border: none;
}

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


input:hover,
input:focus {
    border-color: #212121;
  color: rgb(72, 61, 61);
}


/*task-5*/

.change-color {
border-radius: 8px;
padding: 8px 16px;
width: 148px;
height: 40px;
background: #fff;
font-family: var(--font-family);
font-weight: 500;
font-size: 16px;
line-height: 150%;
letter-spacing: 0.04em;
color: #fff;
}

p {
  font-family: var(--font-family);
font-weight: 400;
font-size: 16px;
line-height: 150%;
letter-spacing: 0.04em;
color: #2e2f42;
}