/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: linear-gradient(135deg, #c2ea66, #584ba2);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  padding-top: 80px;
  color: #333;
}

/* Title and Subtitle */
h1 {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

p {
  color: #e0e0e0;
  margin-bottom: 25px;
  font-size: 1rem;
}

/* Input & Button Container */
#todo-input {
  width: 320px;
  padding: 10px 14px;
  margin: 20px 0;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

#todo-input:focus {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  transform: scale(1.02);
}

/* Add Button */
#add-btn {
  margin-left: 10px;
  padding: 10px 20px;
  background: #4e54c8;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

#add-btn:hover {
  background: #8f94fb;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

/* Todo List Container */
#todo-list {
  list-style: none;
  margin-top: 30px;
  padding: 0;
  width: 360px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

/* Each Todo Item */
#todo-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}

#todo-list li:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Checkbox styling */
#todo-list input[type="checkbox"] {
  accent-color: #50fa7b;
  transform: scale(1.3);
  margin-right: 10px;
}

/* Todo Text */
#todo-list span {
  flex: 1;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.3s ease;
}

#todo-list span:hover {
  color: #a3ffea;
}

/* Delete Button */
#todo-list button {
  background: #ff4b5c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

#todo-list button:hover {
  background: #ff6b81;
  transform: scale(1.05);
}

/* Completed Todo Animation */
#todo-list li input[type="checkbox"]:checked + span {
  text-decoration: line-through;
  color: #b0b0b0;
  transition: all 0.3s ease;
}

/* Smooth fade-in for new todos */
#todo-list li {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 480px) {
  body {
    padding-top: 50px;
  }
  #todo-input {
    width: 200px;
  }
  #todo-list {
    width: 300px;
  }
}