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

body {
  background: linear-gradient(120deg, #f1f1f1, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.container {
  background: #fff;
  width: 90%;
  max-width: 460px;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#head-text {
  text-align: center;
  font-size: 20px;
  margin-bottom: 15px;
  color: #2563eb;
}

#newtask {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

#newtask input {
  flex: 1;
  padding: 10px;
  border: 1px solid #bbb;
  border-radius: 6px;
  font-size: 14px;
}

#newtask input:focus {
  border-color: #2563eb;
}

#push {
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: white;
  font-weight: 500;
  cursor: pointer;
}

#push:hover {
  background: #1d4ed8;
}

#progress-container {
  width: 100%;
  background: #e4e4e4;
  border-radius: 15px;
  height: 12px;
  margin: 10px 0;
}

#progress-bar {
  width: 0%;
  height: 100%;
  background: #3b82f6;
  border-radius: 15px;
  transition: width 0.3s ease;
}

#progress-text {
  font-size: 13px;
  text-align: center;
  margin: 8px 0 12px 0;
  color: #444;
}

.tasks {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

.task {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid #eee;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.task:hover {
  background: #f3f6ff;
}

.task .left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.task p {
  font-size: 14px;
  color: #333;
  word-break: break-word;
}

.actions {
  display: flex;
  gap: 10px;
}

.edit, .delete {
  cursor: pointer;
  font-size: 16px;
}

.edit {
  color: #6b7280;
}
.edit:hover {
  color: #2563eb;
}

.delete {
  color: #9ca3af;
}
.delete:hover {
  color: #ef4444;
}

.checked {
  text-decoration: line-through;
  color: gray;
}

#clear-all {
  width: 100%;
  padding: 8px;
  margin: 8px 0 12px 0;
  border: none;
  border-radius: 6px;
  background: #f87171;
  color: #fff;
  cursor: pointer;
}

#clear-all:hover {
  background: #dc2626;
}

/* mobile */
@media (max-width: 600px) {
  #newtask {
    flex-direction: column;
  }
  #push {
    width: 100%;
  }
}
