* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh; 
}

.container {
  background-color: #4747e4;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgb(15, 2, 2);
  width: 400px; 
  max-width: 90%; 
}

h1 {
  text-align: center;
  color: #fff;
}

.input-group {
  margin-top: 20px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#todo-input {
  margin: 0.4rem;
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  text-align: center;
  font-size: 16px;
}

#added-btn {
  margin: 0.4rem;
  padding: 12px 20px;
  background-color: #686dec;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  transition: 0.1s;
  font-weight: bold;
}

#added-btn:hover {
  background-color: #686de0;
  font-size: 20px;
}

li {
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.1);
  padding: 12px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  list-style: none;
  height: auto; 
}

.li-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  flex: 1; 
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.task-text {
  flex: 1;
}

.check-box {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0; 
}

.lidel .task-text {
  text-decoration: line-through;
  opacity: 0.6;
}

.creatBtn {
  background-color: #ff4d4d;
  color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  flex-shrink: 0; 
}

.creatBtn:hover {
  background-color: #c53434;
}

/* --- Media Query --- */
@media (max-width: 480px) {
  .container {
    padding: 1.5rem;
    width: 320px;
  }
  h1 {
    font-size: 24px;
  }
  .li-left {
    font-size: 16px;
  }
}
