* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
  transition: background 0.3s ease;
}

body.dark-mode {
  background: linear-gradient(135deg, #1f2937, #111827);
}

.container {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  padding: 26px;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
  animation: fadeIn 0.6s ease;
}

.container.dark-mode {
  background: rgba(31, 41, 55, 0.92);
  color: #f3f4f6;
}

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

h2 {
  text-align: center;
  font-weight: 700;
  margin-bottom: 22px;
  color: #0f172a;
}

body.dark-mode h2 {
  color: #f3f4f6;
}

.app-title {
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgb(67, 67, 247), rgb(3, 3, 78));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

input,
select {
  width: 100%;
  padding: 13px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  transition: all 0.2s ease;
}

body.dark-mode input,
body.dark-mode select {
  background: #374151;
  color: #f3f4f6;
  border-color: #4b5563;
}

input:focus,
select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

#addBtn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#addBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

#addBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#loginBtn, #registerBtn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#loginBtn:hover, #registerBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

#loginBtn:disabled, #registerBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

ul {
  list-style: none;
  margin-top: 26px;
}

li {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.dark-mode li {
  background: #374151;
  border-color: #4b5563;
  color: #f3f4f6;
}

li:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
}

li strong {
  font-size: 15px;
  color: #111827;
  display: block;
  margin-bottom: 6px;
}

li p {
  font-size: 14px;
  color: #4b5563;
  margin: 6px 0 10px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status.Pending {
  background: #fef3c7;
  color: #92400e;
}

.status.In-Progress {
  background: #dbeafe;
  color: #1e40af;
}

.status.Completed {
  background: #dcfce7;
  color: #166534;
}

.task-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.edit-btn {
  background: #f59e0b;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.delete-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.edit-btn:hover { opacity: 0.9; }
.delete-btn:hover { opacity: 0.9; }

.logout-btn {
  width: 100%;
  margin-bottom: 15px;
  padding: 10px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.logout-btn:hover {
  transform: scale(1.03);
}

.helper-text {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  margin-top: 10px;
}

body.dark-mode .helper-text {
  color: #9ca3af;
}

body.dark-mode li strong {
  color: #f3f4f6;
}

body.dark-mode li p {
  color: #d1d5db;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: white;
  padding: 12px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  font-size: 14px;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  bottom: 40px;
}

.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }
.toast.info { background: #3b82f6; }

/* Task card animation */
.task-card {
  animation: slideUp 0.4s ease;
}

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

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
}

.empty-state p:first-child {
  font-size: 16px;
  margin-bottom: 8px;
}

.empty-state p:last-child {
  font-size: 14px;
}

.progress-section {
  margin: 20px 0;
  padding: 16px;
  border-radius: 14px;
  background: #eef2ff;
}

.chart-container {
  width: 100%;
  height: 260px; /* REQUIRED */
}

#taskChart {
  width: 100% !important;
  height: 100% !important;
}