* {
  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) ===== */
#categories {
  list-style: none;
  padding: 0;
}

.item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.item h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 700;
}

.item ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}

/* ===== Task 2 (Gallery) ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.gallery li {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #fff;
}

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

/* ===== Task 3 (Name input) ===== */
#name-input {
  display: block;
  padding: 12px 16px;
  font-size: 18px;
  border: 1px solid #ccc;
  border-radius: 10px;
  margin-bottom: 16px;
  width: 100%;
  max-width: 400px;
}

h1 {
  font-size: 28px;
  font-weight: 700;
}

/* ===== Task 4 (Login form) ===== */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 320px;
  margin: 0 auto;
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-form label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.login-form input {
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 16px;
  transition: border 0.2s ease-in-out;
}

.login-form input:focus {
  border-color: #3f51b5;
  outline: none;
}

.login-form button {
  background: #3f51b5;
  color: #fff;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.login-form button:hover {
  background: #303f9f;
}

/* ===== Task 5 (Widget) ===== */
.widget {
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 12px;
  background: #fff;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.change-color {
  margin-top: 12px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: #3f51b5;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.3s;
}

.change-color:hover {
  background: #303f9f;
}
