body {
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: 0.3s;
}

body.dark {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #e5e7eb;
}

body.light {
  background: #f1f5f9;
  color: #111827;
}

.container {
  margin: auto;
  width: 100%;
  max-width: 420px;
  background: #111827;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

body.light .container {
  background: white;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#themeToggle {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.input-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

input {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 16px; /* prevents zoom on iOS */
}

body.light input {
  background: #e5e7eb;
  color: black;
}

button {
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  background: #3b82f6;
  color: white;
}

ul {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

li {
  display: flex;
  justify-content: space-between;
  background: #1f2937;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}

body.light li {
  background: #f3f4f6;
}

.completed {
  text-decoration: line-through;
  opacity: 0.6;
}

.delete-btn {
  background: transparent;
  color: #ef4444;
  cursor: pointer;
}

.task-info {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.filters {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.filter-btn {
  flex: 1;
  padding: 6px;
  border-radius: 6px;
  background: #1f2937;
  color: #9ca3af;
}

.filter-btn.active {
  background: #3b82f6;
  color: white;
}

.empty-message {
  text-align: center;
  margin-top: 15px;
  display: none;
}

.footer {
  text-align: center;
  padding: 15px;
  font-size: 13px;
  color: #6b7280;
  margin-top: auto;
}

/* ---------- MOBILE IMPROVEMENTS ---------- */

@media (max-width: 480px) {

  body {
    padding: 15px;
    -webkit-tap-highlight-color: transparent;
  }

  .container {
    padding: 20px;
    border-radius: 14px;
  }

  h1 {
    font-size: 22px;
  }

  .input-group {
    flex-direction: column;
  }

  .input-group button {
    width: 100%;
  }

  .filters {
    flex-direction: column;
  }

  .filter-btn {
    width: 100%;
  }

  .task-info {
    flex-direction: column;
    gap: 8px;
  }

  li {
    font-size: 15px;
    padding: 12px;
  }

  button {
    font-size: 15px;
  }

}