* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 2rem 1rem;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

header {
  text-align: center;
  color: white;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.add-task-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.add-task-card h2 {
  margin-bottom: 1rem;
  color: #1f2937;
}

.form-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#task-input {
  flex: 1;
  padding: 0.8rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
}

#task-input:focus {
  outline: none;
  border-color: #667eea;
}

select {
  padding: 0.8rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  flex: 1;
}

select:focus {
  outline: none;
  border-color: #667eea;
}

input[type="date"] {
  padding: 0.8rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

.btn {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-add {
  width: 100%;
  background: #667eea;
  color: white;
}

.btn-add:hover {
  background: #5568d3;
}

.filter-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.filter-card h3 {
  margin-bottom: 1rem;
  color: #1f2937;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.6rem 1.2rem;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: #6b7280;
  transition: all 0.3s;
}

.filter-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

.filter-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.kanban-column {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  min-height: 500px;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e5e7eb;
}

.column-header h3 {
  color: #1f2937;
  font-size: 1.2rem;
}

.task-count {
  background: #667eea;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.task-list {
  min-height: 400px;
  padding: 0.5rem;
}

.task-list.drag-over {
  background: #f3f4f6;
  border: 2px dashed #667eea;
  border-radius: 8px;
}

.empty-message {
  text-align: center;
  color: #9ca3af;
  padding: 2rem;
  font-style: italic;
}

.task-item {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  cursor: move;
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid;
}

.task-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.task-item.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.task-item.category-work {
  border-left-color: #3b82f6;
}

.task-item.category-personal {
  border-left-color: #10b981;
}

.task-item.category-shopping {
  border-left-color: #f59e0b;
}

.task-content {
  margin-bottom: 0.75rem;
}

.task-text {
  color: #1f2937;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  word-break: break-word;
  font-weight: 500;
}

.task-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.task-category,
.task-priority,
.task-due-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #6b7280;
}

.task-due-date.overdue {
  color: #ef4444;
  font-weight: 600;
}

.task-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-edit,
.btn-delete {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: opacity 0.2s;
}

.btn-edit {
  background: #3b82f6;
  color: white;
}

.btn-delete {
  background: #ef4444;
  color: white;
}

.btn-edit:hover,
.btn-delete:hover {
  opacity: 0.8;
}

.stats-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.stats-card h3 {
  margin-bottom: 1.5rem;
  color: #1f2937;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 10px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: #6b7280;
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .kanban-board {
    grid-template-columns: 1fr;
  }

  .kanban-column {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .form-row {
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    flex-direction: column;
  }

  .filter-btn {
    width: 100%;
  }
}
