* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 25px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

header h1 {
    text-align: center;
    color: #4a6fa5;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-actions button {
    padding: 8px 16px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.header-actions button:hover {
    background-color: #5a6268;
}

/* 登录界面样式 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.login-content {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.login-content h2 {
    text-align: center;
    color: #4a6fa5;
    margin-bottom: 30px;
}

.login-content input[type="password"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
    margin-bottom: 20px;
}

.login-content input[type="password"]:focus {
    border-color: #4a6fa5;
}

.login-content button {
    width: 100%;
    padding: 12px;
    background-color: #4a6fa5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.login-content button:hover {
    background-color: #3a5a85;
}

.error-message {
    color: #d9534f;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.todo-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.todo-input input[type="text"] {
    flex: 2;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

.todo-input .date-input {
    padding: 12px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
    min-width: 140px;
}

.todo-input .total-input,
.todo-input .deposit-input {
    padding: 12px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
    min-width: 100px;
}

.todo-input input:focus {
    border-color: #4a6fa5;
}

.todo-input button {
    padding: 12px 20px;
    background-color: #4a6fa5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.todo-input button:hover {
    background-color: #3a5a85;
}

.todo-filters {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    margin: 0 5px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background-color: #4a6fa5;
    color: white;
}

#todoList {
    list-style: none;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.todo-item:hover {
    background-color: #f9f9f9;
}

.todo-item.completed {
    text-decoration: line-through;
    color: #999;
}

.todo-item input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.todo-item .task-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.todo-item .task-text {
    font-size: 16px;
}

.todo-item .task-date {
    font-size: 12px;
    color: #666;
}

.todo-item .task-priority {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
    font-weight: bold;
}

.todo-item .priority-high {
    background-color: #d9534f;
}

.todo-item .priority-medium {
    background-color: #f0ad4e;
}

.todo-item .priority-low {
    background-color: #5cb85c;
}

.todo-item .task-actions {
    display: flex;
    gap: 6px;
}

.todo-item button {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.todo-item .priority-btn {
    background-color: #5bc0de;
    color: white;
}

.todo-item .priority-btn:hover {
    background-color: #31b0d5;
}

.todo-item .edit-btn {
    background-color: #f0ad4e;
    color: white;
}

.todo-item .edit-btn:hover {
    background-color: #ec971f;
}

.todo-item .delete-btn {
    background-color: #d9534f;
    color: white;
}

.todo-item .delete-btn:hover {
    background-color: #c9302c;
}

.edit-input, .edit-date, .edit-priority, .edit-deposit, .edit-balance, .edit-total {
    padding: 10px;
    font-size: 14px;
    border: 2px solid #4a6fa5;
    border-radius: 4px;
    outline: none;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.edit-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.edit-row > * {
    flex: 1;
}

.edit-label {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    margin-bottom: 4px;
    display: block;
}

.todo-stats {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

.todo-stats span {
    font-weight: bold;
}

.todo-actions {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.todo-actions button {
    padding: 8px 16px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.todo-actions button:hover {
    background-color: #5a6268;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.todo-item .task-select {
    margin-right: 8px;
    transform: scale(0.8);
    opacity: 0.6;
}

.todo-item .task-complete {
    margin-right: 12px;
    transform: scale(1.2);
    cursor: pointer;
}

.todo-item .task-complete:hover {
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.3);
}

.todo-item .task-index {
    margin-right: 12px;
    font-size: 14px;
    font-weight: bold;
    color: #666;
    min-width: 20px;
    text-align: center;
}

.todo-item .task-amounts {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.todo-item .task-amounts span {
    margin-right: 10px;
}

.batch-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.batch-edit-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

.batch-edit-content h3 {
    margin-bottom: 20px;
    color: #4a6fa5;
}

.batch-edit-content .form-group {
    margin-bottom: 15px;
}

.batch-edit-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.batch-edit-content input,
.batch-edit-content select {
    width: 100%;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
}

.batch-edit-content .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.batch-edit-content .modal-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.batch-edit-content .modal-actions .save-btn {
    background-color: #4a6fa5;
    color: white;
}

.batch-edit-content .modal-actions .cancel-btn {
    background-color: #6c757d;
    color: white;
}

@media (max-width: 768px) {
    .container {
        margin: 20px;
        padding: 15px;
    }
    
    .todo-input {
        flex-direction: column;
    }
    
    .todo-input input {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .todo-input .date-input {
        margin-bottom: 10px;
    }
    
    .todo-input button {
        border-radius: 4px;
    }
    
    .todo-filters {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        margin: 5px;
    }
    
    .todo-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .todo-item .task-actions {
        align-self: flex-end;
    }
}