main {
    width: 100%;
    display: flex;
    justify-content: center;
}
h1 {
    margin:0
}
header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: -0.2rem;
    margin-bottom: 0.5rem;
}
.add-btn {
    background-color: transparent;
    border: none;
    font-size: 2rem;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}
.add-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
}
body {
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #e0e0e0;
}

.checklist-box {
    background-color: #fff8dc;
    position: relative;
    padding: 3rem;
    max-width: 400px;
    min-height: 500px;
    width: 100%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    line-height: 1.6;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    display: flex;
    align-items: flex-start;
    line-height: 30px;
    padding-left: 0.5rem;
}

ul li {
  word-break: break-word;
  white-space: normal;
  overflow-wrap: break-word;
}

ul li input[type="checkbox"] {
    position: relative;
    top: 9px;
}
.edit-btn,
.delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    margin-left: 2rem;
    margin-top: 0.5rem;
}

.edit-btn,
.delete-btn {
    opacity: 0.6;
}

.clear-btn {
    font-family: inherit;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: transparent;
    border: none;
    font-size: 2rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    color: #000;
    transition: background-color 0.2s ease;
}

.clear-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

form input[type = "text"] {
    width: 90%;
    padding: 0.5rem;
    margin: 1rem auto;
    display: block;
    font-family: 'Caveat', cursive; 
    font-size: 1.3rem;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid #aaa;
    outline: none;
}

.task-input {
    font-family: inherit;
    font-size: 1.3rem;
    border: none;
    border-bottom: 1px solid #aaa;
    background: transparent;
    color: inherit;
    width: 100%;
    outline: none;
}

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