/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: linear-gradient(135deg, #ffffff, #f8f9fc, #e6e6e6);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.todo-container {
  background: linear-gradient(145deg, #ffffff, #f5f5f5);
  width: 350px;
  padding: 25px;
  border-radius: 20px;
  box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.7s ease-in-out;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 600;
  color: #333;
}

.input-section {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.input-section input {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
  outline: none;
  transition: 0.3s;
}

.input-section input:focus {
  border-color: #b5aac1;
  box-shadow: 0px 0px 5px rgba(118, 75, 162, 0.5);
  animation: pulse 1s infinite;
}

.input-section button {
  margin-left: 10px;
  padding: 10px 15px;
  background: #847592;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}

.input-section button:hover {
  background: linear-gradient(90deg, #847592, #667eea, #847592);
  background-size: 200% 100%;
  animation: shimmer 1s infinite linear;
  transform: scale(1.05);
}

ul {
  list-style: none;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

ul li {
  background: #f9f9f9;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  animation: slideIn 0.4s ease-in-out;
}

ul li.done {
  text-decoration: line-through;
  opacity: 0.6;
}

ul li button {
  background: transparent;
  border: none;
  color: #0c0303;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
}

ul li button:hover {
  transform: rotate(90deg);
}

/* Scrollbar style */
ul::-webkit-scrollbar {
  width: 6px;
}
ul::-webkit-scrollbar-thumb {
  background: #545790;
  border-radius: 10px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.7); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(118, 75, 162, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(118, 75, 162, 0); }
  100% { box-shadow: 0 0 0 0 rgba(118, 75, 162, 0); }
}

@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

/* Apply when deleting */
ul li.removed {
  animation: fadeOut 0.4s forwards;
}
