:root {
  --primary: #4f46e5;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
}

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  display: flex;
  justify-content: center;
  padding: 20px;
  color: var(--text);
}

/* APP CARD */
.app {
  background: var(--card);
  width: 100%;
  max-width: 420px;
  padding: 20px;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* HEADER */
header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  margin: 0;
}

header p {
  margin: 5px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* FORM */
form {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

input {
  flex: 1;
  padding: 14px;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid #ddd;
}

button {
  padding: 14px 16px;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: white;
  font-weight: 600;
}
/* BUTTON HOVER (desktop) */
button:hover {
  opacity: 0.85;
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

li span {
  cursor: pointer;
}


/* FILTERS */
.filters {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.filters button {
  flex: 1;
  margin: 0 4px;
  background: #e5e7eb;
  color: #111;
}

.filters button.active {
  background: var(--primary);
  color: white;
}

/* TASK LIST */
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  background: #f9fafb;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeIn 0.25s ease;
}

li.completed span {
  text-decoration: line-through;
  color: var(--muted);
}

li span {
  flex: 1;
  font-size: 16px;
}

.actions button {
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  padding: 6px;
}

/* DESKTOP ENHANCEMENTS */
@media (min-width: 768px) {
  body {
    padding: 40px;
  }

  .app {
    padding: 30px;
  }
}

/* ANIMATION */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
