@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: auto;
  width: 100%;
  /* overflow: hidden; */
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: #F0ECE5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: auto;
  background-color: #c6c7ab;
  border-radius: 10px;
  box-shadow: 0 4px 8px #bcb8b1;
  padding: 50px;
  margin: 50px 0px;
}

header {
  text-align: center;
  margin-bottom: 50px;
  align-items: center;
  display: flex;
  justify-content: center;
  flex-direction: row !important;
  column-gap: 15px;
}

header h1 {
  color: #333333;
  font-family: "DM Serif Display", serif;
  letter-spacing: 1.5px;
  font-size: 40px;
}

.input-section {
  display: grid;
  grid-template-columns: 1fr auto;
  justify-content: center;
  align-items: center;
  margin-bottom: 50px;
  column-gap: 25px;
}

.input-section>#taskInput,#addTaskBtn{
  font-family: "Nunito Sans", sans-serif;
  letter-spacing: 0.5px;
}

#taskInput {
  padding: 10px 25px;
  border: 2px solid #ddd;
  border-radius: 50px;
  font-size: 16px;
  width: 100%;
}

#taskInput:focus{
  outline: none;
}

#addTaskBtn {
  padding: 10px 20px;
  border: 2px solid #4d4637;
  background-color: #4d4637;
  color: white;
  border-radius: 30px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

#addTaskBtn:hover {
  background-color: #413b2d;
  border: 2px solid #413b2d;
}

.task-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  font-family: "Roboto", sans-serif;
  letter-spacing: 0.5px;
}

.task-list h2 {
  text-align: center;
  color: #555555;
  margin-bottom: 30px;
  font-family: "Roboto", sans-serif;
  letter-spacing: 0.5px;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background-color: #fcfcf5;
  margin-bottom: 10px;
  border-radius: 5px;
  transition: background-color 0.3s;
  flex-direction: column;
  align-items: flex-start;
}

li:hover {
  background-color: #fafae9;
}

li.completed {
  background-color: #dff0d8;
}

li.completed:hover {
  background-color: #d0e9c6;
}

.task-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.task-item {
  flex-grow: 1;
}

.task-description {
  margin: 0;
  font-size: 17px;
  color: #333333;
  letter-spacing: 0.1px;
}

.task-timestamp {
  font-size: 13px;
  color: #999999;
  margin-top: 10px;
  margin-bottom: 20px;
  letter-spacing: 0.2px;
}

.task-actions {
  display: flex;
  align-items: center;
}

.task-actions input[type="checkbox"] {
  margin-right: 235px;
}

.task-actions button {
  margin-left: 8px;
  padding: 0;
  border: none;
  /* background-color: #d9534f; */
  color: #d9534f;
  /* padding: 5px 15px; */
  /* border-radius: 3px; */
  cursor: pointer;
  font-size: 15px;
  /* transition: background-color 0.3s; */
  /* letter-spacing: 0.1px; */
}

.task-actions button.edit-btn {
  /* background-color: #f0ad4e; */
  color: #f0ad4e;
}

.task-actions button:hover {
  /* background-color: #c9302c; */
  color: #c9302c;
}

.task-actions button.edit-btn:hover {
  /* background-color: #ec971f; */
  color: #ec971f;
}

/* For devices with a width of 768px or less (tablets and small screens) */
@media (max-width: 768px) {
  .container {
    padding: 30px;
    margin: 20px 0px;
  }

  header h1 {
    font-size: 32px;
  }

  .input-section {
    grid-template-columns: 1fr;
  }

  #taskInput {
    width: 100%;
    margin-bottom: 10px;
  }

  #addTaskBtn {
    width: 100%;
    padding: 10px;
  }

  .task-lists {
    grid-template-columns: 1fr;
  }

  .task-list h2 {
    font-size: 24px;
  }
}

/* For devices with a width of 480px or less (mobile phones) */
@media (max-width: 480px) {
  .container {
    padding: 20px;
    margin: 20px 0px;
  }

  header h1 {
    font-size: 28px;
  }

  #addTaskBtn {
    padding: 8px;
  }

  li {
    padding: 10px 15px;
  }

  .task-description {
    font-size: 15px;
  }

  .task-timestamp {
    font-size: 11px;
  }

  .task-actions input[type="checkbox"] {
    margin-right: 0;
  }

  .task-actions button {
    font-size: 13px;
    margin-left: 5px;
  }
}
