:root {
  --bg-color: #f0f2f5;
  --text-color: #333;
  --card-color: #fff;
}

body.dark {
  --bg-color: #181818;
  --text-color: #f0f0f0;
  --card-color: #242424;
}

body {
  font-family: Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  margin: 0;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

.container {
  background-color: var(--card-color);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 450px;
  transition: background 0.3s;
}

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

h1 {
  font-size: 1.6rem;
}

#dark-mode-toggle {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}

#date-time {
  font-size: 0.9rem;
  margin-bottom: 15px;
  opacity: 0.7;
}

.input-section {
  display: flex;
  margin-bottom: 10px;
}

#task-input {
  flex: 1;
  padding: 12px;
  font-size: 1rem;
  font-family:"Roboto"
  border: 1px solid #ccc;
  border-radius: 5px 0 0 5px;
  outline: none;
}

#add-btn {
  padding: 12px;
  font-size: 1rem;
  border: none;
  background-color: #4CAF50;
  color: white;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}

#search {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

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

li {
  background-color: var(--bg-color);
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

li.completed {
  text-decoration: line-through;
  opacity: 0.6;
}

.delete-btn {
  background-color: #ff4d4d;
  border: none;
  font-size: 0.9rem;
  color: white;
  padding: 6px 10px;
  border-radius: 5px;
  cursor: pointer;
}

.delete-btn:hover {
  background-color: #ff1a1a;
}

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

@media (max-width: 600px) {
  body { padding: 10px; }
  h1 { font-size: 1.4rem; }
  #task-input, #add-btn, #search { font-size: 0.95rem; }
  .container { padding: 15px; }
}
