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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    background-image: linear-gradient(100deg, #575656, #062e3f);

    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background:#f5f5f5 ;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    gap:20px;
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.typewritter h1{
      
      
    font-size: 3rem;
    font-weight: bold;
    color: #2c3e50;
    overflow: hidden;
    border-right: 3px solid #3498db;
    white-space: nowrap;
    margin: 0 auto;
    width: fit-content;
    animation: typing 4s steps(20, end), blink-caret 0.75s step-end infinite;


}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #3498db; }
}
.input-container {
    display: flex;
    margin-bottom: 30px;
    gap: 10px;
}

#taskInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    /* here is use of transition for smooth the animation its when focus on the search task there is blue outline color show  */
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

#taskInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

#addBtn {
    padding: 15px 25px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 100px;
}

#addBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

#addBtn:active {
    transform: translateY(0);
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    font-weight: 600;
    color: #555;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}

.filter-btn:hover {
    transform: translateY(-2px);
}

#todoList {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
}

.todo-item {
    background: white;
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.todo-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.todo-item.completed {
    opacity: 0.7;
    border-left-color: #28a745;
}

.todo-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.todo-checkbox {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.todo-text {
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
}

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

.todo-actions {
    display: flex;
    gap: 10px;
}

.delete-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a5a);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(255, 107, 107, 0.3);
}

.clear-completed {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a5a);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.clear-completed:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-style: italic;
}

.empty-state::before {
    content: "📝";
    display: block;
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Scrollbar Styling */
#todoList::-webkit-scrollbar {
    width: 6px;
}

#todoList::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#todoList::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 3px;
}

#todoList::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #764ba2, #667eea);
}