*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Segoe UI",sans-serif;
}

body{
    min-height:100vh;
    padding:40px 20px;
    display:flex;
    justify-content:center;
    align-items:flex-start;

    background:linear-gradient(
        135deg,
        #667eea,
        #764ba2
    );
}

.container{
    width:100%;
    max-width:900px;

    background:rgba(255,255,255,0.95);

    backdrop-filter:blur(10px);

    border-radius:24px;

    padding:30px;

    box-shadow:
    0 15px 35px rgba(0,0,0,0.15);
}

.header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
    margin-bottom:15px;
}

h1{
    color:#222;
}

.subtitle{
    color:#666;
    margin-bottom:25px;
}

#themeToggle{
    border:none;
    padding:10px 15px;
    border-radius:10px;
    cursor:pointer;
    font-weight:600;
}

.task-form{
    display:flex;
    flex-wrap:wrap;
    gap:15px;
    margin-bottom:30px;
}

.task-form input,
.task-form select{
    flex:1;
    min-width:180px;

    padding:12px;

    border:1px solid #ddd;

    border-radius:12px;

    outline:none;

    transition:.3s;
}

.task-form input:focus,
.task-form select:focus{
    border-color:#4f46e5;
}

#addTaskBtn{
    background:linear-gradient(
        135deg,
        #4f46e5,
        #7c3aed
    );

    color:white;

    border:none;

    padding:12px 20px;

    border-radius:12px;

    cursor:pointer;

    font-weight:600;

    transition:.3s;
}

#addTaskBtn:hover{
    transform:translateY(-2px);
}

.tasks-section{
    margin-bottom:30px;
}

.filters{
    display:flex;
    gap:10px;
    margin-bottom:20px;
    flex-wrap:wrap;
}

.filters button{
    border:none;
    padding:10px 15px;
    border-radius:10px;
    cursor:pointer;
    font-weight:600;
    background:#ececff;
}

.filters button:hover{
    background:#d9d9ff;
}

#taskList{
    display:flex;
    flex-direction:column;
    gap:15px;
}

.task-card{
    background:white;

    border-left:5px solid #4f46e5;

    border-radius:15px;

    padding:18px;

    box-shadow:
    0 5px 15px rgba(0,0,0,0.08);
}

.task-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
}

.task-title{
    font-size:18px;
    font-weight:600;
    color:#222;
}

.task-info{
    margin-top:10px;
    color:#666;
}

.priority{
    padding:5px 10px;
    border-radius:20px;
    font-size:12px;
    font-weight:600;
}

.high{
    background:#ffe5e5;
    color:#d62828;
}

.medium{
    background:#fff2cc;
    color:#a16207;
}

.low{
    background:#dff7e1;
    color:#15803d;
}

.task-actions{
    margin-top:15px;
    display:flex;
    gap:10px;
}

.complete-btn{
    background:#22c55e;
    color:white;
    border:none;
    padding:8px 14px;
    border-radius:8px;
    cursor:pointer;
}

.delete-btn{
    background:#ef4444;
    color:white;
    border:none;
    padding:8px 14px;
    border-radius:8px;
    cursor:pointer;
}

.complete-btn:hover,
.delete-btn:hover{
    transform:scale(1.05);
}

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

.overdue{
    border-left:5px solid red !important;
}

.progress-section{
    margin-top:20px;
}

.progress-bar-container{
    width:100%;
    height:22px;

    background:#e5e7eb;

    border-radius:20px;

    overflow:hidden;

    margin:15px 0;
}

#progressBar{
    width:0%;
    height:100%;

    background:linear-gradient(
        to right,
        #4f46e5,
        #7c3aed
    );

    transition:.4s;
}

#progressText{
    text-align:center;
    font-weight:600;
}

.footer{
    text-align:center;
    margin-top:30px;
    color:#666;
}

/* DARK MODE */

.dark-mode{
    background:#121212;
}

.dark-mode .container{
    background:#1e1e1e;
}

.dark-mode h1,
.dark-mode h2,
.dark-mode .task-title{
    color:white;
}

.dark-mode .subtitle,
.dark-mode .task-info,
.dark-mode .footer{
    color:#cfcfcf;
}

.dark-mode input,
.dark-mode select{
    background:#2a2a2a;
    color:white;
    border:1px solid #555;
}

.dark-mode .task-card{
    background:#2a2a2a;
}

.dark-mode .filters button{
    background:#333;
    color:white;
}

.dark-mode #themeToggle{
    background:#333;
    color:white;
}

@media(max-width:768px){

    .header{
        flex-direction:column;
        align-items:flex-start;
    }

    .task-form{
        flex-direction:column;
    }

    #addTaskBtn{
        width:100%;
    }

    .task-header{
        flex-direction:column;
        align-items:flex-start;
    }

    .task-actions{
        flex-wrap:wrap;
    }
}