* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #222;
}

.todo-container {
  background: #ffffff;
  padding: 30px 25px;
  border-radius: 20px;
  width: 360px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.6s ease-out;
}

header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 1.8rem;
  color: #4f46e5;
  letter-spacing: 1px;
}

header p {
  font-size: 0.9rem;
  color: #666;
}

.input-area {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.input-area input {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: 0.3s;
}

.input-area input:focus {
  border-color: #06b6d4;
  outline: none;
  box-shadow: 0 0 6px rgba(6, 182, 212, 0.5);
}

.input-area button {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  border: none;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.input-area button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(6, 182, 212, 0.4);
}

.task-list {
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
}

.task-list li {
  background: #f8fafc;
  margin: 8px 0;
  padding: 10px 14px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideIn 0.3s ease;
  transition: background 0.3s, transform 0.2s;
}

.task-list li:hover {
  background: #eef2ff;
  transform: scale(1.02);
}

.task-list span {
  flex: 1;
  text-align: left;
  font-size: 0.95rem;
}

.completed {
  text-decoration: line-through;
  color: #888;
}

.task-list button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.1rem;
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.task-list .complete {
  color: #10b981;
}

.task-list .delete {
  color: #ef4444;
}

.task-list button:hover {
  transform: scale(1.2);
}

footer {
  text-align: center;
  margin-top: 15px;
  font-size: 0.8rem;
  color: #777;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}