body {
    font-family: Arial;
    background: #f0f2f5;
    display: flex;
    justify-content: center;
    padding: 50px;
}
.container {
    width: 100%;
    max-width: 800px;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-sizing: border-box;
}

h1 {
    text-align: center;
}

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

input,
select,
button {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

button {
    background: #1e6dfb;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    opacity: .9;
}

#taskInput {
    flex: 1;
}

#searchInput {
    width: 100%;
    margin: 20px 0;
    box-sizing: border-box;
}

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

.filters button,
.actions button {
    flex: 1;
}

.progress-container {
    width: 100%;
    height: 15px;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
}

#progressBar {
    width: 0%;
    height: 100%;
    background: #1e6dfb;
    transition: .3s;
    transition: width 0.5s ease;
}

#taskList {
    list-style: none;
    padding: 0;
}

#taskList li {
    background: #f5f5f5;
    margin-bottom: 15px;
    padding: 20px;
    border-radius: 15px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
}

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

.high {
    border-left: 6px solid red;
}

.medium {
    border-left: 6px solid orange;
}

.low {
    border-left: 6px solid green;
}

.dark {
    background: #1f1f1f;
    color: white;
}

.dark .container {
    background: #2a2a2a;
}

.task-buttons {
    display: flex;
    gap: 10px;
}

small {
    color: gray;
}

/* Dark Mode Task Cards */
.dark #taskList li {
    background: #333;
    color: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* Small text inside task cards */
.dark small {
    color: #bbb;
}

/* Input, Search, Date, Select */
.dark input,
.dark select {
    background: #333;
    color: white;
    border: 1px solid #555;
}

/* Completed Task */
.dark .completed {
    opacity: 0.6;
    text-decoration: line-through;
}

/* Card Shadow */
#taskList li {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.dark #taskList li {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
.sort-buttons{
    display:flex;
    gap:15px;
    margin-top:15px;
    
}

.sort-buttons button{
    flex:1;
    min-height: 50px;
    font-size: 16px;
}
#taskList li {
    transition: 0.3s;
}

#taskList li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
button {
    transition: 0.2s;
}

button:hover {
    transform: scale(1.05);
}

input:focus,
select:focus {
    outline: none;
    border: 2px solid #2563eb;
    box-shadow: 0 0 10px rgba(37,99,235,0.3);
}

.overdue {
    border-left: 6px solid crimson !important;
}
.sort-buttons button,
.filters button {
    flex: 1;
    min-height: 50px;
    font-size: 16px;
}


.dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.card {
    background: #ffffff;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,.1);
}

.dark .card {
    background: #2c2c2c;
}

.card h3 {
    font-size: 30px;
    color: #2563eb;
}

.card p {
    margin-top: 8px;
}


.favorite {
    border-left: 8px solid gold;
}


#toast {
    position: fixed;
    right: 30px;
    bottom: 30px;
    background: #2563eb;
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    display: none;
}


@media (max-width: 768px) {

    body {
        padding: 15px;
    }

    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }

    .top,
    .filters,
    .actions,
    .sort-buttons {
        flex-wrap: wrap;
        gap: 10px;
    }

    .top input,
    .top select,
    .top button {
        width: 100%;
    }

    .dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    #taskList li {
        flex-direction: column;
        align-items: flex-start;
    }

    .task-buttons {
        margin-top: 15px;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .task-buttons button {
        padding: 10px;
        font-size: 14px;
        flex: 1;
    }
}