:root {
  color: white;
  background-color: rgb(138, 136, 136);
  text-align: center;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background-image: linear-gradient(
    to right top,
    #b51a1a,
    #bd6529,
    #c29855,
    #ccc493,
    #e4ebd6
  );
  animation: pageFade 0.6s ease;
}

.todo-app {
  background-color: #2b2b2b;
  padding: 24px 32px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 900px;
  animation: floatIn 0.4s ease;
}

.subtitle {
  margin: 4px 0 8px;
  font-size: 0.95rem;
  color: #cfcfcf;
  opacity: 0.9;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.9rem;
  opacity: 0.9;
}

.stats span {
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
}

#total-count {
  background-color: #424242;
}
#todo-count {
  background-color: #2962ff;
}
#inprogress-count {
  background-color: #ffa000;
}
#done-count {
  background-color: #2e7d32;
}

.pulse {
  animation: pulse 0.35s ease;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.task-inputs {
  display: grid;
  grid-template-columns: 2fr 3fr 1.5fr 1fr auto;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}

.task-inputs input,
.task-inputs select {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: none;
  background-color: #1f1f1f;
  color: #f5f5f5;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

select#task-priority {
  background-color: #242424;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.task-inputs input:hover,
.task-inputs select:hover,
.filters select:hover {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.task-inputs input:focus,
.task-inputs select:focus,
.filters select:focus {
  border-color: #64b5f6;
  box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.35);
  transform: translateY(-1px);
}

#add-btn {
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  background-color: #4caf50;
  color: white;
  cursor: pointer;
  height: 100%;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

#add-btn:hover {
  background-color: #43a047;
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.controls-row {
  margin-top: 16px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}

.filters label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filters select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: none;
  background-color: #1f1f1f;
  color: #f5f5f5;
}

.task-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.9rem;
}

.task-table th,
.task-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.task-table th {
  background-color: rgba(255, 255, 255, 0.08);
  font-weight: 600;
  color: #e5e5e5;
}

.task-table tr:hover {
  background-color: rgba(255, 255, 255, 0.07);
  transition: background-color 0.15s ease;
}

.task-table button {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  margin-right: 4px;
}

.task-table button:first-child {
  background-color: #1976d2;
  color: white;
}

.task-table button:last-child {
  background-color: #e53935;
  color: white;
}

.task-table button:first-child:hover {
  background-color: #1565c0;
}

.task-table button:last-child:hover {
  background-color: #d32f2f;
}

.priority {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.badge-low {
  background-color: #4caf50;
}

.badge-medium {
  background-color: #ffa000;
}

.badge-high {
  background-color: #e53935;
}

@media (max-width: 768px) {
  .todo-app {
    max-width: 100%;
    border-radius: 0;
    height: 100vh;
  }

  .task-inputs {
    grid-template-columns: 1fr;
  }
}

.empty-state {
  text-align: center;
  padding: 16px 0;
  color: #cccccc;
  font-weight: 600;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #323232;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  z-index: 10;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageFade {
  from {
    opacity: 0;
    transform: scale(0.99);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
