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

body {
  background: var(--bg);
  color: var(--text);
  transition: 0.3s ease;
}

:root {
  --bg: #f5f5f5;
  --text: #222;
  --card: #fff;
  --accent: #007bff;
  --shadow: rgba(0, 0, 0, 0.1);
}

body.dark {
  --bg: #1e1e1e;
  --text: #fff;
  --card: #2c2c2c;
  --accent: #4dabf7;
  --shadow: rgba(255, 255, 255, 0.1);
}

.container {
  max-width: 480px;
  margin: 60px auto;
  background: var(--card);
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 5px 20px var(--shadow);
  transition: 0.3s ease;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 26px;
}

#theme-toggle {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text);
}

/* Input Section */
.input-section {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.input-section input {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  outline: none;
}

.input-section button {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.input-section button:hover {
  opacity: 0.85;
}

/* Filter */
.filter-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-section input,
.filter-section select {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

/* Task list */
#task-list {
  list-style: none;
}

.task {
  background: var(--card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 2px 5px var(--shadow);
  transition: all 0.3s ease;
  animation: fadeIn 0.4s ease;
}

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

.task button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.2s ease;
}

.task button:hover {
  transform: scale(1.2);
  color: var(--accent);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*Responsive */
@media (max-width: 600px) {
  .container {
    margin: 30px 15px;
    padding: 20px;
  }

  header h1 {
    font-size: 22px;
  }

  .input-section, .filter-section {
    flex-direction: column;
  }

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

  .filter-section input,
  .filter-section select {
    width: 100%;
  }

  #task-list {
    margin-top: 10px;
  }
}
