* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e95f7;
    --primary-light: #E3F2FD;
    --primary-dark: #2196F3;



}

body {

    justify-content: center;
    align-items: center;
    display:flex;
    background-color: var(--primary-light);
    
}

.container {
    
    max-width: 600px;
    width: 100%;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;

}
.my_task {
    display: inline;
}

header{
    background-color: var(--primary);
    padding: 10px 25px;
    color: white;
}


.add_task {
    padding: 20px 25px;
    display: flex;
    gap: 15px;
    background-color: var(--primary-light);
    
    
}

.add_task input{
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #BBDEFB;
    border-radius: 8px;
    transition: all 0.3s;
}

.add_task input:focus{
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 3px rgba(33, 150, 243, 0.5);

}

.add_task button{
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: all 0.3s;
    background-color: var(--primary-dark);
    color: white;
    cursor: pointer;
    border: none;
}

.add_task button:hover{
    background-color: #1976D2;
}

.filter{
    display: flex;
    gap: 24px;
    padding: 12px 15px;
    border-bottom: 1px solid #E0E0E0;
    background-color: #FAFAFA;
}

.filter :hover{
    color: #1976D2;
}

/* .all{
    color: #2196F3;
    
}

.all .active{
    border-bottom: 3px solid #2196F3;
    padding-bottom: 3px;
} */

.todo_container {
    padding: 12px 20px;
    border-bottom: 1px solid#dee2e6;
}

/* .hidden_list{
    display: none;
} */



.todo_list {
    list-style-type: none;
}

.todo_item{
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.checkbox_container {
    margin-right: 15px;
    position: relative;
}

.todo_checkbox {
    opacity: 0;
    position: absolute;
}

.checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.todo_checkbox:checked + .checkmark{
    background-color: #2196F3;
    border-color: #2196F3;
}

.todo_checkbox:checked + .checkmark::after{
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border:solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


.todo_list_text {
    flex: 1;
    font-size: 1rem;
}

.delete_button {
    color: gray;
    background-color: white;
    border: none;
    transition: all 0.2s;
    opacity: 0;
    transition: all 0.2s;
}

.todo_list:hover .delete_button{
    opacity: 1;
}


.delete_button:hover{
    color: #F44336;

}




.empty_state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px;
    gap: 15px;
    color: #90A4AE;
}

.empty_state i{
    font-size: 40px;
}

/* .hidden_empty{
    display: none;
} */

footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
}

.footer_p {
    color: gray;
}

.footer_button {
    border: none;
    background-color: white;
    color: #2196F3;
    transition: all 0.2s;
    font-weight: 500;
}

.footer_button:hover {
    color: #1565C0;
}


.filter span {
    cursor: pointer;
    color: #757575;
    position: relative;
    font-weight: 500;
    transition: color 0.25s, font-weight 0.25s;
}

/* Hover 效果 */
.filter span:hover {
    color: var(--primary-dark);
}

/* 当前选中项（带下划线 & 加粗） */
.filter .active {
    color: var(--primary-dark);
    font-weight: 600;
}

/* 下划线动画 */
.filter .active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 3px;
    background-color: var(--primary-dark);
    border-radius: 3px;
    transform: scaleX(1);
    transition: transform 0.25s ease-in-out;
}

/* 未激活时默认隐藏下划线 */
.filter span::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 3px;
    background-color: var(--primary-dark);
    border-radius: 3px;
    transform: scaleX(0);
    transition: transform 0.25s ease-in-out;
}

/* Hover 时也能轻微预览动画 */
.filter span:hover::after {
    transform: scaleX(0.4);
}

