* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

h1 {
  color: #e0e0f0;
  font-size: 1.8rem;
  margin-bottom: 24px;
  text-align: center;
  letter-spacing: 1px;
}

.input-area {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.input-area input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: background 0.2s;
}

.input-area input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.input-area input:focus {
  background: rgba(255, 255, 255, 0.18);
}

.input-area button {
  padding: 12px 20px;
  background: #5c6bc0;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.input-area button:hover {
  background: #7986cb;
}

.input-area button:active {
  transform: scale(0.97);
}

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-btn {
  flex: 1;
  padding: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.filter-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.filter-btn.active {
  background: #5c6bc0;
  color: #fff;
  border-color: #5c6bc0;
}

#taskList {
  list-style: none;
  margin-bottom: 16px;
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

#taskList:empty::after {
  content: 'No tasks yet. Add one above!';
  display: block;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  padding: 30px 0;
  font-size: 0.9rem;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: background 0.2s;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.task-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.task-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #5c6bc0;
  cursor: pointer;
  flex-shrink: 0;
}

.task-item span {
  flex: 1;
  color: #e0e0f0;
  font-size: 0.95rem;
  word-break: break-word;
}

.task-item.completed span {
  text-decoration: line-through;
  color: rgba(255, 255, 255, 0.3);
}

.delete-btn {
  background: transparent;
  border: none;
  color: rgba(255, 100, 100, 0.6);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.delete-btn:hover {
  color: #ff5252;
  background: rgba(255, 82, 82, 0.1);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#itemCount {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
}

#clearCompleted {
  background: transparent;
  border: none;
  color: rgba(255, 100, 100, 0.6);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s;
}

#clearCompleted:hover {
  color: #ff5252;
}
