* {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #f4f6f8;
  margin: 0;
  padding: 20px;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- Top Bar ---------- */

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

h1 {
  margin: 0;
  font-weight: 600;
}

/* ---------- Archive Switch ---------- */

.archive-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.switch {
  position: relative;
  width: 42px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 22px;
  cursor: pointer;
  transition: 0.3s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.switch input:checked + .slider {
  background: #4caf50;
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

/* ---------- Board ---------- */

.board {
  display: flex;
  gap: 16px;
  align-items: flex-start; /* 👈 THIS FIXES IT */
}


/* ---------- Column ---------- */

.column {
  background: #fff;
  padding: 12px;
  width: 220px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.column h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  margin-bottom: 8px;
}

.add-btn {
  cursor: pointer;
  font-size: 20px;
}

/* ---------- Task ---------- */

.task {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 14px;
}

.task.completed span {
  text-decoration: line-through;
  font-style: italic;
  opacity: 0.6;
}

/* ---------- Input ---------- */

.task-input {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.task-input input {
  flex: 1;
  min-width: 0;              /* 🔑 KEY FIX */
  padding: 6px 8px;
  font-size: 14px;
}


.task-input button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;

  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;
}


/* ---------- Difficulty Colors ---------- */

.very-easy { color: darkgreen; }
.easy { color: green; }
.medium { color: goldenrod; }
.hard { color: orange; }
.very-hard { color: red; }

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
  .board {
    flex-direction: column;
  }

  .column {
    width: 100%;
  }
}
