* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #444;
}

.container {
  background: #ffffff;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 30px;
  width: 100%;
  max-width: 450px;
  text-align: center;
  animation: fadeIn 0.5s ease-in-out;
}

h1 {
  margin: 0;
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: bold;
}

.todo-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.todo-input:focus {
  outline: none;
  border-color: #6a11cb;
  box-shadow: 0 0 5px rgba(106, 17, 203, 0.2);
}

.add-btn {
  width: 100%;
  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 {
  background: linear-gradient(135deg, #5c0dbc, #1d5ad8);
  transform: scale(1.02);
}

.error-message {
  color: #e63946;
  font-size: 14px;
  margin-bottom: 15px;
  background: #ffe6e6;
  padding: 8px;
  border-radius: 4px;
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.todo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f5f5;
  padding: 12px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin: 10px 0;
  transition: box-shadow 0.3s;
}

.todo-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.todo-text {
  flex-grow: 1;
  margin: 0 10px;
  cursor: pointer;
  text-align: left;
  font-size: 16px;
}

.todo-text input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px;
  font-size: 14px;
  outline: none;
}

.edit-btn,
.delete-btn,
.save-btn {
  background-color: #6c63ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  margin: 0 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.delete-btn {
  background-color: #e63946;
}

.save-btn {
  background-color: #2ecc71;
}

.edit-btn:hover {
  background-color: #5c54e4;
  transform: scale(1.1);
}

.delete-btn:hover {
  background-color: #c72534;
  transform: scale(1.1);
}

.save-btn:hover {
  background-color: #27ae60;
  transform: scale(1.1);
}

/* Add animations for better UI */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  gap: 10px;
}

.pagination-btn {
  padding: 5px 10px;
  background-color: #6c63ff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s;
}

.pagination-btn:hover {
  background-color: #574cda;
  transform: scale(1.1);
}

.pagination-btn[disabled] {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}