* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
}

.intro {
    max-width: 500px;
    text-align: justify;
    color: #444;
}

.intro h1 {
    font-size: 1.75rem;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.intro p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.intro a {
    color: #4a9c5d;
    text-decoration: none;
}

.intro a:hover {
    text-decoration: underline;
}

.intro p:last-child {
    text-align: center;
    margin-top: 1rem;
}

.todo-app {
    background: #fffacd;
    border-radius: 4px;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.08),
        inset 0 -2px 4px rgba(0, 0, 0, 0.03);
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px dashed rgba(0, 0, 0, 0.1);
}

.todo-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.todo-form input[type="text"] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.7);
}

.todo-form input[type="text"]:focus {
    outline: none;
    border-color: #e6c200;
    box-shadow: 0 0 0 2px rgba(230, 194, 0, 0.2);
}

.btn {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.15s ease;
}


.filters {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.filters label {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #777;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s ease;
}

.filters label:hover {
    color: #555;
    background: rgba(255, 255, 255, 0.5);
}

.filters input[type="radio"] {
    display: none;
}

.filters input[type="radio"]:checked + span {
    color: #333;
    font-weight: 600;
}

.filters label:has(input[type="radio"]:checked) {
    color: #333;
    border-bottom-color: #4a9c5d;
    background: rgba(255, 255, 255, 0.6);
}

.task-count {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.todo-item input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    accent-color: #4a9c5d;
}

.todo-item .todo-name {
    flex: 1;
    font-size: 0.9rem;
    color: #333;
}

.todo-item .todo-name[contenteditable] {
    padding: 0.5rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 4px;
    outline: none;
}

.todo-item .todo-name[contenteditable]:focus {
    border-color: #e6c200;
    box-shadow: 0 0 0 2px rgba(230, 194, 0, 0.2);
}

.todo-item.completed .todo-name {
    text-decoration: line-through;
    color: #888;
}

.todo-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f4ea;
    border: 1px solid #c5e1c9;
    border-radius: 6px;
    color: #4a9c5d;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: all 0.15s ease;
}

.btn-icon:hover {
    background: #d4ebda;
    border-color: #4a9c5d;
    color: #3d8350;
}

.btn-icon.delete,
.btn-icon.cancel {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.btn-icon.delete:hover,
.btn-icon.cancel:hover {
    background: #fee2e2;
    border-color: #f87171;
    color: #991b1b;
}

.btn-icon.save,
.btn-icon.add {
    background: #e8f4ea;
    border-color: #c5e1c9;
    color: #4a9c5d;
}

.btn-icon.save:hover,
.btn-icon.add:hover {
    background: #d4ebda;
    border-color: #4a9c5d;
    color: #3d8350;
}

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.edit-form input[type="text"] {
    padding: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    font-size: 0.9rem;
}

.edit-form .edit-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}
