/*
 * Basic styling for the To‑Do List app.  Keep things simple and
 * responsive so the UI works well on phones and desktop screens.
 */

body {
  margin: 0;
  font-family: sans-serif;
  background: #f7f7f7;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background: #1976d2;
  color: white;
  padding: 1rem;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 1.8rem;
}

.subtitle {
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

main {
  flex: 1;
  padding: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

#taskForm {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#newTaskInput {
  flex: 1 1 200px;
  padding: 0.5rem;
  font-size: 1rem;
}

.repeat {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

#taskForm button {
  padding: 0.5rem 1rem;
  background: #1976d2;
  color: white;
  border: none;
  cursor: pointer;
}

#taskForm button:hover {
  background: #125ea6;
}

#taskList {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Style each task item */
.task-item {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #ddd;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

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

.task-text {
  flex: 1;
  margin-left: 0.5rem;
}

.task-repeat {
  font-size: 0.75rem;
  color: #555;
  margin-left: 0.5rem;
}

.buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

#exportBtn {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  background: #388e3c;
  color: white;
  border: none;
  cursor: pointer;
}

#exportBtn:hover {
  background: #2e7d32;
}

.import-label {
  position: relative;
  padding: 0.5rem 1rem;
  background: #f57c00;
  color: white;
  cursor: pointer;
}

.import-label input {
  display: none;
}

.import-label:hover {
  background: #ef6c00;
}

.hint {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #555;
}

footer {
  text-align: center;
  padding: 0.5rem;
  background: #eee;
  font-size: 0.8rem;
}