/* Reset styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background-image: url(../imgs/background.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 100vh;
  background-position: center;
  overflow: hidden;
}

/* Container styles */
.container {
  height: auto;
  min-height: 100vh;
  padding-top: 50px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* To-Do container styles */
.to-do {
  background-color: #fff;
  border-radius: 5px;
  width: 100%;
  max-width: 600px;
  margin: 20px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 150px;
  max-height: 80vh;
  overflow-y: hidden;
}

/* Title styles */
.to-do .todoTitile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid silver;
}

.to-do .todoTitile h2 {
  font-size: 1.5em;
  color: #002765;
  font-family: sans-serif;
}

.to-do .todoTitile img {
  width: 35px;
}

/* Content styles */
.to-do .todoContent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #edeefe;
  border-radius: 3px;
  margin-bottom: 25px;
  padding: 10px;
}

.to-do .todoContent input {
  flex: 1;
  border: none;
  outline: none;
  background-color: transparent;
  padding: 10px;
  font-size: 1em;
}

.to-do .todoContent button {
  border: none;
  outline: none;
  cursor: pointer;
  color: #fff;
  background: #ff5945;
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 3px;
}

/* List item styles */
.todoList {
  max-height: 400px;
  overflow-y: auto;
}

ul {
  padding: 0;
}

ul li {
  list-style-type: none;
  cursor: pointer;
  position: relative;
  font-size: 1em;
  padding: 15px 15px 15px 40px;
  margin-bottom: 10px;
  background: #f9f9f9;
  border-radius: 3px;
}

ul li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-image: url(../imgs/unchecked.png);
  background-size: cover;
  background-position: center;
}

ul li.checked {
  color: #555;
  text-decoration: line-through;
}

ul li.checked::before {
  background-image: url(../imgs/checked.png);
}

ul li span {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 25px;
  height: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  color: #fff;
  background-color: #ff5945;
  border-radius: 50%;
  transition: all 0.4s;
}

/* Responsive Design */
@media (max-width: 850px) {
  .to-do {
    max-width: 80%;
    padding: 15px;
  }
  .to-do .todoTitile h2 {
    font-size: 1.2em;
  }
  .to-do .todoContent input {
    padding: 5px;
    font-size: 0.9em;
  }
  .to-do .todoContent button {
    padding: 10px 15px;
    font-size: 0.9em;
  }
  ul li {
    padding: 10px 10px 10px 35px;
    font-size: 0.9em;
  }
  ul li span {
    width: 20px;
    height: 20px;
    font-size: 1em;
  }
}

@media (max-width: 600px) {
  .to-do {
    max-width: 90%;
    padding: 10px;
  }
  .to-do .todoTitile h2 {
    font-size: 1em;
  }
  .to-do .todoContent input {
    padding: 5px;
    font-size: 0.8em;
  }
  .to-do .todoContent button {
    padding: 8px 10px;
    font-size: 0.8em;
  }
  ul li {
    padding: 8px 8px 8px 30px;
    font-size: 0.8em;
  }
  ul li span {
    width: 18px;
    height: 18px;
    font-size: 0.9em;
  }
}
