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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

h1 {
    color: #333;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 600;
}

.form-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.form-row {
    margin-bottom: 16px;
}

input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

input[type="text"]:focus {
    border-color: #0066cc;
}

.upload-area {
    border: 1px dashed #ccc;
    border-radius: 4px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
    margin-bottom: 16px;
}

.upload-area:hover {
    background: #f0f0f0;
}

.upload-area.has-image {
    border-style: solid;
    border-color: #0066cc;
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
    color: #999;
}

.upload-text {
    color: #666;
    font-size: 14px;
}

.upload-hint {
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

input[type="file"] {
    display: none;
}

.preview-container {
    display: none;
}

.preview-container.show {
    display: block;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
}

.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
}

button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

.add-btn {
    background: #0066cc;
    color: white;
    border: none;
    width: 100%;
    padding: 10px;
}

.add-btn:hover {
    background: #0052a3;
}

.task-list {
    margin-top: 24px;
}

.task-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.task-card.completed {
    opacity: 0.6;
}

.task-card.completed .task-title {
    text-decoration: line-through;
    color: #999;
}

.task-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.task-content {
    flex: 1;
}

.task-title {
    font-size: 15px;
    color: #333;
}

.task-actions {
    display: flex;
    gap: 8px;
}

.toggle-btn {
    background: #f5f5f5;
    color: #666;
}

.toggle-btn:hover {
    background: #e8e8e8;
}

.edit-btn {
    background: #f5f5f5;
    color: #666;
}

.edit-btn:hover {
    background: #e8e8e8;
}

.delete-btn {
    background: #fff;
    color: #ff4444;
    border-color: #ff4444;
}

.delete-btn:hover {
    background: #ff4444;
    color: white;
}

.empty-state {
    background: white;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    color: #999;
    border: 1px solid #e0e0e0;
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.close-btn {
    width: 28px;
    height: 28px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #666;
}

.close-btn:hover {
    background: #e8e8e8;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.cancel-btn {
    flex: 1;
    background: white;
    color: #666;
}

.cancel-btn:hover {
    background: #f5f5f5;
}

.save-btn {
    flex: 1;
    background: #0066cc;
    color: white;
    border: none;
}

.save-btn:hover {
    background: #0052a3;
}

@media (max-width: 600px) {
    .task-actions {
        flex-wrap: wrap;
    }
}