body{
  display: flex;
  flex-direction: column;  
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.header {
  height: 120px;
  background-color: var(--color-card);
  box-shadow: 0 5px 10px -3px rgba(45, 45, 45, 0.5);
}
.header-list {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 0 20px;
  
}

.header-list h2 {
  font-size: 50px;
}

.logo {
  padding-left: 50px;
}

.footer {
  height: 100px;
  width: 100%;
  background-color: var(--color-card);
  box-shadow: 0 5px 10px 3px rgba(45, 45, 45, 0.5);

  position: fixed;
  bottom: 0;
  left: 0;


  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  font-weight: 100;
  opacity: 0.5;
}

.footer .author {
  position: absolute;
  right: 80px;
  opacity: 0.8;
}



.main-content {
display: flex;
justify-content: center;

}

.filter-group {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  
}

.filter-group button {
  height: 40px;
  padding: 10px 15px;
  
}
.wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

h3 {
  margin: 0;
  font-size: 32px;  
  padding-left: 100px;
}

#themeToggle {
  background: none;
  border: 1px solid var(--color-primary);
  cursor: pointer;
  padding: 5px;
}

.todo-container {
  width: 100%;  
  max-width: 500px;
  padding: 20px;
  border-radius: 8px;
  background-color: var(--color-card);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: 50px;
}

/* ряд с инпутом и кнопками */
.controls {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.controls input {
  flex: 1;
}

main {
  margin-top: 20px;
}



/* Список без маркеров и базовых отступов */
#taskContainer {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Элемент списка — карточка */
#taskContainer li {
  display: grid;
  grid-template-columns: 24px 1fr auto auto; /* чекбокс, текст, edit, delete */
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  margin-bottom: 10px;
}

/* Завершённые задачи с зачёркнутым текстом */
.task-item.done .task-text {
  text-decoration: line-through;
  text-decoration-color: var(--color-primary);
  text-decoration-thickness: 2px;
  color: #666b73
}

.del-btn  img,
.edit-btn img {
  filter: invert(1) sepia(1) saturate(5) hue-rotate(180deg);
}

.del-btn {
  background-color: var(--color-error);
}

.task-item {
  transition: all 0.3s ease;
}

.task-item.removing {
  opacity: 0;
  transform: translateX(-20px);
}

.task-item input[type="checkbox"] {
  appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  cursor: pointer;
}

.task-item input[type="checkbox"]:checked {
  background-color: var(--color-primary);
  position: relative;
}

.task-item input[type="checkbox"]:checked::after {
  content: "✔";
  color: white;
  font-size: 18px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  transition: opacity 0.2s ease;
}

.task-text {
  text-align: left;
  word-break: break-word;
  padding: 0 10px 0 15px;
}

/* --- стили для выпадающего списка ---- */
.filter-dropdown-wrapper {
  position: relative;
  display: inline-block;
  z-index: 10;
}

/* кнопка переключатель */
.filter-toggle {
  background-color: var(--color-primary);
  caret-color: var(--color-text);
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 43px;
}

.filter-toggle img {
  transition: transform 0.3s ease;
}

/* --- контейнер опций (скрыт по умолчанию) ---- */
.filter-options-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  min-width: 150px;
  background-color: var(--color-card);
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  margin-top: 4px;
  overflow: hidden;
  display: block;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease; 
}


.filter-options-list.is-open {
  max-height: 300px;
  opacity: 1;
}

/* --- поворот стрелки при открытии ---- */
.filter-toggle.is-open img {
  transform: rotate(180deg);
}

/* --- отдельная опция ---- */
.filter-option {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--color-text);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s;
}

.filter-option:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.filter-option.active {
  font-weight: bold;
}


/* Правило для Светлой темы */
html[data-theme="light"] .filter-option img,
html[data-theme="light"] #filterToggle img {
    filter: invert(100%) hue-rotate(180deg);
}