/* General Styling */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  background-color: #f7f9fc;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  text-align: center;
  width: 100%;
  padding: 1.2rem;
}

h1 {
  color: #333;
  margin-bottom: 20px;
  font-size: 2rem;
}

/* Kanban Board Layout */
.board {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
}

/* Input Section */
.input-container {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

#todo-input {
  flex-grow: 1;
  padding: 12px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

#add-task-btn {
  padding: 10px 15px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#add-task-btn:hover {
  background-color: #0056b3;
}

/* Column Styling */
.list {
  background-color: #e3e4e8;
  padding: 1rem;
  border-radius: 8px;
  width: 30%;
  min-height: 400px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}
.list.over {
  background-color: #d1d3d8;
}

.list h2 {
  color: #555;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* Task Cards */
.task-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  min-height: 100px;
}

.card {
  background-color: white;
  color: #333;
  padding: 1rem;
  margin-bottom: 10px;
  border-radius: 8px;
  cursor: grab;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.44);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card:active {
  cursor: grabbing;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Delete Button */
.delete-button {
  background-color: #ff4d4d;
  border: none;
  color: white;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  margin-left: 12px;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.delete-button:hover {
  background-color: #e60000;
}

/* Task Content */
.task-content {
  flex-grow: 1;
  text-align: left;
  padding-right: 10px;
}

/* Drag & Drop Effects */
.list.over {
  background-color: #e0e4e7;
  transition: background-color 0.2s;
}

.card.dragging {
  opacity: 0.8;
  cursor: grabbing;
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.task-list .card {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.task-list .card:not(.dragging) {
  transform: translateY(10px); 
  opacity: 0.95; 
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .board {
    flex-direction: column;
    align-items: center;
  }

  .list {
    width: 80%;
    margin-bottom: 20px;
  }
}

@media (max-width: 600px) {
  .board {
    gap: 10px;
  }

  .list {
    width: 95%;
    margin-bottom: 15px;
  }

  #todo-input {
    padding: 10px;
  }

  #add-task-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .list h2 {
    font-size: 1.2rem;
  }
}
