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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #3d3e3f 0%, #0c0c0c 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 500px;
    animation: slideIn 0.5s ease-out;
}

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

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #404042, #121213);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    position: relative;
}

#taskInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

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

#addBtn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #3b3c3f, #1c1c1d);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 80px;
}

#addBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(50, 50, 51, 0.3);
}

#addBtn:active {
    transform: translateY(-1px);
}

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

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

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #323335;
    background: transparent;
    color: #1a1b1b;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: #232324;
    color: white;
    transform: translateY(-2px);
}

#todoList {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #2a2a2c #f1f1f1;
}

#todoList::-webkit-scrollbar {
    width: 8px;
}

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

#todoList::-webkit-scrollbar-thumb {
    background: #2a2b2c;
    border-radius: 10px;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease-out;
}

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

.todo-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.todo-item.completed {
    opacity: 0.7;
    background: rgba(102, 126, 234, 0.05);
}

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

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #353536;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-right: 15px;
}

.checkbox.checked {
    background: #2f2f30;
    color: white;
}

.task-text {
    flex: 1;
    font-size: 16px;
    color: #333;
    word-break: break-word;
}

.delete-btn {
    background: linear-gradient(135deg, #f1eaea, #d4cac9);
    color: black;
    border: none;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(61, 59, 59, 0.3);
}

.empty-state {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 40px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    margin-top: 20px;
}

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

.clear-completed:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(126, 123, 123, 0.3);
}

.clear-completed:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
    }
    
    .stats {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}
