* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #111827, #1f2937);
  color: #ffffff;
  min-height: 100vh;
}

.app {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.mini {
  margin: 0 0 6px;
  color: #9ca3af;
  font-size: 13px;
}

h1 {
  margin: 0;
  font-size: 30px;
}

.install-btn,
#addBtn,
.clear-btn,
.filter {
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  transition: 0.2s;
}

.install-btn {
  background: #10b981;
  color: white;
  padding: 12px 16px;
}

.install-btn:hover {
  opacity: 0.9;
}

.add-box {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

#taskInput {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  border: none;
  outline: none;
  font-size: 16px;
  background: #f9fafb;
  color: #111827;
}

#addBtn {
  padding: 14px 18px;
  background: #3b82f6;
  color: white;
  font-weight: bold;
}

#addBtn:hover {
  opacity: 0.9;
}

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

.filter {
  padding: 10px 14px;
  background: #374151;
  color: white;
}

.filter.active {
  background: #f59e0b;
  color: #111827;
  font-weight: bold;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.stats p {
  margin: 0;
  color: #e5e7eb;
}

.clear-btn {
  background: #ef4444;
  color: white;
  padding: 10px 14px;
}

.clear-btn:hover {
  opacity: 0.9;
}

.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}

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

.task-check {
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.task-text {
  flex: 1;
  font-size: 16px;
  word-break: break-word;
}

.delete-btn {
  border: none;
  background: #dc2626;
  color: white;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.delete-btn:hover {
  opacity: 0.9;
}

.empty-state {
  text-align: center;
  color: #cbd5e1;
  margin-top: 24px;
  font-size: 17px;
}

@media (max-width: 600px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .add-box {
    flex-direction: column;
  }

  #addBtn,
  .install-btn,
  .clear-btn {
    width: 100%;
  }

  h1 {
    font-size: 26px;
  }

  .stats {
    flex-direction: column;
    align-items: stretch;
  }
}