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

body {
    
    background: linear-gradient(135deg, #667eea, #764ba2);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: #fff;
    width: 400px;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

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

.input-section input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    outline: none;
    transition: 0.3s;
}

.input-section input:focus {
    border-color: #667eea;
}

.input-section button {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.input-section button:hover {
    background: #5563d6;
}

ul {
    list-style: none;
}

li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 10px;
    background: #f7f7f7;
    border-radius: 8px;
    transition: 0.3s;
}

.task {
    display: flex;
    align-items: center;
    gap: 10px;
}

.task input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task span {
    font-size: 14px;
    color: #333;
    transition: 0.3s;
}

/* Completed Task Style */
.task input[type="checkbox"]:checked+span {
    text-decoration: line-through;
    color: #999;
}

.delete-btn {
    background: #ff4d4d;
    border: none;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.delete-btn:hover {
    background: #e60000;
}

.edit-btn {
    background: #ff4d4d;
    border: none;
    color: white;
    padding: 6px 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
    margin-left: 100px;
}

.edit-btn:hover {
    background: #e60000;
}
#task-counter{
    font-weight:bold; 
    background: #4caf50;
       text-align: center;
    color: white;
    margin: 10px 135px;
    padding: 8px 12px;
    font-size: 20px;
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.2);
    font-size:16px; 
    margin-bottom:10px;
}
#priority {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    color: rgb(8, 5, 5);
    margin-left: 10px;
}
.priority-high {
    background-color: #ffd6d6;   
    border-left: 6px solid #f44336;
}

.priority-medium {
    background-color: #fff3cd;   
    border-left: 6px solid #ff9800;
}

.priority-low {
    background-color: #e8f5e9;  
    border-left: 6px solid #4caf50;
}

.taskli {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    transition: 0.3s ease;
}
#progressContainer {
  width: 150px;
  height: 150px;
  margin: 20px auto;
}

.task-text {
    flex: 1;
    min-width: 0;   
    word-break: break-word;
}
.sort-buttons {
    display: flex;
    gap: 0.5em;      
    margin-bottom: 1em;
}
.sort-buttons button {
    padding: 0.5em 1em;
    border: none;
    border-radius: 0.5em;
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.sort-buttons button:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

.sort-buttons button.active {
    background-color: #388e3c;
}
.taskli {
    display: flex;
    align-items: center; 
    justify-content: space-between; 
    padding: 0.5em 1em;
    border-radius: 0.5em;
    margin-bottom: 0.5em;
    background-color: #e8f5e9; 
}

.task {
    display: flex;
    align-items: center;
    flex-grow: 1; 
    gap: 0.5em;
}
.task-text {
    white-space: normal;
    word-break: break-word;
}
.edit-btn, .delete-btn {
    margin-left: 0.5em;
    flex-shrink: 0; 
    padding: 0.3em 0.6em;
    border: none;
    border-radius: 0.3em;
    cursor: pointer;
    transition: 0.2s;
}
.edit-btn:hover { background-color: #2196F3; color: white; }
.delete-btn:hover { background-color: #f44336; color: white; }
#search-task{
width:100%;
padding:10px;
margin-bottom:15px;
border-radius:8px;
border:1px solid #ccc;
font-size:16px;
}