@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&display=swap');

/* ===== Reset Básico ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Poppins, sans-serif;
}

/* ===== Body ===== */
body {
  background: linear-gradient(135deg, #f9f9f9, #e5e5e5);
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 40px 20px 0;
  /* Garante que o scroll só apareça verticalmente */
  overflow-x: hidden;
}

/* ===== Main Content ===== */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== Footer ===== */
footer {
  margin-top: auto;
  padding: 15px 10px;
  text-align: center;
  font-size: 0.9rem;
  color: #fff;
  background-color: #6b7280;
  border-top: 1px solid #555;
  width: 100vw;
  margin: auto -20px;
}

footer p {
  margin: 5px 0;
}

footer a {
  color: #f3f4f6;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #d1d5db;
  text-decoration: underline;
}

/* ===== Título ===== */
h1 {
  font-size: 2rem;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ===== Container Principal ===== */
.container {
  background: #fff;
  padding: 30px;
  border-radius: 20px;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  animation: fadeIn 0.6s ease-in-out;
  margin-bottom: 20px;
}

/* ===== Input e Botão ===== */
.container input {
  width: 70%;
  padding: 12px;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  margin-bottom: 12px;
  transition: 0.3s;
}

.container input:focus {
  border-color: #6b7280;
  box-shadow: 0 0 6px rgba(107,114,128,0.3);
}

#save {
  width: 25%;
  padding: 12px;
  border: none;
  background: #6b7280;
  color: #fff;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
}

#save:hover {
  background: #374151;
}

/* ===== Lista de Tarefas ===== */
#task-list {
  list-style: none;
  padding: 0;
  width: 100%;
  max-width: 450px;
}

#task-list li {
  background: #fff;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

#task-list li:hover {
  background: #f9fafb;
  transform: scale(1.01);
}

/* ===== Texto da Tarefa ===== */
#task-list li span {
  font-size: 1rem;
  font-weight: 500;
  color: #374151;
  flex: 1;
  margin-left: 10px;
}

/* ===== Checkbox ===== */
#task-list li input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
}

/* ===== Botão de Remover ===== */
.btnRemove {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  transition: transform 0.2s ease, color 0.3s ease;
  color: #6b7280;
  margin-left: 10px;
}

.btnRemove:hover {
  color: #ef4444;
  transform: scale(1.2);
}

/* ===== Animação ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ===== Responsividade ===== */
@media (max-width: 600px) {
    /* Ajustes para o contêiner principal */
    .container {
        padding: 20px;
        width: 100%; /* Garante que o contêiner ocupe a largura total */
    }

    /* Ajustes para os inputs e botões */
    .container input,
    #save {
        width: 100%;
        margin: 5px 0;
    }

    /* Ajuste para o layout dos elementos */
    .container {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Ajuste para a lista de tarefas */
    #task-list {
        max-width: 100%;
        width: 100%; /* Garante que a lista preencha a largura total */
    }

    /* Ajuste para o footer */
    footer {
        padding: 10px 10px; /* Reduz o padding vertical do footer */
        margin: 0 -20px; /* Mantém a correção de margem para o footer */
    }
}