@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

:root {
  --bg-start: #e0f7fa;
  --bg-end: #f5f7fa;
  --card: #ffffff;
  --primary: #1e90ff;
  --primary-dark: #1c6fd1;
  --text: #2d3436;
  --border: #dfe6e9;
  --done: #00b894;
  --notdone: #fdcb6e;
  --delete: #d63031;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2em 1em;
  min-height: 100vh;
}

.todo-container {
  background: var(--card);
  padding: 2em;
  border-radius: 15px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

h2 {
  text-align: center;
  margin-bottom: 1.5em;
  color: var(--primary-dark);
  font-size: 2em;
  letter-spacing: 0.5px;
}

.input-section {
  display: flex;
  gap: 10px;
  margin-bottom: 1.5em;
}

.input-section input {
  flex: 1;
  padding: 0.7em;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1em;
  outline: none;
  transition: 0.2s ease;
}

.input-section input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 5px rgba(30, 144, 255, 0.3);
}

.input-section button {
  padding: 0.7em 1.1em;
  background: var(--primary);
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.input-section button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.stats {
  text-align: center;
  margin-bottom: 1em;
  font-size: 0.95em;
  color: #636e72;
}

ul {
  list-style: none;
  padding: 0;
}

li {
  background: #f1f2f6;
  padding: 1.2em 1.5em;
  border-radius: 10px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideIn 0.3s ease;
  transition: 0.3s;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

li span {
  flex: 1;
  font-size: 1em;
  word-wrap: break-word;
}

/* Optional for done-task logic */
li.done-task span {
  text-decoration: line-through;
  opacity: 0.6;
}

.btn-group {
  display: flex;
  gap: 6px;
}

.btn-group button {
  border: none;
  border-radius: 6px;
  padding: 0.4em 0.6em;
  font-size: 0.8em;
  cursor: pointer;
  color: white;
  transition: 0.3s ease;
}

.btn-group button:hover {
  transform: scale(1.05);
}

.done {
  background: var(--done);
}

.done:hover {
  background: #00a478;
}

.notdone {
  background: var(--notdone);
}

.notdone:hover {
  background: #f1c40f;
}

.delete {
  background: var(--delete);
}

.delete:hover {
  background: #c0392b;
}

@media (max-width: 768px) {
  .input-section {
    flex-direction: column;
  }

  .btn-group {
    justify-content: space-around;
    width: 100%;
    gap: 8px;
  }

  li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7em;
  }

  li span {
    width: 100%;
  }
}
