/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 40px;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 10px;
    text-shadow: none;
}

.title i {
    margin-right: 15px;
    color: #495057;
}

.subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 300;
}

/* Main content */
.main {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex: 1;
    border: 1px solid #e9ecef;
}

/* Add todo section */
.add-todo-section {
    margin-bottom: 30px;
}

.input-container {
    display: flex;
    gap: 15px;
    align-items: center;
}

.todo-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.todo-input:focus {
    outline: none;
    border-color: #495057;
    background: white;
    box-shadow: 0 0 0 3px rgba(73, 80, 87, 0.1);
}

.add-btn {
    padding: 15px 25px;
    background: #212529;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.add-btn:hover {
    transform: translateY(-2px);
    background: #495057;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.add-btn:active {
    transform: translateY(0);
}

/* Filter section */
.filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e5e9;
}

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

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    border-color: #495057;
    color: #495057;
}

.filter-btn.active {
    background: #212529;
    color: white;
    border-color: #212529;
}

.todo-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Todo list */
.todo-list-container {
    min-height: 200px;
    margin-bottom: 25px;
}

.todo-list {
    list-style: none;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    animation: slideIn 0.3s ease;
}

.todo-item:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.todo-item.completed {
    opacity: 0.7;
    background: #e8f5e8;
}

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

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

.todo-checkbox.checked {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.todo-text {
    flex: 1;
    font-size: 1rem;
    word-break: break-word;
}

.todo-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.todo-item:hover .todo-actions {
    opacity: 1;
}

.delete-btn {
    padding: 8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #495057;
}

.empty-state p {
    font-size: 1rem;
    color: #6c757d;
}

.empty-state.hidden {
    display: none;
}

/* Actions section */
.actions-section {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.clear-btn {
    padding: 12px 24px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.clear-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.clear-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

.todo-item.removing {
    animation: fadeOut 0.3s ease forwards;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .main {
        padding: 20px;
    }
    
    .input-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .add-btn {
        width: 100%;
        justify-content: center;
    }
    
    .filter-section {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .todo-count {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 80px;
        justify-content: center;
    }
}