* {margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;}

body {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px;
  transition: background 0.4s;
}
body.dark { background: linear-gradient(135deg, #111, #333); color: #ddd; }

.container {
  width: 100%; max-width: 800px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: background 0.4s, color 0.4s;
}
body.dark .container { background: rgba(30,30,30,0.95); color: #eee; }

.header {
  background: linear-gradient(to right, #6a11cb, #2575fc);
  color: white; padding: 20px; text-align: center; position: relative;
}
.header h1 { font-size: 2rem; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 12px; }

.toggle-dark {
  position: absolute; right: 20px; top: 20px; background: none; border: none; color: white;
  font-size: 1.4rem; cursor: pointer; transition: transform 0.2s;
}
.toggle-dark:hover { transform: scale(1.2); }

.app-body { padding: 25px; }

.input-section { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 25px; background: #f5f5f5; padding: 15px; border-radius: 15px; }
body.dark .input-section { background: #222; }

.input-section input, .input-section button { padding: 12px; border: none; border-radius: 10px; font-size: 1rem; }
#task-input { flex: 1; min-width: 220px; background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
#date-input, #time-input { background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

#add-btn {
  background: #6a11cb; color: white; cursor: pointer; transition: 0.3s;
  box-shadow: 0 2px 12px rgba(106,17,203,0.4);
}
#add-btn:hover { background: #2575fc; transform: translateY(-2px); }

.filter-section { display: flex; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; }
.filter-btn { padding: 8px 18px; border: none; border-radius: 8px; background: #e9ecef; cursor: pointer; transition: 0.3s; }
.filter-btn.active { background: #6a11cb; color: white; }

.task-list { list-style: none; margin-top: 15px; }
.task-item {
  display: flex; align-items: center; padding: 15px; margin-bottom: 12px;
  background: white; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  animation: fadeIn 0.4s ease;
}
body.dark .task-item { background: #333; }
.task-item.completed { background: #f8f9fa; }
.task-item.completed .task-text { text-decoration: line-through; color: #6c757d; }

.task-checkbox { margin-right: 12px; width: 20px; height: 20px; cursor: pointer; }
.task-text { flex: 1; font-size: 1.05rem; }
.task-datetime { font-size: 0.8rem; color: #6c757d; margin-top: 5px; }

.task-actions { display: flex; gap: 8px; }
.task-actions button { border: none; background: none; cursor: pointer; font-size: 1.1rem; color: #6c757d; }
.task-actions button:hover { color: #2575fc; }

.empty-state { text-align: center; padding: 35px 0; color: #6c757d; }
.empty-state i { font-size: 4rem; margin-bottom: 12px; color: #ccc; }

.stats { display: flex; justify-content: space-between; margin-top: 25px; padding: 12px; background: #f8f9fa; border-radius: 10px; font-size: 0.9rem; }
body.dark .stats { background: #222; }

@keyframes fadeIn { from{opacity:0;transform:translateY(10px);} to{opacity:1;transform:translateY(0);} }
