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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f3f4f6; /* Very light gray */
    color: #1f2937; /* Dark gray for text */
    line-height: 1.5;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: 100vh;
}

.dashboard-container {
    width: 100%;
    max-width: 500px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 4px 6px rgba(0, 0, 0, 0.02);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.header {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.logo-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #3b82f6;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
}

.subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.stats-card {
    display: flex;
    justify-content: space-between;
    background-color: #f9fafb;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stat:not(:last-child) {
    border-right: 1px solid #e5e7eb;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.todo-form {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.todo-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    color: #1f2937;
}

.todo-input::placeholder {
    color: #9ca3af;
}

.todo-input:focus, .todo-input:focus-visible {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.add-button {
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-family: inherit;
}

.add-button:hover:not(:disabled) {
    background-color: #2563eb;
}

.add-button:active:not(:disabled) {
    transform: scale(0.97);
}

.add-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.add-button:focus-visible, .delete-button:focus-visible, .clear-button:focus-visible, .filter-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    min-height: 1rem;
    margin-left: 0.25rem;
}

.filters {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.filter-btn:hover {
    background-color: #f3f4f6;
    color: #111827;
}

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

.todo-list-container {
    min-height: 200px;
}

.todo-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.todo-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border-color: #d1d5db;
}

.todo-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    cursor: pointer;
}

.todo-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 4px;
    border: 2px solid #d1d5db;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    display: inline-block;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
}

.todo-checkbox:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.todo-checkbox:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.todo-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.todo-text {
    font-size: 0.9375rem;
    color: #1f2937;
    transition: color 0.2s ease;
    word-break: break-word;
}

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

.delete-button {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    opacity: 0.5;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-button:hover {
    opacity: 1;
    background-color: rgba(239, 68, 68, 0.1);
}

.delete-button svg {
    width: 1.125rem;
    height: 1.125rem;
}

.footer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.clear-button {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    font-family: inherit;
}

.clear-button:hover {
    color: #ef4444;
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 0;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.empty-icon {
    width: 3rem;
    height: 3rem;
    color: #d1d5db;
    margin-bottom: 0.25rem;
}

.empty-state p {
    font-size: 0.9375rem;
    margin: 0;
}

/* Micro-animations for list items */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.todo-item {
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (max-width: 375px) {
    body {
        padding: 1rem;
    }
    
    .dashboard-container {
        padding: 1.25rem;
        border-radius: 12px;
        gap: 1rem;
    }
    
    .stats-card {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.125rem;
    }
    
    .todo-input {
        padding: 0.625rem 0.75rem;
    }
    
    .add-button {
        padding: 0 1rem;
    }
    
    .todo-item {
        padding: 0.75rem;
    }
}
