@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #444;
}

.toDo-Container {
  background: #fff;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 30px;
  width: 100%;
  max-width: 650px;
  text-align: center;
  animation: fadeIn 0.5s ease-in-out;
}

h1 {
  font-size: 38px;
  color: #333;
  margin-bottom: 20px;
  font-weight: bold;
}

.errorMassage {
  color: #e63946;
  font-size: 14px;
  margin-bottom: 15px;
  background: #ffe6e6;
  padding: 8px;
  border-radius: 4px;
  display: none;
}

.errorMassage.error-visible {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

#toDoInput {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 16px;
  transition: border-color 0.3s;
}

#toDoInput:focus {
  outline: none;
  border-color: #6a11cb;
  box-shadow: 0 0 5px rgba(106, 17, 203, 0.2);
}

.buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.add-btn,
.clear-btn {
  flex: 1;
  padding: 12px;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-weight: bold;
}

.add-btn:hover,
.clear-btn:hover {
  background: linear-gradient(135deg, #5c0dbc, #1d5ad8);
  transform: scale(1.02);
}

.todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  gap: 5px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 6px 12px;
  border: none;
  background: #6a11cb;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.pagination button:hover {
  background: #4a0da5;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.active-page {
  background-color: #2575fc !important;
}

.todo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f5f5f5;
  padding: 12px 10px;
  border: 1px solid #ddd;
  margin: 10px 0;
  transition: box-shadow 0.3s;
  border-radius: 6px;
}

.todo-item.fadeIn {
  animation: fadeIn 0.5s ease-in-out;
}

.todo-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.todo-text {
  flex-grow: 1;
  margin: 0 10px;
  font-size: 16px;
  text-align: left;
  word-wrap: break-word;
  white-space: normal;
  max-width: 80%;
  cursor: pointer;
}

.todo-text.done {
  text-decoration: line-through;
  color: #999;
}

.edit-input {
  width: 100%;
  min-height: 30px;
  resize: vertical;
  margin-bottom: 10px;
  padding: 6px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
}

.edit-btn-group {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.edit-btn-group button {
  padding: 4px 10px;
  cursor: pointer;
  font-size: 14px;
  border: none;
  border-radius: 4px;
}

.save-btn {
  background-color: #4caf50;
  color: white;
}

.cancel-btn {
  background-color: #f44336;
  color: white;
}

.action-buttons {
  display: flex;
  gap: 5px;
}

.edit-btn,
.delete-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #333;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.edit-btn:hover,
.delete-btn:hover {
  background-color: #6a11cb;
  color: white;
}

.check {
  cursor: pointer;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  flex-shrink: 0;
}

#taskCount {
  font-weight: bold;
  margin-top: 10px;
}

#filters {
  margin-top: 5px;
}

.all,
.active,
.completed {
  padding: 4px;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 8px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-weight: bold;
  width: 60px;
  margin: 0 3px;
}

.all:hover,
.active:hover,
.completed:hover {
  background: linear-gradient(135deg, #5c0dbc, #1d5ad8);
  transform: scale(1.05);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
