
     @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

* {
  box-sizing: border-box;
}

body {
  background: #f0f4f8;
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  align-items: flex-start;
  padding-top: 40px;
}

.container {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  padding: 30px 25px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.07);
}

h1 {
  font-weight: 600;
  margin-bottom: 25px;
  text-align: center;
  color: #333;
}

.input-area {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

#taskInput {
  flex-grow: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1.8px solid #ddd;
  font-size: 17px;
  transition: border-color 0.3s ease;
}

#taskInput:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 8px #3b82f6aa;
}

#addTaskBtn {
  background: #3b82f6;
  border: none;
  color: white;
  font-weight: 600;
  font-size: 17px;
  border-radius: 8px;
  padding: 0 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#addTaskBtn:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}

#addTaskBtn:hover:not(:disabled) {
  background: #2563eb;
}

.task-list {
  list-style: none;
  padding-left: 0;
  max-height: 60vh;
  overflow-y: auto;
}

.task-list li {
  background: #f9fafb;
  border-radius: 10px;
  padding: 15px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.05);
  transition: background-color 0.3s ease;
}

.task-list li.completed {
  background: #d1fae5;
  text-decoration: line-through;
  color: #059669;
}

.task-left {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex-grow: 1;
}

.task-left .checkbox {
  width: 2px;
  height: 22px;
  border: 2.5px solid #3b82f6;
  border-radius: 6px;
  background: white;
  position: relative;
  flex-shrink: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.task-list li.completed .checkbox {
  background: #3b82f6;
  border-color: #3b82f6;
}

/* .checkbox::after {
  content: '✓';
  position: absolute;
  font-size: 10px;
  color: rgb(126, 123, 123);
  top: 2px;
  left: 5px;
  opacity: 0;
  transition: opacity 0.2s ease;
} */

.task-list li.completed .checkbox::after {
  opacity: 1;
}

.task-text {
  font-size: 15px;
  margin-left: 5px;
  user-select: none;
  word-break: break-word;
}

.task-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 50vh;
  position: absolute;
  margin-top: -20px;
}

.task-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: #6b7280;
  transition: color 0.3s ease;
  padding: 5px 8px;
  border-radius: 6px;
}

.task-actions button:hover {
  color: #2563eb;
}

.task-time {
  font-size: 9px;
  color: #9ca3af;
  margin-top: 20px;
  user-select: none;
  font-style: italic;
  /* width: 100%; */
  text-align: right;
}

/* Responsive scrollbar for task list */
.task-list::-webkit-scrollbar {
  width: 8px;
}

.task-list::-webkit-scrollbar-track {
  background: transparent;
}

.task-list::-webkit-scrollbar-thumb {
  background-color: #3b82f6;
  border-radius: 20px;
}
