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

body {
  font-family: 'Commissioner', sans-serif;
  background-color: #1a1a2e;
  color: #eaeaea;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

h1 {
  font-family: 'Aldrich', sans-serif;
  font-size: 2rem;
  color: #fff;
}

.add-btn {
  background-color: #4a90d9;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.add-btn:hover {
  background-color: #3a7fc8;
  transform: translateY(-1px);
}

.add-btn:active {
  transform: translateY(0);
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 20px;
  flex: 1;
  overflow-x: auto;
  padding-bottom: 20px;
}

/* Columns */
.column {
  flex: 1;
  min-width: 300px;
  background-color: #16213e;
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #0f3460;
}

.column-header h2 {
  font-family: 'Aldrich', sans-serif;
  font-size: 1.2rem;
  color: #eaeaea;
}

.count {
  background-color: #0f3460;
  color: #eaeaea;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.cards-container {
  flex: 1;
  min-height: 200px;
  overflow-y: auto;
}

/* Drag over state for columns */
.column.drag-over .cards-container {
  background-color: rgba(74, 144, 217, 0.1);
  border-radius: 8px;
}

/* Cards */
.card {
  background-color: #1f2b47;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  cursor: grab;
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid #4a90d9;
}

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

.card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

/* Priority colors */
.card.priority-high {
  border-left-color: #e74c3c;
}

.card.priority-medium {
  border-left-color: #f39c12;
}

.card.priority-low {
  border-left-color: #27ae60;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.card-title {
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  flex: 1;
  margin-right: 10px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-actions button {
  background: none;
  border: none;
  color: #8892a6;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s, background-color 0.2s;
}

.card-actions button:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.card-actions .delete-btn:hover {
  color: #e74c3c;
}

.card-description {
  color: #a0a8b8;
  font-size: 0.9rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.priority-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  font-weight: 600;
}

.priority-badge.high {
  background-color: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

.priority-badge.medium {
  background-color: rgba(243, 156, 18, 0.2);
  color: #f39c12;
}

.priority-badge.low {
  background-color: rgba(39, 174, 96, 0.2);
  color: #27ae60;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  background-color: #0f3460;
  color: #7eb8f7;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: #16213e;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #0f3460;
}

.modal-header h2 {
  font-family: 'Aldrich', sans-serif;
  font-size: 1.3rem;
}

.close-btn {
  background: none;
  border: none;
  color: #8892a6;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #fff;
}

/* Form */
#todoForm {
  padding: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #a0a8b8;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #0f3460;
  border-radius: 8px;
  background-color: #1f2b47;
  color: #eaeaea;
  font-family: 'Commissioner', sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #4a90d9;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #6b7280;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cancel-btn {
  background-color: transparent;
  border: 1px solid #0f3460;
  color: #a0a8b8;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s, color 0.2s;
}

.cancel-btn:hover {
  background-color: #0f3460;
  color: #fff;
}

.submit-btn {
  background-color: #4a90d9;
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.submit-btn:hover {
  background-color: #3a7fc8;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
  color: #8892a6;
}

footer a {
  color: #4a90d9;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer .by {
  margin-top: 10px;
  font-size: 0.9rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  color: #6b7280;
  padding: 30px 15px;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .kanban-board {
    flex-direction: column;
  }

  .column {
    min-width: 100%;
  }
}

@media (max-width: 500px) {
  header {
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    text-align: center;
    font-size: 1.5rem;
  }

  .add-btn {
    width: 100%;
  }

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

  .cancel-btn,
  .submit-btn {
    width: 100%;
  }
}
