/* === БАЗОВЫЕ СТИЛИ === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

body {
  background: linear-gradient(180deg, #f4f7ff 0%, #e9eefb 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2c2c2c;
}

/* === КОНТЕЙНЕР === */
#wrapper {
  width: 100%;
  max-width: 680px;
  padding: 20px;
}

#todo-wrapper {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  padding: 28px 24px;
}

/* === ФОРМА === */
form {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

form input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #d4d9f0;
  border-radius: 12px;
  font-size: 15px;
  background-color: #f9faff;
  outline: none;
  transition: all 0.2s ease;
}

form input:focus {
  background-color: #fff;
  border-color: #5c7cfa;
  box-shadow: 0 0 0 3px rgba(92, 124, 250, 0.15);
}

#btn-add,
#btn-clear-list {
  background: linear-gradient(135deg, #5c7cfa, #4a63e7);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

#btn-add:hover {
  background: linear-gradient(135deg, #4a63e7, #405ad6);
}

#btn-clear-list {
  background: linear-gradient(135deg, #4a63e7, #405ad6);
}

/* === СПИСОК === */
ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* === ЭЛЕМЕНТ ЗАДАЧИ === */
li {
  background: #f9faff;
  border: 1px solid #e0e4f2;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background 0.2s ease;
}

li:hover {
  background: #eef1fb;
}

/* === ТЕКСТ ЗАДАЧИ === */
li p {
  flex: 1;
  font-size: 15px;
  color: #2c2c2c;
  word-break: break-word;
}

li input[type='checkbox'] {
  transform: scale(1.25);
  cursor: pointer;
  accent-color: #5c7cfa;
}

/* Зачёркивание выполненных задач */
li input[type='checkbox']:checked + p {
  text-decoration: line-through;
  color: #8b8b8b;
}

/* === КНОПКА УДАЛЕНИЯ === */
li button {
  background: #fff;
  border: 1px solid #ffb4b4;
  color: #e63946;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 500;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

li button:hover {
  background: #ffe5e5;
  border-color: #e63946;
  color: #b91c1c;
}

/* === АДАПТИВ === */
@media (max-width: 480px) {
  #todo-wrapper {
    padding: 20px;
  }

  form {
    flex-direction: column;
  }

  #btn-add {
    width: 100%;
  }

  li {
    flex-direction: column;
    align-items: flex-start;
  }

  li button {
    align-self: flex-end;
  }
}
