@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

:root {
  --bg: linear-gradient(135deg, #667eea, #764ba2);
  --card: #ffffff;
  --text: #222;
  --accent: #f59e0b;
  --task: #f1f1f1;
  --completed: #34d399;
  --high: #ef4444;
  --medium: #facc15;
  --low: #3b82f6;
}

body.dark {
  --bg: linear-gradient(135deg, #0f172a, #1e293b);
  --card: #1e293b;
  --text: #f8fafc;
  --task: #334155;
  --accent: #facc15;
  --completed: #10b981;
  --high: #f87171;
  --medium: #fcd34d;
  --low: #60a5fa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
}

body {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.app {
  background: var(--card);
  width: 100%;
  max-width: 420px;
  padding: 30px 25px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  color: var(--text);
  text-align: center;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.subtitle {
  font-size: 14px;
  margin: 10px 0 20px;
  color: #555;
  font-weight: 500;
}

.input-box {
  display: flex;
  gap: 10px;
}

.input-box input,
.input-box select {
  flex: 1;
  padding: 12px 10px;
  border-radius: 15px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  background: var(--task);
  color: var(--text);
}

.input-box button {
  width: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.input-box button:hover {
  transform: scale(1.2) rotate(10deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.task-info {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin: 15px 0;
}

#searchInput {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 12px;
  border: none;
  background: var(--task);
  font-size: 14px;
}

ul {
  list-style: none;
  padding: 0;
}

li {
  background: var(--task);
  padding: 14px 12px;
  border-radius: 15px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
  cursor: grab;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.task-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkbox {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--accent);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--completed);
}

.checkbox.checked {
  background: var(--completed);
  color: white;
  transform: scale(1.3);
  box-shadow: 0 0 10px var(--completed);
}

.task-text.completed {
  text-decoration: line-through;
  opacity: 0.7;
  color: #9ca3af;
  font-weight: 600;
}

li button {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #ef4444;
}

.clear-btn {
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  border: none;
  border-radius: 15px;
  background: linear-gradient(135deg, #ef4444, #f87171);
  color: white;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}

/* Progress Bar */
.progress-container {
  width: 100%;
  background: #e5e7eb;
  height: 12px;
  border-radius: 12px;
  margin: 10px 0;
  overflow: hidden;
}

#progressBar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 12px;
  transition: width 0.3s ease;
}

/* Responsive */
@media (max-width: 480px) {
  .app {
    width: 100%;
    padding: 25px 15px;
  }
  h1 {
    font-size: 28px;
  }
  .input-box input,
  .input-box select {
    font-size: 13px;
  }
  .input-box button {
    width: 45px;
    font-size: 24px;
  }
  li {
    padding: 12px 10px;
  }
}
